add tag
Continuing , 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 or directly from
    \noindent Remark with a short name:
    \begin{remark}[Short name]
      Body of a remark with a short name.
    Remark without a special name:
      Body of an unnamed 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.
    \section*{Redefining \texttt{\textbackslash @thmcounterend}}
    \makeatletter\def\@thmcounterend{\@ifnextchar\ {\hspace{2\fontdimen2\font plus2\fontdimen3\font minus2\fontdimen4\font}\@gobble}{ }}\makeatother

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: , , , and .


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.