我使用 achemso 软件包(Texlive 2020)为美国化学学会杂志撰写了一篇文章。提交后,他们还要求我提供带有行号的 pdf 文件。我把 放在了\usepackage{lineno}
序言中,把命令\linenumbers
放在了文本中,把命令放在了环境中的\internallinenumbers
之前。一切似乎都很好,但更好的是,我看到结果显示,每个图标题的最后一行都有两个数字重叠。使用 achemso-demo.tex 文件并插入上述行号说明时也会出现此问题。有人知道怎么解决这个问题吗?谢谢。这里有一个小例子,编译后,将数字 14 和 15 重叠在了图标题的行上。\caption
\begin{figure]
\documentclass[journal=jacsat,manuscript=article]{achemso}
\usepackage{chemformula} % Formula subscripts using \ch{}
\usepackage[T1]{fontenc} % Use modern font encodings
\newcommand*\mycommand[1]{\texttt{\emph{#1}}}
\author{I. Ken Groupleader}
\email{[email protected]}
\phone{+123 (0)123 4445556}
\fax{+123 (0)123 4445557}
\affiliation[Unknown University]
{Department of Chemistry, Unknown University, Unknown Town}
\title[An \textsf{achemso} demo]
{A demonstration of the \textsf{achemso} \LaTeX\
class}
\abbreviations{IR,NMR,UV}
\keywords{American Chemical Society, \LaTeX}
\usepackage{lineno}
\begin{document}
\linenumbers
\begin{abstract}
This is an example document for the \textsf{achemso} document
class, intended for submissions to the American Chemical Society
for publication.
\end{abstract}
\section{Introduction}
This is a paragraph of text to fill the introduction of the
demonstration file.
\section{Results and discussion}
\subsection{Outline}
The document layout should follow the style of the journal concerned.
Where appropriate, sections and subsections should be added in the
normal way.
\subsection{Floats}
New float types are automatically set up by the class file. The
means graphics are included as follows (Scheme~\ref{sch:example}). As
illustrated, the float is ``here'' if possible.
\begin{scheme}
Your scheme graphic would go here: \texttt{.eps} format\\
for \LaTeX\, or \texttt{.pdf} (or \texttt{.png}) for pdf\LaTeX\\
\textsc{ChemDraw} files are best saved as \texttt{.eps} files:\\
these can be scaled without loss of quality, and can be\\
converted to \texttt{.pdf} files easily using \texttt{eps2pdf}.\\
%\includegraphics{graphic}
\caption{An example scheme}
\label{sch:example}
\end{scheme}
\begin{figure}
As well as the standard float types \texttt{table}\\
and \texttt{figure}, the class also recognises\\
\texttt{scheme}, \texttt{chart} and \texttt{graph}.
\internallinenumbers
\caption{An example figure}
\label{fgr:example}
\end{figure}
Charts, figures and schemes do not necessarily have to be labelled or
captioned. However, tables should always have a title. It is
possible to include a number and label for a graphic without any
title, using an empty argument to the \texttt{\textbackslash caption}
macro.
\end{document}
答案1
中所做的操作\caption
似乎使lineno
包混乱。由于 achemso 文档类加载了 caption 包,因此可以尝试将 移动到\internallinenumbers
标题文本内部(而不是将其放在 前面\caption
),例如通过将其声明并应用为标题字体:
\documentclass[journal=jacsat,manuscript=article]{achemso}
\usepackage{chemformula} % Formula subscripts using \ch{}
\usepackage[T1]{fontenc} % Use modern font encodings
\newcommand*\mycommand[1]{\texttt{\emph{#1}}}
\author{I. Ken Groupleader}
\email{[email protected]}
\phone{+123 (0)123 4445556}
\fax{+123 (0)123 4445557}
\affiliation[Unknown University]
{Department of Chemistry, Unknown University, Unknown Town}
\title[An \textsf{achemso} demo]
{A demonstration of the \textsf{achemso} \LaTeX\
class}
\abbreviations{IR,NMR,UV}
\keywords{American Chemical Society, \LaTeX}
\usepackage{lineno}
\DeclareCaptionFont{linenumbers}{\internallinenumbers}
\captionsetup[figure]{font+=linenumbers} % use \internallinenumbers inside figure caption texts
\begin{document}
\linenumbers
\begin{abstract}
This is an example document for the \textsf{achemso} document
class, intended for submissions to the American Chemical Society
for publication.
\end{abstract}
\section{Introduction}
This is a paragraph of text to fill the introduction of the
demonstration file.
\section{Results and discussion}
\subsection{Outline}
The document layout should follow the style of the journal concerned.
Where appropriate, sections and subsections should be added in the
normal way.
\subsection{Floats}
New float types are automatically set up by the class file. The
means graphics are included as follows (Scheme~\ref{sch:example}). As
illustrated, the float is ``here'' if possible.
\begin{scheme}
Your scheme graphic would go here: \texttt{.eps} format\\
for \LaTeX\, or \texttt{.pdf} (or \texttt{.png}) for pdf\LaTeX\\
\textsc{ChemDraw} files are best saved as \texttt{.eps} files:\\
these can be scaled without loss of quality, and can be\\
converted to \texttt{.pdf} files easily using \texttt{eps2pdf}.\\
%\includegraphics{graphic}
\caption{An example scheme}
\label{sch:example}
\end{scheme}
\begin{figure}
As well as the standard float types \texttt{table}\\
and \texttt{figure}, the class also recognises\\
\texttt{scheme}, \texttt{chart} and \texttt{graph}.
%\internallinenumbers => moved to caption font "linenumbers"
\caption{An example figure}
\label{fgr:example}
\end{figure}
Charts, figures and schemes do not necessarily have to be labelled or
captioned. However, tables should always have a title. It is
possible to include a number and label for a graphic without any
title, using an empty argument to the \texttt{\textbackslash caption}
macro.
\end{document}