0

I am having some problem with lineno. Specifically, this happens when I introduce the first equation in my document. I the following example I get a wrong numbering of text lines in the latex resulting pdf. In particular, in all "bla bla" part the numbering is missing.

I will try to make myself clear.

(I apologize to everyone for my previous and wrong post)

Here the example:

\documentclass[review,10pt]{elsarticle}
\usepackage{lineno}

\usepackage{amsmath}
\usepackage{amssymb}

\linenumbers

\begin{document}

\section{bla abcd}
bla bla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla blabla bla 
%
%
\begin{equation}\label{eq.2d.hy}
1+1=2
\end{equation}
%

abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd 

\end{document}

This example works only if I comment the equation or either \usepackage{amsmath} \usepackage{amssymb}.

However, I need both amsmath and amssymb packages.

What I am experiencing is a generla problem or is related only to elsevier package?

Thanks in advance for any kind of help.

Diedro

3
  • tex.stackexchange.com/questions/25784/… does that help? – Willie Wong Oct 16 '20 at 20:53
  • 1
    From rst if those sections look strange, secondly, lineno has a manual, might be worth a read. Additionally, please always post full minimal examples not sniplets like this that others cannot test without having to add stuff to them – daleif Oct 16 '20 at 20:53
  • 1
    Welcome to TeX.SX! If I turn your code fragments into a compilable minimal working example (MWE) by adding a documentclass as well as the relevant packages and commands and by correcting the wrong syntax of \section(it should be \section{test} instead), I end up with the following output: i.stack.imgur.com/rCMAB.png If you also want the equation to get a line number, add the mathlines option to the lineno package. – leandriis Oct 16 '20 at 20:55
0

Your MWE works me without any issues, but please follow the order of packages given below:

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[mathlines]{lineno}

Option mathlines will helps you to get the linenumber in display math, hope this will solve the issue...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.