1

Even though I set grid=yes in \setuplayout, margin blocks do not use the grid.

Example file:

\setuplayout
  [
    grid=yes,
    cutspace=6cm,
    width=fit,
    backspace=6cm,
  ]
\showgrid

\starttext
\input knuth % Properly snapped to grid

\startmarginblock
  {\tfd foobar} % Not a multiple of the line height

  \input knuth % Gets knocked off the grid
\stopmarginblock
\stoptext

example file render

Note: I do not insist on using \startmarginblock, but I do need a grid-aligned paragraph in the margin.

4
  • Do you really want to use different font sizes and content that's longer than the page itself in the margin? Dec 8, 2019 at 20:06
  • Different font sizes – yes, I need it to include structure for contact information. But I do not need the content to be longer, that was just an example. Dec 8, 2019 at 20:55
  • Are you looking for something like Friggeri CV (PDF)? Dec 8, 2019 at 20:58
  • Precisely, but I’m fond of grids. :-) BTW, thank you very much for your guide to the documentation, it was invaluable for me. Dec 8, 2019 at 21:44

1 Answer 1

2

Not sure why anyone would want to do this, but a line correction preceded by \blank[overlay] to kill the vertical space inserted by the line correction seems to work.

\setuplayout
  [grid=yes,
   cutspace=6cm,
   width=fit,
   backspace=6cm]
\showgrid

\starttext
\input knuth\par

\startmarginblock
  \blank[overlay]
  \startlinecorrection
    {\tfd foobar\par}
  \stoplinecorrection
  \input ward\par
  \startlinecorrection
    {\tfd barbaz\par}
  \stoplinecorrection
  \input jojomayer\par
\stopmarginblock

\stoptext

enter image description here

3
  • Thanks! Question though, how do I keep the text aligned if I wanted to use another header? Repeating the trick doesn’t seem to work… Dec 8, 2019 at 21:49
  • @JurajFiala See updated answer. Dec 8, 2019 at 22:16
  • Hm, I tried this approach, but it kinda falls apart once I start using different fonts. I guess it approximates the grid, but I do need the full grid functionality. :-/ Nevertheless, it does solve the original problem, so if I won’t find anything better, I’ll accept your answer. :-) Dec 8, 2019 at 22:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .