![更改对话包中的主字体](https://linux22.com/image/367543/%E6%9B%B4%E6%94%B9%E5%AF%B9%E8%AF%9D%E5%8C%85%E4%B8%AD%E7%9A%84%E4%B8%BB%E5%AD%97%E4%BD%93.png)
我正在使用该dialogue
软件包排版正文之间的一些对话。正文采用衬线字体,我希望对话以无衬线字体显示,并且尺寸小于正文。
对于较小的尺寸,我目前将对话环境封闭在一个小环境中,但尝试使用 sans 进行同样的操作却不起作用。但我需要将两者都设置为默认设置。在这方面可以做些什么?
平均能量损失
\documentclass{article}
\usepackage{dialogue}
\begin{document}
% {\textsf % this not working, all text should be in sans by default
\begin{small} % this works, but needs to be set by default for all
% text within dialogue
% \begin{textsf} % neither is this working
\begin{dialogue}
\speak{AJ} This is about the oil.
\speak{AA} What oil?
\speak{AJ} The oil that the current produced.
\end{dialogue}
%\end{textsf}
\end{small}
%}
\end{document}
答案1
您可以重新定义\PreDialogue
宏以包含字体开关,即
\renewcommand\PreDialogue{\sffamily\small}
\documentclass{article}
\usepackage{dialogue}
\renewcommand\PreDialogue{\sffamily\small}
\begin{document}
Text before dialogue.
\begin{dialogue}
\speak{AJ} This is about the oil.
\speak{AA} What oil?
\speak{AJ} The oil that the current produced.
\end{dialogue}
Text between dialogue.
\begin{dialogue}
\speak{AJ} This is about the oil.
\speak{AA} What oil?
\speak{AJ} The oil that the current produced.
\end{dialogue}
\end{document}