我想使用向下弯曲的箭头符号来表示“下一行继续”。我正在使用scalefnt
并间接从中获取符号来调整箭头的大小mnsymbol
,以避免软件包冲突。
\documentclass{memoir}
\usepackage{amsmath}
\usepackage{scalefnt}
% in order to not load package "mnsymbol":
\DeclareFontFamily{U}{MnSymbolA}{}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
<-6> MnSymbolA5
<6-7> MnSymbolA6
<7-8> MnSymbolA7
<8-9> MnSymbolA8
<9-10> MnSymbolA9
<10-12> MnSymbolA10
<12-> MnSymbolA12}{}
\newcommand*{\lcurvearrowdown}{\mathrel{\text{\usefont{U}{MnSymbolA}{m}{n}\symbol{187}}}}
\newcommand*{\nextlineref}{\raisebox{-1.25ex}[0pt][0pt]{\scalefont{1.25}\(\lcurvearrowdown\)}}
\begin{document}
This is text at normal size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx
\begin{small}
This is text at small size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx
\end{small}
\end{document}
我通常使用这个符号来表示“数学公式在下一行继续”,但这个例子使用文本,因为这足以说明问题:
虽然符号在small
上下文中是可伸缩的,位置 / 大小 / 与下一行的距离的组合看起来不一致:它更接近正常大小上下文中的字母“x”。为什么会这样?怎样纠正?顺便说一下,行间距在这里可能起到一定的作用。
(附录/小评论:刚才我意识到箭头可能不应该在视觉上那靠近“x”字母...无论如何,我的问题仍然完全一样,因为它是一致性我所问的;我刚刚注意到的可以通过\scalefont
和\raisebox
因素的正确组合轻松调整,我不会在这篇文章中改变,以避免混淆。)
答案1
这种奇怪行为背后的原因是,您没有结束受字体大小切换影响的组内的段落,因此应用\baselineskip
的与中的相同,\normalsize
从而产生了提到的不一致;一旦您结束组内的段落,就会\baselineskip
应用正确的值,问题就会消失:
\documentclass{memoir}
\usepackage{amsmath}
\usepackage{scalefnt}
% in order to not load package "mnsymbol":
\DeclareFontFamily{U}{MnSymbolA}{}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
<-6> MnSymbolA5
<6-7> MnSymbolA6
<7-8> MnSymbolA7
<8-9> MnSymbolA8
<9-10> MnSymbolA9
<10-12> MnSymbolA10
<12-> MnSymbolA12}{}
\newcommand*{\lcurvearrowdown}{\mathrel{\text{\usefont{U}{MnSymbolA}{m}{n}\symbol{187}}}}
\newcommand*{\nextlineref}{\raisebox{-1.25ex}[0pt][0pt]{\scalefont{1.25}\(\lcurvearrowdown\)}}
\begin{document}
This is text at normal size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx
{\small
This is text at \verb+\small+ size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}
{\footnotesize
This is text at \verb+\footnotesize+ size. \nextlineref \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}
\end{document}
顺便说一下,字体大小开关是没有参数的命令,例如{\small some text\par}
(括号是为了保持更改本地化,\par
以防使用多行并\baselineskip
应用适当的值)。
答案2
您可以使用\hookleftarrow
或 carriagereturn
(dingbat},例如
\newcommand\nextline{\raisebox{-1.25ex}[0pt][0pt]{$\hookleftarrow$}}
\newcommand\nextlines{\raisebox{-1ex}[0pt][0pt]{\small\carriagereturn}}
一位 MWE 表示:
\documentclass{memoir}
\usepackage{dingbat}
%\usepackage{scalefnt}
\newcommand\nextline{\raisebox{-1.25ex}[0pt][0pt]{$\hookleftarrow$}}
\newcommand\nextlines{\raisebox{-1ex}[0pt][0pt]{\small\carriagereturn}}
\begin{document}
This is text at normal size. \nextline \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\begin{small}
This is text at small size. \nextline \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\end{small}
\begin{footnotesize}
This is text at footnote size. \nextline \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\end{footnotesize}
This is text at normal size. \nextlines \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\begin{small}
This is text at small size. \nextlines \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\end{small}
\begin{footnotesize}
This is text at footnote size. \nextlines \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
\end{footnotesize}
\end{document}
答案3
您也可以使用通常的过度杀伤 该选项tikz
为您提供了调整箭头尖、颜色、线条样式等方面的所有灵活性tikz
。下面列出了一些选项:
代码:
\documentclass{memoir}
\usepackage{tikz}
\newcommand{\NextLineRef}[1][]{%
\tikz [overlay,remember picture] \draw [->, out=-10, in=20, distance=0.25cm, thick, #1]
(0,0.5ex) to (0,-1.25ex);
}
\begin{document}
This is text at normal size. \NextLineRef[red] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx
This is text at normal size. \NextLineRef[red, -latex, shorten >= -0.5ex] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx
{\small
This is text at \verb+\small+ size. \NextLineRef[orange, -latex, distance=1.5cm] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}
{\footnotesize
This is text at \verb+\footnotesize+ size. \NextLineRef[blue, densely dotted] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}
{\small
This is text at \verb+\small+ size. \NextLineRef[green, distance=1.5cm, out=5, in=10] \\
This is more text. xxxxxxxxxxxxxxxxxxxxxxx\par
}
\end{document}