PDF 是双面打印的。问题是,编译产生了一个意外的空白页,即第 53 页。奇怪的是,应该在倒数第二页的脚注出现在这个空白页上,即第 53 页。(见下面的截图。)
我把这个位移动到了论文的不同位置,它总是在 PDF 文件的最后一页周围产生一两页空白页。我还在本地计算机上编译了这些文件。它也产生了一个空白的结束页,并且无法生成任何参考书目,而且没有任何错误。
类文件以及其他相关文件可以从期刊网站下载。该类文件是该页面列表中的第一个文件。
由于报告了错误并解决了,因此按建议修改了工作环境:错误原因. 另一个相关链接:CL 样式文件的问题
我使用修改后的工作环境以及 CL 手册中的一小段文本重现了该问题。问题如下:顺便说一句,我在 Overleaf 上使用 PdfLaTex (2020 Lagacy)。此外,当我尝试在本地编译它时,由于缺少信息,PDF 文档只有 2 页长。我的印象是它必须超过两页,这样才会出现问题。
代码如下:
% if your latex compiler failed to compile, uncomment the command below:
%\RequirePackage[2020-02-02]{latexrelease}
%\documentclass{clv3}
%% the fllowing is the suggested change at : https://tex.stackexchange.com/questions/688299/latex-error-command-numdef-already-defined?noredirect=1#comment1707626_688299
% save the kernel \document and \enddocument
\let\latexdocument\document
\let\latexenddocument\enddocument
%%%
\documentclass{clv3}
% restore the original below \docucumentclass{clv3}
\let\document\latexdocument
\let\enddocument\latexenddocument
% add to the standard hooks
\makeatletter
\AtBeginDocument{%
\if@filesw
\immediate\openout\@mainqry=\jobname.qry
\fi
}
\AtEndDocument{%
\ifx\@biography\@empty\else{\par\ifbrief\vskip10pt\fi\biofont\noindent\@biography\par}\fi
\immediate\closeout\@mainqry
%\ifquery
% \process@queries\clearpage
%\else
\ifodd\c@page\clearpage\thispagestyle{empty}\null\clearpage\else\clearpage\fi
%\fi
%\ifquery\clearpage\else\ifodd\c@page\clearpage\thispagestyle{empty}\null\clearpage\else\clearpage\fi\fi
}
\makeatother
% alias numdef to cnumdef
%\NewCommandCopy{\cnumdef}{\numdef}
%\NewCommandCopy{\endcnumdef}{\endnumdef}
\let\numdef\relax \let\endnumdef\relax
%% above is the suggested change
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{xltabular}
\usepackage{makecell}
\usepackage{metalogo}
\usepackage{array}
\usepackage{tabto}
%the following is for tree-drawing
\usepackage[linguistics]{forest}
\usepackage{amssymb}
% the following two lines are added by the author to show Chinese characters
%
\usepackage{CJKutf8}
\usepackage{linguex}
\usepackage{hyperref}
% nicer emptyset
\let\oldemptyset\emptyset
\let\emptyset\varnothing
\usepackage{xcolor}
\definecolor{darkblue}{rgb}{0, 0, 0.5}
\hypersetup{colorlinks=true,citecolor=darkblue, linkcolor=darkblue, urlcolor=darkblue}
\bibliographystyle{compling}
\begin{document}
\issue{1}{1}{2016}
%Document Head
\dochead{CLV3 Class File Manual}
\runningtitle{How to Use CLV3 \LaTeX\ Class File}
\runningauthor{Odi\'e N. Gementera}
\pageonefooter{Action editor: \{action editor name\}. Submission received: DD Month YYYY; revised version received: DD Month YYYY; accepted for publication: DD Month YYYY.}
\title{How to Use CLV3 \LaTeX\ Class File}
\author{Odi\'e N. Gementera\thanks{PITC Building, Pascor Drive, Sto. Ni\~no, Para\~naque City, 1700 Philippines. E-mail: [email protected].}}
\affil{Publishing / SPi}
\author{Another Author\thanks{PITC Building}}
\affil{Publishing / SPi}
\author{And Another Author}
\affil{Publishing / SPi}
\author{And Yet Another}
\affil{Publishing / SPi}
\maketitle
\begin{verbatim}
\begin{abstract}
This is the abstract text . . .
\end{abstract}
\end{verbatim}
\section{Citations}
Citations in parentheses are declared using the \verb|\cite{}|
command, and appear in the text as follows:
This technique is widely used \cite{woods}.
The command \verb|\citep{}| (cite parenthetical) is a synonym of \verb|\cite{}|.
Citations used in the sentence are declared using the \verb|\namecite{}|
commands, and appear in the text as follows:
\namecite{woods} first described this technique.
The command \verb|\citet{}| (cite textual) is a synonym of \verb|\namecite{}|.
This style file is designed to be used with the BibTeX
style file \verb|compling.bst|. Include the command
\verb|\bibliographystyle{compling}| in your source file.
Citation commands are based on the \verb|natbib| package;
for details on options and further variants of the commands,
see the \verb|natbib| documentation. In particular, options
exist to add extra text and page numbers. For example,
\verb|\cite[cf.][ch.\ 1]{winograd}| yields: \cite[cf.][ch.\ 1]{winograd}.
The following examples illustrate how citations appear both in the text
and in the references section at the end of this document.
\begin{enumerate}
\item Article in journal:
\namecite{akmajian};
\namecite{woods}.
\item Book:
\namecite{altenberg};
\namecite{winograd}.
\item Article in edited collection/Chapter in book:
\namecite{cutler};
\namecite{sgall};
\namecite{jurafsky}.
\item Technical report:
\namecite{appelt};
\namecite{robinson}.
\item Thesis or dissertation:
\namecite{baart};
\namecite{spaerckjones};
\namecite{cahn}.
\item Unpublished item:
\namecite{ayers}.
\item Conference proceedings:
\namecite{benoit}.
\item Paper published in conference proceedings:
\namecite{krahmer};
\namecite{Copestake2001}.
\end{enumerate}
\section{Definition with Head}
Definition with head is declared by using the environment:
\\
\begin{verbatim}
\begin{definition}
Definition text. . .
\end{definition}
\end{verbatim}
This environment will generate the word {\bf ``Definition 1''} in bold on separate
line. The sequence number is generated for every definition environment. Definition
data will have no indention on the first line while succeeding lines will have hang
indention.
\section{Others}
Other items such as Equations, Figures, Tables and References are produced in
the standard \LaTeX\ typesetting.\footnote{Please mind the odd position of this footnote.}
\starttwocolumn
\bibliography{compling_style}
\end{document}
提前谢谢啦!~~~
答案1
要解决您的问题,您需要删除\starttwocolumn
参考书目之前的。然后,将以下代码插入到您的序言中:
\usepackage{multicol}
\renewcommand{\bibpreamble}{\begin{multicols}{2}}
\renewcommand{\bibpostamble}{\end{multicols}}
(受到之前问题的启发)这应该可以解开你的神秘页面问题。
谜团背后的罪魁祸首
上面的代码就是解决问题所需的全部代码。但是,如果你想深入了解为什么该类clv3
无法处理出现在参考书目之前的脚注,罪魁祸首就是,这是该类中用于创建两列参考书目的\starttwocolumn
自定义宏。在类文件中,它被定义为clv3
clv3
\newbox\partialpage
\def\starttwocolumn{%
{\output={\global\setbox\partialpage=\vbox{\unvbox255}}\newpage}%
\twocolumn[\unvbox\partialpage\vspace{\@twocolsep}]%
}
这段代码实际上做了什么?首先,它创建了一个名为 的新框\partialpage
。当调用该宏时\starttwocolumn
,TeX 会执行一个称为输出例程的操作,这就是 TeX 知道在分页之前要插入多少内容的方式。所有这些内容都存储在一个编号为 的特殊框中\box255
。
我自己对它的工作细节也不太清楚,但看起来 TeX 会在页面结束前(\newpage
)取出页面上的所有文本,将其解包并重新打包(\vbox{\unvbox255}
),然后将其保存到 中\partialpage
。到例程结束时\output
,方框 255 已清空。但是,脚注的内容不会保存到 中,\partialpage
因为 LaTeX 在页面构建后排版脚注。因此,脚注会像平常一样排版到原本空白的页面上。因为在下一页上\twocolumn
解包,所以所有内容\partialpage
将有之前在上一页的内容现在出现在新页面上。这给人的印象是除了脚注外,整页都被跳过了。