Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call from another script #8

Open
ifndev opened this issue Jun 13, 2020 · 12 comments
Open

Call from another script #8

ifndev opened this issue Jun 13, 2020 · 12 comments

Comments

@ifndev
Copy link

ifndev commented Jun 13, 2020

It seems that tikzjax only processes the page on load.
Is there a way to call tikzjax from another script at any moment ?

Thanks !

@bjeevana94
Copy link

I have experienced a similar issue. tikzjax is able to process only at the initial load but not when I try to call it inside the component.

Please let me know if there is any solution to it.
Thanks

@kaisugi
Copy link

kaisugi commented Sep 7, 2020

I think it would be nice to register tikzjax.js compressed file (used in here for example) to some CDN service such as https://www.jsdelivr.com/.

@kaisugi
Copy link

kaisugi commented Sep 7, 2020

@kisonecat If you don't mind, I'd like to do the job instead. What do you think?

@ifndev
Copy link
Author

ifndev commented Sep 15, 2020

Unfortunately the author doesn't seem to be very active... Wich is sad as the code isn't explicitely licensed.

@kisonecat
Copy link
Owner

I very much apologize! I'd be happy for any help, and I'm also happy to get the actual open license statement in this repo. (The licensing is a bit confusing to me since it is built off the TeX sources.)

@kaisugi
Copy link

kaisugi commented Sep 16, 2020

The licensing is a bit confusing to me since it is built off the TeX sources.

Hmm.. This is a tough problem.

@kisonecat
Copy link
Owner

Looking at this some more today, the license situation is not so bad: Knuth's TeX has the "Knuth license" which just requires that the name be changed if the files are modified, but tikzjax actually uses the unchanged source and distributes "compiled" wasm so the license is really not a problem. The LaTeX stuff like TikZ is mostly LPPL or GPL or dual, so a dual LPPL/GPL licesne is the correct license since, say, tikzjax incorporates some PGF driver code. Does this sound good?

@kaisugi
Copy link

kaisugi commented Sep 17, 2020

Sounds good! I really appreciate your consideration.

@ifndev
Copy link
Author

ifndev commented Sep 19, 2020

Sounds perfect ! I'm really glad you made time to get the license right !

@ghost
Copy link

ghost commented Mar 18, 2021

Looking at this some more today, the license situation is not so bad: Knuth's TeX has the "Knuth license" which just requires that the name be changed if the files are modified, but tikzjax actually uses the unchanged source and distributes "compiled" wasm so the license is really not a problem. The LaTeX stuff like TikZ is mostly LPPL or GPL or dual, so a dual LPPL/GPL licesne is the correct license since, say, tikzjax incorporates some PGF driver code. Does this sound good?

I am a little bit confused, under which license this library is now available. We want to use your library in our e-learning platform, but can't do so, if it is licensed under a GPL license, since we can't put our platform under GPL at the moment. If your library would be available under a dual license in terms of LPPL and/or GPL, we could use it, since LPPL doesn't have a copyleft.
You say that stuff like TikZ is mostly LPPL or GPL or dual. Do I understand it correctly, that some of the stuff is only available under GPL? If so, your library can't have a dual LPPL/GPL license, since GPL has a copyleft. Excuse me, if I am mistaken here.
Could you give me some insight, under which license your library is available? In the package.json it says GPL-3.0, but that file wasn't touched since your comment here.

@kisonecat
Copy link
Owner

I apologize for the confusion.

Everything I've written in this repository is dual licensed under the LPPL and the GPL and I've updated package.json to reflect that in 8a00c2e. The LPPL handles people who might want to bundle this with LaTeX, and the GPL would permit someone to take the GPL'd code, modify it, and then release it under that license.

@GokulNC
Copy link

GokulNC commented Apr 6, 2021

Thanks @kisonecat for creating this.
Would it be possible to support the feature requested in the OP?

That is basically exposing this block of code (inside window.onload()) as a callable function like renderTikZ(targetNode):

window.onload = async function(){

The following line could be made generic:

var scripts = document.getElementsByTagName('script');

Like this:

var scripts = targetNode.getElementsByTagName('script');

where targetNode is a parameter which is explicitly passed by the programmer, the default value being targetNode=document


Also please add in the README about the instruction to build the static js file.
(Sorry if that's basic, I do not have much experience with JS)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants