add tag
AlbertNashr
Continuing http://topanswers.xyz/tex?q=3768 , for all the theorem-like environments in our document, we wish to have a little bit more horizontal space (than the default space) separating the head of the environment (whether it is fully automatically generated or also contains a user-given part) from its contents. To this end, we tried to redefine `\@thmcounterend` (thanks to [@DavidCarlisle][1] and [@Skillmon][2]):

    \documentclass[twocolumn]{svmono}% v5.10 (2021/09/08) from http://www.springer.com/gp/authors-editors/book-authors-editors/your-publication-journey/manuscript-preparation#toc-49268 or directly from http://resource-cms.springernature.com/springer-cms/rest/v1/content/20566/data/monographs
    \overfullrule=1mm
    \pagestyle{empty}
    \newcommand{\test}[1]{
    \noindent Remark with a short name:
    \begin{remark}[Short name]
      Body of a remark with a short name.
    \end{remark}
    Remark without a special name:
    \begin{remark}
      Body of an unnamed remark.
    \end{remark}
    Remark with a line-filling, long name and a label:
    \begin{remark}[Some long remark name.]\label{#1}
      Body of a remark with a long name.
    \end{remark}
    }%
    \begin{document}%
    \section*{Originally}
    \test{RemarkLabelOne}
    \newpage
    \section*{Redefining \texttt{\textbackslash @thmcounterend}}
    \makeatletter\def\@thmcounterend{\@ifnextchar\ {\hspace{2\fontdimen2\font plus2\fontdimen3\font minus2\fontdimen4\font}\@gobble}{ }}\makeatother
    \test{RemarkLabelTwo}
    \end{document}

Running `pdflatex` on this results in

[![output side-by-side][3]][3]

As we see, the original version is simply ugly: the title and the contents are separated by a too small space (cf. Remark 2). If we redefine `\@thmcounterend` to be a space (`\def\@thmcounterend{ }`  or `\def\@thmcounterend{\ }` or `\def\@thmcounterend{\space}`), an unwanted empty line after a line-long remark title may emerge.  If we redefine `\@thmcounterend` to redefine the space to be of the double length (`\def\@thmcounterend{\def\ {\hspace{2\fontdimen2\font plus2\fontdimen3\font minus2\fontdimen4\font}}}`), but the user does not supply a name, then the horizontal space after a numbered unnamed remark is still small as originally.  If we redefine `\@thmcounterend` to choose between the two options above (`\def\@thmcounterend{\@ifnextchar\ {\hspace{2\fontdimen2\font plus2\fontdimen3\font minus2\fontdimen4\font}\@gobble}{ }}`), we get a small but unwanted vertical space after a line-long named-remark title as in Remark 6.

How to globally change the definitions of the involved macros and environments (while preserving the LaTeX-document contents) so that more horizontal space is inserted between the end of a remark title and the beginning of a remark body whenever they are on the same line (and introduce no extra space if they are on separate lines)?

I cannot help thinking that redefining some other macro than `\@thmcounterend` might work better but don't have enough knowledge to find such a macro and change it myself.

Crossposts: http://latex.org/forum/viewtopic.php?f=4&t=35426&p=118775 , https://texwelt.de/fragen/29112 , http://golatex.de/viewtopic.php?f=4&t=25009 , and http://tex.stackexchange.com/questions/678941 .


  [1]: http://tex.stackexchange.com/a/678928
  [2]: http://topanswers.xyz/tex?q=3768#a4007
  [3]: https://i.stack.imgur.com/VKCni.png

This room is for discussion about this question.

Once logged in you can direct comments to any contributor here.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.