我试图弄清楚为什么 latex 中的行号包会导致警告消息。一旦我lineno
在序言中添加包,我就会收到以下消息:
./lineno.sty: LaTeX Warning: Command \@parboxrestore has changed. Check if current package is valid.
有人收到过类似的消息吗?如果是的话如何解决?
非常感谢您的评论!
一个最小的工作示例:
\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage{lineno}
\usepackage [autostyle, english = american]{csquotes} % US EN quotation marks
\MakeOuterQuote{"}
\usepackage{hyperref}
\topmargin 0.02cm
\oddsidemargin 0.2cm
\textwidth 16cm
\textheight 21cm
\footskip 1.0cm
\newenvironment{sciabstract}{%
\begin{quote}
\end{quote}}
\newcounter{lastnote}
\newenvironment{scilastnote}{%
\setcounter{lastnote}{\value{enumiv}}%
\addtocounter{lastnote}{+1}%
\begin{list}%
{\arabic{lastnote}.}
{\setlength{\leftmargin}{.22in}}
{\setlength{\labelsep}{.5em}}}
{\end{list}}
\usepackage[natbibapa]{apacite}
\usepackage{setspace} %\singlespacing
\usepackage{graphicx}
\usepackage{listings}
\usepackage{framed}
\usepackage{xcolor}
\usepackage{amsmath}
\colorlet{shadecolor}{gray!20}
\usepackage[skins]{tcolorbox}
\usepackage{multirow}
\usepackage{lipsum}
\usepackage{ulem}
\usepackage{authblk}
\usepackage{titling}
\pretitle{\begin{flushleft}\LARGE\bfseries}
\posttitle{\par\end{flushleft}}
\preauthor{\begin{flushleft}\large}
\postauthor{\par\end{flushleft}}
\predate{\begin{flushleft}}
\postdate{\par\end{flushleft}\vskip 0.5em}
\title{Internal affairs under the microscope of the Moon Department}
\author{\vspace{12pt} John Star}
\affil{Moon University, Moon}
\date{}
\begin{document}
\linenumbers
\maketitle
\begin{sciabstract}
\small
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
\
\onehalfspacing
\noindent
\textbf{Keywords:} bbbb,bbbb,bbbb,bbbb
\end{sciabstract}
\
\onehalfspacing
\section{Introduction}
cccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccc
\end{document}
答案1
lineno
包含行
\CheckCommand*\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}
\@parboxrestore
它根据第二个参数检查 的定义。csquotes
然而,
\appto\@parboxrestore{\blx@parboxrestore}
csquotes
因此如果在之前加载,检查将失败lineno
。
lineno
这样,通过先 加载后加载,即可避免出现警告csquotes
。(请注意,您要加载csquotes
两次,因此hyperref
应该最后加载。)