3

One of the requirements of our publisher for the book to be published is grid typesetting. Of course I already had a look into how to use \raggedbottom and adjust all vertical lengths to achieve this. But there is one last thing where we need manual fiddling and I don't know where my error in thinking is.

So we have an image which originally is W267.0mm x H100.5mm and because we have 20mm margins on A4 paper, we scale the image to \textwidth and now have W170.0mm x H63.99mm or converted to Adobe Points W481.89p x H 181.39bp. My thinking is, that to achieve typesetting according to the grid. I find the next mutliple of 12bp which is 192bp and the difference is 10.61bp. If I apply this space, the text below the image should follow the grid again. Everything put in code it looks like this:

\documentclass[a4paper]{scrartcl}
\usepackage[left=20mm,right=20mm]{geometry}

\usepackage{lipsum,graphicx}

\setkomafont{caption}{\fontsize{10bp}{12bp}\selectfont}
\setkomafont{captionlabel}{\fontsize{10bp}{12bp}\selectfont}

\setlength{\textfloatsep}{0bp}
\setlength{\intextsep}{0bp}
\setlength{\abovecaptionskip}{10.61bp}
\setlength{\belowcaptionskip}{0bp}

\raggedbottom
\begin{document}
    \fontsize{10bp}{12bp}\selectfont
    \lipsum[1-3]
    \begin{figure}[h]
        \centering
        \includegraphics[width=170mm,height=63.99mm]{example-image-A}
        \caption{Just a test}
    \end{figure}
    \lipsum
    \lipsum
\end{document}

However I prepared a visual check of this page and used LaTeX for this as well, so I use the output of above and use it as Registerhaltigkeit.pdf for the following code:

\documentclass[a4paper]{scrartcl}

\usepackage[absolute]{textpos}
\usepackage{graphicx,pgffor}

\pagestyle{empty}
\begin{document}
\foreach \x [evaluate=\x as \y using int(\x+1)] in {1}{
\newpage
\begin{textblock*}{105mm}[0,0](0mm,0mm)%
    \noindent%
    \includegraphics[page=\x,trim=0mm 0mm 105mm 0mm,width=105mm,clip]{Registerhaltigkeit.pdf}%
\end{textblock*}%
\begin{textblock*}{105mm}[0,0](105mm,0mm)%
    \noindent%
    \includegraphics[page=\y,trim=105mm 0mm 0mm 0mm,width=105mm,clip]{Registerhaltigkeit.pdf}%
\end{textblock*}%
~
}
\end{document}

And the final result looks reveals that up to the figure everything is in register, thereafter there is an offset between the two pages:

enter image description here

What am I doing wrong, which numbers am I'm messing up or which internals skips do I miss? Thanks for your support as always.


After comment of @barbara beeton

The comment of @barbara beeton brought me to the point that I wanted to answer just use article instead of scrartcl, it doesn't change a thing, but this is not true. Using scrbook instead of scrartcl is not really changing something, but using book instead of scrbook does.

So here is my new code, which uses the standard book class and the caption package:

%\documentclass[a4paper]{scrartcl}
\documentclass{book}
\usepackage[left=20mm,right=20mm,a4paper]{geometry}

\usepackage{lipsum,graphicx}

%\setkomafont{caption}{\fontsize{10bp}{12bp}\selectfont}
%\setkomafont{captionlabel}{\fontsize{10bp}{12bp}\selectfont}
\usepackage{caption}
\DeclareCaptionFont{MyFont}{\fontsize{10bp}{12bp}\selectfont}
\captionsetup[figure]{font=MyFont,labelfont=MyFont}

\setlength{\textfloatsep}{0bp}
\setlength{\intextsep}{0bp}
\setlength{\abovecaptionskip}{10.61bp}
\setlength{\belowcaptionskip}{0bp}

\raggedbottom
\begin{document}
    \fontsize{10bp}{12bp}\selectfont
    \lipsum[1-3]
    \begin{figure}[h]
        \centering
        \includegraphics[width=170mm,height=63.99mm]{example-image-A}
        \caption{Just a test}
    \end{figure}
    \lipsum
    \lipsum
\end{document}

And now applying the second script, my result looks like this: enter image description here

So you can see that after the figure now everything is set on grid, which means my calculation was right. However now I have some more questions:

  1. What extra spacing is added between the figure caption and the following text?
  2. Why does it match the vertical distance or where is this space taken from so the lines are matching afterwards again?
  3. What extra space is added by KOMA-Script that obviously messes up the vertical spacing?

Maybe you have some hints for me?


OK, I found a partial answer and here is an intermediate result, I will also post an answer in the next days:

enter image description here

11
  • 1
    This probably most demonstrates my ignorance, but what does "register accuracy" mean? I'm honestly not familiar with this term.
    – Mico
    Jun 13, 2020 at 11:45
  • @Mico you speak German, right? As far as I found this is the translation of Registerhaltigkeit. Check Register (Druck) in the German Wikipedia. Do you have a better translation? In the end it means a line is on the same vertical height on every page.
    – TobiBS
    Jun 13, 2020 at 12:12
  • +1. I do speak German :-) , but I am completely and utterly out of my depth on the subject raised by your posting. I read the wikipedia page you allude to, but I understood just about nothing. Aside: I also suspect that translating "Registerhaltigkeit" as "register accuracy" -- does that come from Google Translate? -- is not all that idiomatic from a point of view of typographers' jargon.
    – Mico
    Jun 13, 2020 at 16:57
  • 1
    @Mico -- I suspect that what is desired is what is also known as "grid typesetting". (But beyond hypothesizing what is meant, I'm out of my depth.) Jun 13, 2020 at 20:00
  • 1
    @barbarabeeton Thanks for your comment, I updated my question and would like to answer your questions as well. In my real example I am using scrbook, however for the MWE it didn't really matter. Also the formatting of chapter/section/other titles was already solved by myself, so I didn't want to complicate the MWE. The final book contains no single formula and only one figure, this is why I am fine with a manual solution. Next time I will just use ConTeXt which seems to be the grid typesetting goto place. But I can't for this project. ;-)
    – TobiBS
    Jun 14, 2020 at 10:28

1 Answer 1

2

Basically you need to make sure that your figure and the space surrounding it will stay within the grid. As you used a figure environment but with "h" I presume you want it within the text (but I hope you are aware that this can float away as "h" only means "h if it fits". The problem is that floating figures get spae only on one side while intext figures get space above and below (and possibly \lineskip because the figure is just a big box).

Your best bet I guess is to define your own environment that starts a figure env but then typesets the figure content inclduding caption into a named box you measure that end alter its dimensions to fit your grid requirements by adding extra space above and below and then \usebox{myadjustedbox} and then end the figure env. In addition you need to adjust the floating pararameters to be rigid and fitting to whatever you use as height steps.

Alternatively if you always explicitly place the figures inside the text you can just avoid using the figure env and instead use \captionof (from the float package) to get a caption. The you are free play with the spaces around your fake figure as you like.

I know that this isn't a finished recipe, but this is roughly what is needed.

A good helper is \showoutput to see what spaces get added where. The extra space added by caption depends on the class (or package) you use but it is often \abovecaptionskip. The float parameters to adjust are \intextsep, \floatsep, \textfloatsep, etc.

You must log in to answer this question.

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