LaTeX forum ⇒ Document ClassesWith svmono, how to introduce more horizontal space between the head and the body of a theorem?

Information and discussion about specific document classes and how to create your own document classes.
AlbertNashr
Posts: 2
Joined: Sat Mar 11, 2023 12:39 am

With svmono, how to introduce more horizontal space between the head and the body of a theorem?

Postby AlbertNashr » Sat Mar 11, 2023 12:50 am

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 (http://tex.stackexchange.com/a/678928) and @Skillmon (http://topanswers.xyz/tex?q=3768#a4007)):

\documentclass[twocolumn]{svmono}% v5.10 (2021/09/08) from http://www.springer.com/gp/authors-edit ... #toc-49268 or directly from http://resource-cms.springernature.com/ ... 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

mwe.png
mwe.png (222.77 KiB) Viewed 8685 times


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}}}), and 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: viewtopic.php?f=4&t=35426&p=118775 , https://texwelt.de/fragen/29112 , http://golatex.de/viewtopic.php?f=4&t=25009 , and http://topanswers.xyz/tex?q=3801 .
Last edited by AlbertNashr on Tue Mar 14, 2023 12:37 am, edited 12 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10232
Joined: Mon Mar 10, 2008 9:44 pm

With svmono, how to introduce more horizontal space between the head and the body of a theorem?

Postby Stefan Kottwitz » Sat Mar 11, 2023 1:03 am

Hi Albert,

welcome to the forum!

Stefan
LaTeX.org admin


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 5 guests