使用 svmono 时,如何将 halmos 放入 H 型图形的标题中?

使用 svmono 时,如何将 halmos 放入 H 型图形的标题中?

假设您想在非浮动图形的最后一行放置一个类似于定理的环境结束符号。到目前为止,我们尝试使用已有的代码将符号放在后面\end{center}

\documentclass{svmono}% V5.10 from https://resource-cms.springernature.com/springer-cms/rest/v1/content/20566/data/monographs .  For testing purposes, I hope, book would do as well.
\usepackage[showframe,showcrop]{geometry}
\usepackage{amssymb,newtxtext,newtxmath}
\usepackage{float,placeins}
\makeatletter
\newcommand{\textHalmosEndingNonProofSymbol}{\(\blacksquare\)}
\newcommand*{\textHalmosEndingNonProof}{{\unskip\nobreak\hfil\penalty50\hskip1em\null\nobreak\hfil\textHalmosEndingNonProofSymbol\parfillskip=\z@\finalhyphendemerits=0\endgraf}}
\newlength\lastSkipOfEndCenter
\newcommand*{\textHalmosEndingNonProofAfterCenter}{\setlength\lastSkipOfEndCenter{\lastskip}\removelastskip\nopagebreak\par\nopagebreak\vspace{\dimexpr-\baselineskip-\parskip\relax}\nopagebreak\textHalmosEndingNonProof\vskip\lastSkipOfEndCenter}
\makeatother
\begin{document}
\chapter{Chapter}
\FloatBarrier
\begin{figure}[H]\centering
  Drawing 1
  \caption{A long line as the caption so that you see that the vertical placement of the halmos symbol is by no means ideal, right?}%
\end{figure}%
\textHalmosEndingNonProofAfterCenter
\FloatBarrier
\begin{figure}[H]\centering
  Drawing 2
  \caption{A short caption\textHalmosEndingNonProof}%
\end{figure}%
\end{document}

从输出中可以看到

输出

这里有几个问题:

  1. 在图 1.1 的标题中,■ 与文本重叠

  2. 在图 1.1 的标题中,■ 有点太低了。

  3. 在图 1.2 的标题中,■ 太靠左,而它应该右对齐。

如何将块终止符号或字符串(我们使用 halmos ∎ 来终止非证明,使用“qed”来终止证明)正确地放入标题中™?我们还假设您想避免使用具体的长度,例如-1ex\vspace{-1ex}因为您的字体和距离在编辑或发布过程中可能会发生变化。顺便说一句,使用marginnote是不可行的(因为这个包在我们更大、非最小的示例中会引起不相关的重叠)。

答案1

在此处输入图片描述

\documentclass{svmono}% V5.10 from https://resource-cms.springernature.com/springer-cms/rest/v1/content/20566/data/monographs .  For testing purposes, I hope, book would do as well.
\usepackage[showframe,showcrop]{geometry}
\usepackage{amssymb,newtxtext,newtxmath}
\usepackage{float,placeins}

\newcommand{\textHalmosEndingNonProofSymbol}{\(\blacksquare\)}

\begin{document}
\chapter{Chapter}
% doing nothing here \FloatBarrier
\begin{figure}[H]\centering
  Drawing 1
  \caption[cap with no halmos]{A long line as the caption so that you see that the vertical placement of the halmos symbol is by no means ideal, right?%
\penalty-100\mbox{}\quad\nobreak\hfill\nobreak\textHalmosEndingNonProofSymbol}%
\end{figure}%

% doing nothing here \FloatBarrier
\begin{figure}[H]\centering
  Drawing 2
  \caption[cap with no halmos]{A short caption%
\penalty-100\mbox{}\quad\nobreak\hfill\nobreak\textHalmosEndingNonProofSymbol}%
\end{figure}%
\end{document}

相关内容