@tintenfuchs, sure no problem.
As you may know,
LaTeX is a typesetting system, and the one I used to create the document. The
TikZ package was used to draw the grids and guide lines and to place the pictures on top of them.
The worksheets contain many repeating elements, which I encapsulated with (parameterised)
macros. The sheets are also repeating elements themselves, the only variables being the letter to be drawn and the number of letters per line. So all in all there is quite a bit of coding going on in the .tex file with macros and macros calling macros, but in the end the command to create a worksheet was reduced to something like
\practicesheet{"01-i".png}{3}where the first argument is the image file of the letter shape, and the second one the width of the shape in terms of grid cells, plus one cell worth of white space.
With this approach, the main trick was to make sure that all images conformed to a certain standard. The code should be allowed to assume that, when the image would be reduced to a height of 2.5cm, and its top left corner aligned with the top left corner of the grid, the letter would be exactly aligned with the grid, and positioned against the first (near-)full slant line. Because you can tell Ti
kZ to scale an image to a certain height in cm, the actual height of the image in terms of pixels is irrelevant for the concept to work. This enabled me to derive the image sizes from the original resolution of the scan, postponing the downsizing step to as late a stage as possible. Also, the approach moves the aligning task entirely to the image editor,
Paint.NET in this case. There I replicated the grid in a background layer, and created the letter shapes on top of it, each inside their own layer. Finally I exported the letters to .png files with the grid layer switched off.
Hopefully this is the kind of info you were interested in. If there's anything specific you'd like to know please don't hesitate. I'd be most happy to explain!