5 Oct
2023
5 Oct
'23
5:54 a.m.
Hello list, I want to draw lines on a page. I want to pass my line coordinates as a percent of \width or \textheight, rather than as millimetres. So that if I change the page size I don't need to change the coordinates. The MWE below compiles but the pdf does not have any lines drawn on it. Is there a way of doing calculations on the coordinates for the draw using ConTexT variables like \textheight? Thank you, Peter Hopcroft ------ \starttext Some text \startMPcode pickup pensquare scaled 1pt; draw (0mm,0mm)--(0mm,\textheight) withcolor red \stopMPcode More text \startMPcode pickup pensquare scaled 1pt; draw (0mm,0mm)--(0mm,50mm) scaled \numexpr\textheight/50mm\relax \stopMPcode \stoptext ------