zlacker

[return to "Ask HN: What's the state of the art for drawing math diagrams online?"]
1. franci+pD[view] [source] 2023-11-20 20:07:11
>>ajkjk+(OP)
I made https://vector-graph.com/ a while back and documented it pretty thoroughly. While I never "finished" it, it's working pretty fine and as long as you fix it to a specific version, you won't have to worry about changes if/when I continue working on it.

Feedback would be greatly welcome! It's made specifically for the usecase you mention, blog-like website with Katex to add pretty graphics. Example usage:

    <!-- Draw a triangle with labels on the sides and angles -->
    <vector-graph x="3" y="3" axis="false">
      <polygon points="0,0;1,3;3,1" sides="a,b,c" angles="α,β,γ"></polygon>
    </vector-graph>

    <!-- a + b = c, but in vector form (with lots of labels) -->
    <vector-graph x="4.9" y="4.9">
      <vector label="b" color="blue" from="3,4" to="4,2" axis></vector>
      <vector label="a" color="red" from="0,0" to="3,4" axis></vector>
      <vector label="c" from="0,0" to="4,2"></vector>
    </vector-graph>

PS, I give you permission to use it in your personal website for free, alexkritchevsky.com
◧◩
2. ajkjk+SJ[view] [source] 2023-11-20 20:30:35
>>franci+pD
Lol, thanks. I'll check it out. But, is the license such that you need to give permission? I see that you have a "commercial license" but it seems like that wouldn't apply to me anyway. I don't know much about software licenses tbh so some clarification would be nice.
◧◩◪
3. franci+SQ[view] [source] 2023-11-20 20:59:50
>>ajkjk+SJ
It's dual-licensed as AGPL (free software) and commercial (with a one-time $19 fee), the AGPL is pretty restrictive so if you want a more liberal one you could buy it. But, as a 3rd option exclusive for you in here, you can use it for free in your own website without having to comply with the AGPL. See a longer-form explanation:

https://opensource.stackexchange.com/a/4877

What the AGPL does differently compared to e.g. GPL is basically say that you cannot build a proprietary service around my library without making that service open source as well. So theoretically, it could be argued that depending on how you use it in your website, you would need to make your website free software as well. Or, buy a license. (Or in this case, get an exception from me). This is just a friendly explanation, the full legal terms are here:

https://github.com/franciscop/vector-graph/blob/master/LICEN...

◧◩◪◨
4. ajkjk+to1[view] [source] 2023-11-20 23:51:24
>>franci+SQ
Hmm. That makes me less interested, really. The restrictive license doesn't affect my project but I don't want to use something I can't recommend to someone else, and I would never want to build something on that because I don't want to think about licenses at all in my life, much less deal with one that encodes someone else's ideology that I don't share. Any reason not to just make it MIT? Which is apparently what e.g. KaTeX uses.
◧◩◪◨⬒
5. buzzy_+k02[view] [source] 2023-11-21 04:10:17
>>ajkjk+to1
Since you said you don’t know much about licenses, I suggest you check out https://writefreesoftware.org/learn/copyleft

AGPL is a copyleft license, MIT is not. There’s good reasons for a developer to prefer copyleft.

◧◩◪◨⬒⬓
6. ajkjk+wc6[view] [source] 2023-11-22 05:58:12
>>buzzy_+k02
For whatever reason I find licensing incredibly boring. Anything I learn about it just vanishes the next day. That's basically why I'm only interested in dealing with licenses I don't have to think about.
[go to top]