upvote
Very nice implementation.

Really appreciate it.

Solves a lot of issues with the other sites. Though I haven't used it much or need it, it could be useful to students who need it and one PDF of it solves the issue.

Just keep it running. Have you considered open sourcing it at some point?

reply
Well done! Nice design, good utility, and you kept it simple. Thanks for the writeup on the technical approach.
reply
This is incredible, thanks for building this!
reply
is there a way to export the .svg so i can load them into a plotter to make the graph paper? Since you've expended all the effort to ensure proper sizing and whatnot. It even looks like it has the same margins as my plotter!
reply
DRY applies, even in SVG. Draw one horizontal line and then reuse it for the other horizontal lines. Same for the vertical lines. The advantage of this technique is that you can clone the master lines without having to repeat yourself with the stroke-width and other attributes. You can also specify just the x or just the y of the cloned line, thereby needing to specify x1, x2, y1 and y2 just once per master line, with x (or y) in the use elements being just the offset.

Why bother? DRY. That is it.

If you put the master lines in a 'defs' as symbols, then they can inherit some attributes from a 'g' (group), therefore enabling you to specify stroke-width just once. Non-scaling stroke widths can also be specified, meaning that you can scale up an A4 to an A0 without having fat lines.

Since you want to make graph paper accessible to all, you can put a few words together in the 'desc' for that, and give the paper a 'title' specifying what it is, e.g. A4, 5mm spacing, with your URL.

Nobody will ever care for these small changes, however, if you branch out into making paper for composers or other specialist use cases, these techniques might come in hand.

reply