0

Continuing How to suppress vertical space between theorem heads and enumitem environments? (as opposed to them, we use a Springer class here), for all the titled theorem-like environments in our document, we wish to have a little bit more horizontal space (than the default space) separating the given title of the environment from its contents. To this end, we tried to define \@thmcounterend as a simple space:

\documentclass{svmono}% v5.10 (2021/09/08) from https://www.springer.com/gp/authors-editors/book-authors-editors/your-publication-journey/manuscript-preparation#toc-49268 or directly from https://resource-cms.springernature.com/springer-cms/rest/v1/content/20566/data/monographs
\makeatletter\def\@thmcounterend{ }\makeatother%%% Some more horizontal space after the titles of the theorem-like environments would be great. How exactly do we introduce it without occasionally introducing superfluous vertical space?
\overfullrule=1mm
\pagestyle{empty}
\begin{document}\noindent
Good remark:
\begin{remark}[Remark title 1]
  Remark text 1.
\end{remark}
Bad remark:
\begin{remark}[Remark title 2. More words. More words. More words. More w\ldots]\label{someLabel}
  Remark text 2.
\end{remark}
\end{document}

The space between the environment head and the list can get large if the head's (last) line is full and a label follows. To test, compile the input with [pdf]latex to obtain

vertical gap with latex or pdflatex

The vertical gap between “w…)” and “Remark text 2” is even larger than the gap before the environment head. This is counterintuitive and unwanted: before and after a remark we should have larger vertical gaps than within a remark. We can, of course, say \vskip-\baselineskip, but this is hard to maintain (because it might need to be removed, e.g., if the line width or the font globally change). Any idea?

3
  • that is not vertical space, you are forcing a second line of the paragraph that is all-white Mar 9, 2023 at 23:02
  • @DavidCarlisle In the viewers okular and evince, when I select the whole text via Ctrl+A, the all-white line does not get selected. So I cannot easily determine whether the all-white line contains any spaces. Anyhow, how not to introduce this all-white line when it's semantically unnecessary (in our case, even semantically harmful)?
    – user282514
    Mar 9, 2023 at 23:10
  • who looks at pdf output? add \showoutput and look at the log: ...\hbox(0.0+0.0)x332.89723, glue set 332.89723fil ....\write1{\newlabel{someLabel}{{2}{\thepage }}[None]} ....\penalty 10000 ....\glue(\parfillskip) 0.0 plus 1.0fil ....\glue(\rightskip) 0.0 so a label and parfillskip and rightskip but no text Mar 9, 2023 at 23:15

1 Answer 1

1

never put an unguarded space into the stream, tex only removes one glue item at the end of a paragraph, so if you make 2 as here you will produce an all-white line as a final line of the paragraph if it breaks before the space.

The command is followed by \ or nothing depending on the style so you could locally define it to make \ make a single double-length space.

\makeatletter\def\@thmcounterend{\def\ {\hspace{6.7pt plus 3.2pt minus 2.2pt}}}\makeatother%%% Some more horizontal space after the titles of the theorem-like environments would be great. How exactly do we introduce it without occasionally introducing superfluous vertical space?

enter image description here

5
  • Thx! Checking this now on my long book. In other terms, you're putting a doubly-long space at places in which we'd have a space anyway, aren't you?
    – user282514
    Mar 9, 2023 at 23:57
  • 1
    @AlbertNash yes instead of 2 spaces as you had it Mar 10, 2023 at 0:01
  • Thx! In my full-length book, I use other fonts than Computer Modern. Are there any caveats with \def\@thmcounterend{\def\ {\hspace{2\fontdimen2\font plus2\fontdimen3\font minus2\fontdimen4\font}}}? This way, I think I'd have exactly the double space with a double stretch and a double shrink.
    – user282514
    Mar 10, 2023 at 0:39
  • 1
    @AlbertNash yes although its a stretchy space anyway so exact arithmetc not that important but that is the right thing Mar 10, 2023 at 0:59
  • Seems like another approach is needed if the user does not supply a name of his/her own: tex.stackexchange.com/questions/678941 . Ideas?
    – user282514
    Mar 14, 2023 at 1:19

You must log in to answer this question.