我正在使用 Memoir 类(双面)和marginnote
。我想将scriptsize
边注的字体大小更改为(始终),并将样式更改为斜体(始终)。当我使用以下命令时:
\renewcommand\marginnote{\normalfont\scriptsize}
文本更改为脚本大小,而边注的边距保持不变(对于双面:左边注为不规则左对齐,居中对齐;右边注为不规则右对齐,居中对齐)。但是,如果我尝试添加\textit
字符串\renewcommand
(或textit
以任何方式使用,例如删除\normalfont\scriptsize
并替换为textit
),则不会获得斜体文本(字体样式会发生变化),并且边注的边距会变得混乱(例如,它们会恢复为以缩进开始的正常段落对齐方式)。
我确信解决方案很简单(新手),但相同类型的问题经常出现,所以我希望在尝试手册所建议的简单更改时,能够更深入地了解出现的问题。
这是一个 MWE:
\documentclass[letterpaper,twoside]{memoir}
\usepackage{marginnote}
\renewcommand\marginfont{%
\normalfont\scriptsize
}
\begin{document}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean porta nunc lorem, in efficitur diam posuere quis. Morbi in sapien nec purus iaculis fermentum quis vel dui. Donec id orci eu lectus pulvinar ullamcorper eu in metus. Suspendisse risus velit, pharetra sed auctor non, volutpat id dui. Nunc feugiat magna sed dolor posuere, non eleifend sapien posuere. \marginnote{This is a long enough for the text to wrap.}Nam eu iaculis leo, sed pulvinar tellus. Phasellus finibus ipsum vel nibh sollicitudin, in semper quam tempor. Quisque id purus est. Curabitur mauris turpis, finibus eget efficitur a, auctor in ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed porta, lacus sed bibendum auctor, mauris nisl porta risus, quis facilisis urna mauris nec massa. Fusce fringilla ipsum at ante fermentum volutpat vitae id nisi. Nam faucibus lorem mollis metus sodales fringilla. Quisque efficitur aliquet ipsum at bibendum. Maecenas nec libero hendrerit, cursus ante sit amet, interdum nisi.
\newpage
Cras molestie blandit convallis. Donec a diam porta massa lobortis vulputate in id tellus. Vivamus dignissim ut mi eu egestas. Nam aliquet ultricies porta. \marginnote{This is a long enough for the text to wrap.}Pellentesque sit amet enim ut mauris accumsan tristique vel posuere lorem. Cras ut tincidunt arcu. Aliquam porttitor sed massa ut pellentesque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse hendrerit enim quis commodo rhoncus.
\end{document}
答案1
您可以访问斜体文字通过命令喜欢
\textit{<italic text>}
或通过转变使用
\itshape <italic text>
后者通常用于某些范围,例如
<regular text> {\itshape <italic text>} <regular text>
但是,由于你的范围是预先定义的,所以你实际上并不需要这个。因此,我会选择
\renewcommand\marginfont{%
\normalfont\scriptsize\itshape
}