我一直无法更改 revtex4-1 文档类的字体。具体来说,以下示例更改了除标题之外的所有内容的字体。
\documentclass[a4paper, reprint,amsmath,amssymb, aps]{revtex4-1}
\usepackage{cmbright}
\fontfamily{cmss}
%\usepackage[format=plain,justification=justified]{caption}
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\begin{document}
\title{The Title}
\author{The Author}
\maketitle
\section{Heading}
Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.
\begin{figure}
Insert figure here.
\caption{Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.}
\end{figure}
\end{document}
字幕包会自动更改字体并修复字幕的字体,但我听说它与 revtex4-1 不兼容。当我取消注释上面代码片段中的第五行时,字幕文本不再对齐。
我是否遗漏了某些内容来更改 revtex4-1 中的字幕字体?
谢谢,—本特利
答案1
你 应该 重新 定义\rmdefault
, 而 不是 去做\fontfamily{cmss}
.
我还添加了\sfdefault
另一行以避免出现虚假警告。
\documentclass[a4paper, reprint,amsmath,amssymb, aps]{revtex4-1}
\usepackage{cmbright}
\DeclareFontShape{OT1}{cmss}{m}{it}{<->ssub*cmss/m/sl}{}
\renewcommand{\rmdefault}{cmss}
\renewcommand{\sfdefault}{cmss}
\setlength{\parindent}{0em}
\setlength{\parskip}{1em}
\begin{document}
\title{The Title}
\author{The Author}
\maketitle
\section{Heading}
Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is
some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some
text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.
Here is some text. Here is some text. Here is some text. Here is some text. Here is some text. Here is
some text.
\begin{figure}
Insert figure here.
\caption{Here is some text. Here is some text. Here is some text. Here is some text. Here is some
text. Here is some text. Here is some text. Here is some text. Here is some text. Here is some text.
Here is some text. Here is some text.}
\end{figure}
\end{document}