5

I'm trying to figure out why the line number package in latex causes a warning message. Once I add lineno package in my preamble, I receive the following message:

./lineno.sty: LaTeX Warning: Command \@parboxrestore has changed. Check if current package is valid.

Have anyone received a similar message and if so how to solve it?

Many thanks for your comments!

A minimal working example:

\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}

PDF view

3
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem (with the offending package call). Reproducing the problem and finding out what the issue is will be much easier when we see "compilable" code, starting with \documentclass{...} and ending with \end{document}. Commented Aug 22, 2018 at 10:44
  • Done! MWE is included now Commented Aug 22, 2018 at 11:25
  • I placed both packages under \postdate{\par\end{flushleft}\vskip 0.5em} and deleted hyperref from where it was together with lineno but nothing changed. The warning message still appears. Commented Aug 22, 2018 at 11:39

1 Answer 1

7

lineno contains the line

\CheckCommand*\@parboxrestore{\@arrayparboxrestore\let\\\@normalcr}

which checks the definition of \@parboxrestore against its second argument. However, csquotes does

\appto\@parboxrestore{\blx@parboxrestore}

so the check will fail if csquotes is loaded before lineno.

The warning can be thus avoided by loading lineno first and csquotes afterwards. (Note that you are loading csquotestwice, and hyperref should be loaded last.)

1
  • I think, I solved the problem. The doubled use of the csquotes, which I haven't realized, and your suggestion of the order fixed the warning message. I changed the code above so that it works perfectly. Many thanks for your feedback. Commented Aug 22, 2018 at 12:01

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.