圣经中经常会印有章节编号,其格式与该软件包生成的下拉大写字母非常相似lettrine
。因此,该软件包可用于插入章节编号。当章节的开头与新段落的开头重合时,这种方法非常有效。
但有时某些章节分隔符出现在段落内,在这种情况下,章节号仍应打印,段落文本环绕其周围。我对此没有很好的解决方案。我尝试了wrapfig
,但遇到了一些问题。我仍然对 感到很幸运lettrine
,但我必须手动将章节命令放在换行符应该出现的位置。(实际上我必须输入 来\linebreak
强制对齐上一行,然后输入\vspace
来消除不需要的额外行。
有什么方法可以\mychapter{}
在实际章节的开头发出调用(“从内部......”)并让段落环绕章节号?
也许我应该问,我想要的东西是否存在根本性的障碍。这需要修改多于在许多情况下,插入点。这可能吗,或者当 Tex 到达宏时(如果放置在我希望放置的位置),这艘船已经启航了吗?
\documentclass{article}
\usepackage{lettrine}
\newcommand\mychapter[1]{\lettrine[nindent=0pt,findent=1em]{#1}{}}
\begin{document}
\dots\ At this the men greatly feared the Lord, and they
offered a sacrifice to the Lord and made vows to him.
Now the Lord provided a huge fish to swallow Jonah, and Jonah was in%
\linebreak\vspace{-\baselineskip}% force line above to justify
\mychapter{2}%
the belly of the fish three days and three nights.
% Chapter 2 actually starts here, would like to put \mychapter{} call here
From inside the
fish Jonah prayed to the Lord his God. He said: \dots
\end{document}
答案1
Letterine 使用\hangindent
,它只能在段落开头使用。诀窍是使其\par
看起来像\linebreak
。
\documentclass{article}
\usepackage{lettrine}
\newcommand\mychapter[1]{\lettrine[nindent=0pt,findent=1em]{#1}{}}
\newcommand{\nopar}{\strut{\parfillskip=0pt\parskip=0pt\par}}
\begin{document}
\dots\ At this the men greatly feared the Lord, and they
offered a sacrifice to the Lord and made vows to him.
Now the Lord provided a huge fish to swallow Jonah, and Jonah was in\nopar
\mychapter{2}%
the belly of the fish three days and three nights.
% Chapter 2 actually starts here, would like to put \mychapter{} call here
From inside the
fish Jonah prayed to the Lord his God. He said: \dots
\end{document}