3

The following is the following but I want the text is in one column, not in two:

enter image description here

Reproduction of gap between linenumbers

\documentclass{article} % [conference]{IEEEtran}

\usepackage[mathlines]{lineno}
\usepackage{textcomp} 
\usepackage{siunitx}

\usepackage{mathtools, amssymb}
\usepackage{unicode-math} 

\linenumbers
\begin{document}

\subsection*{Electron Avalanche in GEM Foils}
There are several simplifications made in simulating the electron avalanche in GEM foils. 
There is only multiplication from electron collision. 
There is no electron lost to negative ion formation. 
The space charge effects are negligible. 
%
%
\begin{equation}
Q = n_{0} e M
\end{equation}
%
where $e$ is the electron change, and $M$ is the average \emph{gas multiplication factor} that characterizes the counter operation. 

\end{document}

gives

enter image description here

How can you have those small numbers at the side for the review at one column?

1

You can use lineno package

\documentclass[conference]{IEEEtran}
\usepackage{lipsum}
\usepackage[mathlines,switch]{lineno}


\title{The title}
\author{The authors}
\linenumbers
\begin{document}
\maketitle
\lipsum[1]
\[x=y\]
\lipsum
\end{document}

enter image description here

The package options mathlines puts numbers to equations and switch puts the numbers in the outer margin.

For one column, just switch to article class.

\documentclass{article}
\usepackage{lipsum}
\usepackage[mathlines]{lineno}


\title{The title}
\author{The authors}
\linenumbers
\begin{document}
\maketitle
\lipsum[1]
\[x=y\]
\lipsum
\end{document}

enter image description here

Edit

To answer for the comment, you have to load lineno after mathtools so that the definitions of equation environments (made by linenopackage) are not over written by mathtools.

\documentclass{article} % [conference]{IEEEtran}

\usepackage{textcomp}
\usepackage{siunitx}

\usepackage{mathtools, amssymb}
\usepackage[mathlines]{lineno}   %<---- here
\usepackage{unicode-math}

\linenumbers
\begin{document}

\subsection*{Electron Avalanche in GEM Foils}
There are several simplifications made in simulating the electron avalanche in GEM foils.
There is only multiplication from electron collision.
There is no electron lost to negative ion formation. 
The space charge effects are negligible.
%
%
\begin{equation}
Q = n_{0} e M
\end{equation}
%
where $e$ is the electron change, and $M$ is the average \emph{gas multiplication factor} that characterizes the counter operation.

\end{document}

enter image description here

  • 1
    @Masi I am not able to reproduce the result. Can you post the code that does this? – user11232 Sep 8 '15 at 23:04
  • @Masi: please see the edit. – user11232 Sep 9 '15 at 5:43
0

Some preview of answers about Why doesn't lineno number a paragraph when it is followed by an “align” equation environment without a space?:

[#1] Some gaps of lines and Harish's answer

Both answer lead to surprising gaps in different contents. Harish's answer works in simple Mathematical environments where no new declarations is made. The former's code reproduced here:

\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
  \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
  \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
  \renewenvironment{#1}%
     {\linenomath\csname old#1\endcsname}%
     {\csname oldend#1\endcsname\endlinenomath}}% 
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
  \patchAmsMathEnvironmentForLineno{#1}%
  \patchAmsMathEnvironmentForLineno{#1*}}%
\AtBeginDocument{%
\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}

which skips some lines of big files, especially with Math, for example:

enter image description here

#2 Numbers everything but get clustered sometimes

\newcommand*\patchAmsMathEnvironmentForLineno[1]{%
  \expandafter\let\csname old#1\expandafter\endcsname\csname #1\endcsname
  \expandafter\let\csname oldend#1\expandafter\endcsname\csname end#1\endcsname
  \renewenvironment{#1}%
     {\linenomath\csname old#1\endcsname}%
     {\csname oldend#1\endcsname\endlinenomath}}% 
\newcommand*\patchBothAmsMathEnvironmentsForLineno[1]{%
  \patchAmsMathEnvironmentForLineno{#1}%
  \patchAmsMathEnvironmentForLineno{#1*}}%
\AtBeginDocument{%
\patchBothAmsMathEnvironmentsForLineno{equation}%
\patchBothAmsMathEnvironmentsForLineno{align}%
\patchBothAmsMathEnvironmentsForLineno{flalign}%
\patchBothAmsMathEnvironmentsForLineno{alignat}%
\patchBothAmsMathEnvironmentsForLineno{gather}%
\patchBothAmsMathEnvironmentsForLineno{multline}%
}

giving sometimes clusters like

enter image description here

Comments

I think mbudisic's answer is most appropriate when no lines cannot be skipped, like in my case, for cooperative work. Partial numbering is challenging for commenting Mathematics.

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.