Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [line-numbering]

{line-numbering} is about numbering the text lines of documents or parts of them. Popular packages are `lineno` and {ledmac}.

2
votes
1answer
74 views

Context images / figures and linenumbering

When typesetting a document with linenumbering, I get heavy problems with images. The linenumbering becomes a mess. What do I do wrong? Here is an MWE: \setuppapersize[A5] \setupexternalfigures[...
1
vote
1answer
22 views

Line numbering for all lines of pseudocode algorithm in Lyx

I am trying to add an algorithm in pseudocode within LyX in version 2.3.2 as described here. Add the \usepackage{algorithm,algpseudocode} into the preamble Insert a algorithm block (Insert --> ...
5
votes
1answer
53 views

Switch off Old Number otf feature for line numbering in ConTeXt

I am using OldNumber features in my presentations, because I like them (de gustibus…). However they look quite odd when used to number lines. What should I do to have lines numbered the standard way ...
1
vote
0answers
63 views

reledmac - no columns - different linenumbers in left and right margin

I don't know if this is even possible but it never hurts to ask: I am transcribing a medieval Dutch manuscript in which text is displayed in two columns. I have to display it in one continuous text. ...
0
votes
1answer
41 views

reledmac linenumbers inside of the print space

Using the reledmac package I have trouble with putting the linenumbers inside of the print space (cf. picture). The code in the preamble is now simply: \usepackage[parfill]{parskip} \usepackage[...
0
votes
1answer
42 views

How to skip lines in lstlisting with dots? [duplicate]

I am wondering if package listings has a feature that can skip a few lines and substitute them with some dots, to produce something like the following 1 | error_temp = error - ((numpy.linalg.norm(b,...
0
votes
1answer
29 views

How to align horizontally line numbers with package algorithm2e

I'm trying to write an algorithm using the package algorithm2e. This is my code: \usepackage[linesnumbered,ruled]{algorithm2e} ... {\footnotesize \IncMargin{1em} \begin{algorithm}[H] \...
3
votes
1answer
23 views

usepackage[modulo]{lineno} - need also linenumber on line 1

I use lineno to number my lines, obviously. I need a number every 5 lines so I enabled the option modulo. But, because 1 mod 5 <> 0, the firstline does not get numbered. And as you already ...
3
votes
2answers
67 views

lstlisting - line number gaps

Is it possible to add non-number characters on the left of a code block? Specifically, I want to add ... to correspond with some source code (see image). I am currently using commands to stop / ...
0
votes
1answer
59 views

lineno workaround reset impossible using pagewise/switch etc

I'm having a difficulty/impossibility with the lineno package. What I want to write is a book, so double-sided, with different sections each anew beginning at 1. So the setup is quite simple and ...
4
votes
2answers
118 views

Hexadecimal line numbers in listings

Is it possible to introduce hexadecimal line numbers in steps of two using the listings package? In the MWE \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{...
3
votes
1answer
152 views

Bible verse numbers in margin with reledmac

I'm trying to achieve something like this layout, a Bible text with verse numbers in the margins: In addition, I need footnotes linked to the verse numbers. I'm trying to make that work in reledmac, ...
0
votes
1answer
41 views

Numbering lines in an document

I wanna set some numbers at the end of an line but dont know how? Dont just wanna number some equations (for that i use "align") but in an text, if there is an important statement i wanna refer to ...
0
votes
0answers
37 views

Text overwriting line number in algorithmic environment - Solved

Below is a MWE consisting of two small algorithms demonstrating how the unnecessary use of {...} environment can cause unexpected behavior from LaTeX, i.e., overwriting line number as shown in the ...
1
vote
1answer
78 views

Continuous line numbering in lstlisting, but separate lsttableoflistings entries?

i'd like to use the name=something,firstlinenumber=auto function for continuous line numbering throughout a couple of subsequent listings in my document. I'd also like to have each of the listings ...
5
votes
2answers
194 views

How to use lineno with amsmath align?

Is there a way to have lineno show line numbers for a paragraph that uses the align environment? In the following example, the (first) paragraph that ends with \begin{align} ... \end{align} does not ...
0
votes
1answer
35 views

How to remove line numbering when using copernicus.cls

The copernicus.cls style file adds line numbering to the manuscript. I would to remove it so I can convert the pdf to word more easily (and thus share with some co-authors), however I can't seem to ...
2
votes
1answer
37 views

How to restart numbering of lines in “reledpar” package

I'm trying to learn how to use the package "reledpar". In particular I would like to have multiple texts on a page and their translations on the facing page. Thus I saw that using reledpar package (...
0
votes
1answer
75 views

Information showing up only on the first page

I'm running latex files on my device. These are the first few lines of the file: \documentclass[sigconf, anonymous, review]{acmart} \usepackage{adjustbox} \usepackage{array,booktabs} \usepackage{...
0
votes
1answer
46 views

How to force \linenumbers ignore figures in the text

I would like to include figures in the text in a journal paper immediately after Figure \ref{fig:something} so that they can be shown nearest to the texts referring to them. It works well. However, ...
3
votes
1answer
44 views

Changing listing numbers

I want to change the numbers of a listing based on certain rules: Line 10: no number Line 11 onwards: the number that corresponds to the line+5 The displayed numbers should thus be: 1, 2, 3, 4, 5, 6,...
1
vote
1answer
23 views

Item number not aligned with tasks

I have an alignment issue when using enumerate and tasks. Specifically, when I have a "blank" item with associated tasks, the item # and task # don't line up horizontally. Any suggestions would be ...
1
vote
0answers
18 views

Line numbers required in multi column text [duplicate]

Here I faced challenge for fixing line number style as like the attached image could any one help how to fix this. Note: Required style as indicated in green color MWE: \documentclass{book} \...
0
votes
1answer
178 views

How to add line numbers in selected lines to my Algorithm in Latex?

I am writing an article to submit to IEEE and, following instruction of the IEEEtran class, I am using the algorithmicx.sty package to write algorithms inside a figure environment, instead of using ...
2
votes
1answer
139 views

Lineno package in latex causes warning message

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 ...
1
vote
2answers
94 views

Align equation number with any line within an `equation` environment?

Is there an environment / modification that: Works within a display math environment begin{equation} Allows for alignment of lines. Allows equation number to be aligned with any specific line, e.g. ...
0
votes
0answers
77 views

line numbers (of tex file)

I am looking for a way to annotate the pdf with line numbers (like we get with the lineno package). But I want these numbers to correspond to the line number in the source (tex) file, so I know where ...
1
vote
1answer
261 views

linenomath printing extra numbers on last line of multline, align, flalign environments

I am using \usepackage{lineno} to print line numbers on my document. My document has lots of equations. I use \usepackage{mathtools} and frequently use environments such as align, multline and ...
3
votes
1answer
368 views

Restart line numbers after every chapter

I am using the lineno package to add line numbers to my document. Is there a way to restart the numbering after every chapter? There is an option called pagewise which restarts line numbering on ...
3
votes
2answers
619 views

Turning the “line number” on in kile?

I think it is a really easy problem, but Google could not help and this searching function neither. I love kile, but the settings section is like a big mess for me. I would love to turn on a bar on ...
1
vote
1answer
147 views

elsarticle: Line number stopped in middle of document

I'm using \modulolinenumbers[5] and document class elsarticle. Line numbers worked fine till page 6 it stopped working to page 10 then it came back continuing from the number it stopped at. Can ...
0
votes
0answers
31 views

One-off redefinition of the section numbering

I use a the article class and have set the following: \renewcommand{\thesection}{\Roman{section}} \renewcommand{\@seccntformat}[1]{{\csname the#1\endcsname}.\hspace{0.5em}} This makes my \section{...
3
votes
1answer
145 views

Need to add line numbers extreme left of the page

I need to add line number in the latex {revtex4-1} generated pdf file. I am using the userpakage \usepackage{lineno} and \linenumbers after \begin{document}. It's showing the line number but very ...
0
votes
0answers
63 views

Redefine align environment with line numberig purpose

Can I redefine align (and other math environments) to obtain something like my (dumb) example? \documentclass[11pt]{article} \usepackage{amsmath} \usepackage{lineno} \linenumbers \pagestyle{empty} \...
1
vote
1answer
91 views

external cross-reference to a line number using lineno and xr-hyper

I try to reference a line number in source.tex from a dest.tex document. When (PdfLaTeX-)compiling dest, I get the following error. ! Extra \else. \@hyper@readexternallink ...#7\\{#3}{#2}{#7}\else ...
3
votes
1answer
44 views

Problems with line numbering? Line numbers clash with marginal notes

I am trying to put a numbering page inside the main text. The problem is that I am using margin notes, and want to "create" a space between the beginning of the margin notes space and the body of the ...
0
votes
1answer
41 views

Enumerate lines similarly to how equations are enumerated

Here is what I am trying to achieve. Just like equations get enumerated at the right side of the page when one uses \begin{equation} ... \end{equation}, is there a way to do the same for specific ...
0
votes
0answers
34 views

Error with line numbers

I am using IEEE journal template and after enabling the line number the text is showing error like the figure. I used this command to add line numbers \usepackage[switch,pagewise]{lineno} %\...
0
votes
1answer
52 views

Number one Eq. with (number+a,b) in an Eq. array?

I want to number two equations on one line of an equation array in the form of (number a, b), here the "number" should be the line number. Please see the following code, I try to achieve it with \eqno,...
1
vote
3answers
130 views

Paragraph and Line numbering with reledmac and sections

I want to have all my paragraphs numbered. I use the package reledmac that provides the numbering of both lines and paragraphs. Unfortunately, I cannot use \section together with it. What do I have ...
1
vote
1answer
89 views

Multiple columns in text block

I'd like to have a text with two columns and line-numbering every 5th line, starting new page each. Is there a command or package for that?
0
votes
0answers
44 views

Why there is a huge extra blank space at the beginning of this document? [duplicate]

After compiling following document, there is an extra blank space at the beginning of each page. I suspect there is an incompatibility between the lineno and pdfsync package. Is there a way to fix ...
3
votes
1answer
188 views

enumerating lines of bussproofs

EDIT: see below the original question Having got a great task of re-TeX-ing, i.e. transforming a PDF original of a lost LaTeX source back into LaTeX, I've got the recommendation to use bussproof.sty ...
2
votes
1answer
60 views

Why is \IF throwing an error?

I am writing algorithm but it is giving error. Please see the code given below: \documentclass{beamer} \usepackage{algorithm,algorithmic} \begin{document} \begin{frame} \begin{algorithmic} \STATE $...
2
votes
2answers
87 views

Using a line number reference as an argument for footnote

The \footnote{text goes in here} command takes an optional argument for numbering, so if I want to skip straight to footnote #5 or override the default numbering, I can do that: \documentclass{...
2
votes
2answers
137 views

Parallel text spacing and numbering

This post is a follow up to my previous post. Here, I ask about two issues: Vertical spacing: How can I control the vertical spacing/padding in each of the cells? I would like to have full control, ...
4
votes
1answer
96 views

ConTeXt: number empty lines

This source: \starttext \startlinenumbering \starttyping int x; int y; \stoptyping \stoplinenumbering \stoptext Renders like this: 1 int x; 2 int y; How can I ...
1
vote
0answers
85 views

Headers and line counting in reledmac/reledpar

I am converting an old FrameMaker file to XeLaTeX. As it deals with text editions of ancient documents, multiple readings, and the like, it seems to make sense to use reledmac/reledpar. However, being ...
2
votes
1answer
539 views

Change start number on\lstinputlisting

I am attempting to change the starting number of some Matlab code from 1 to 236. I tried using firstline=236 but nothing was output after compilation. Can you assist me in getting the code numbering ...
3
votes
1answer
1k views

Start line numbers in algorithm with 5

Is there a possibility to start the line numbers in an algorithm with 5? I want to show that in Algorithm 2 only Step 5 and 6 of Algorithm 1 are replaced by something else. I use the algorithm2e-...