Questions tagged [line-numbering]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
62 views

A better way to number lines with tikz

I've managed to number a series of lines in a page (as in an exam sheet) using tikz, but it feels awkward and somewhat sketchy. Is there any way to improve it or make it "cleaner" (with or without ...
0
votes
1answer
30 views

Line numbers in tcolorbox, “notebook”/answer lines style

I wanted to adapt the answer here to insert line numbers on the left side (inside the box) -- just like listings in the tcolorbox package. I have also tried to put an optional number of lines ...
0
votes
1answer
52 views

LaTeX Equation: Undefined Control Sequence Error at Begin/End Equation [on hold]

I am working on a document and I am getting the following error for all my four equations. Here's one of them. I tried checking the code for any spelling errors or missing package but I seem to not be ...
0
votes
1answer
13 views

Change fontsize on line numbers in lineno package

Can't see anything in the documentation about this, but wondering if anyone knows if it's possible / how it is done. My eyes hurt! CTAN: Package lineno
2
votes
0answers
48 views

ConTeXt: line numbering disappears in custom column layout

Line numbering disappears when called inside custom columns defined with defineparagraph. This works fine \defineparagraphs[Colonne][n=2] \starttext \startlinenumbering \input knuth \...
0
votes
1answer
29 views

how to remove line number in latex when using iosart2x

In my paper appears line numbering, when I use the iosart2x.cls style. So, how to remove it? Please help me. Thanks!
1
vote
1answer
35 views

Why fleqn option lead to line number disappears for paragraph followed by equation?

When I use fleqn equation for amsmath package, I found that the paragraphs followed by equation is not numbered by lineno package. An example is \documentclass{article} \usepackage[fleqn]{amsmath} \...
0
votes
1answer
20 views

Adjust page numbering and linenumbers

everyone. I need to set the line numbering in the following template so that it also counts the title. Line 5 should be line 6 and so on. Moreover, I need to set the page numbering in all pages as "1/...
3
votes
0answers
69 views

ConTeXt: How to have line numbering in a two column layout for one column only?

I am trying to recreate a layout for some dictionary with ConTeXt. It is a two column layout with line numbering between the columns, that is, there is only one numbering for both columns. How can I ...
1
vote
1answer
53 views

Adding line numbers without lineno package

I've had several persistent issues with the lineno package and journal article templates (e.g., not numbering certain paragraphs). Is it possible to just add an "unaligned" column of line numbers on ...
1
vote
1answer
47 views

Reledmac: in-text Bible verse numbers

A nice little macro on reledmac allows replace line numbers with verse numbers. This is particularly useful for Bible verse. My question elaborates on this feature of reledmac. What should I do if, in ...
1
vote
1answer
35 views

Reledmac/Reledpar: Labeling translation paragraphs with line ranges instead of line numbers

TL;DR Rather than number my translation's lines separately, I would like to label each translation paragraph with the line range of the original language verse they translate. It doesn't seem like ...
0
votes
1answer
34 views

Reledmac hide stanza numbering in text, keep in apparatus

I've just started using reledmac to prepare a critical edition of a poem and I would like to number the stanzas automatically, hiding the stanza numbers on the left in the main text and keeping them ...
1
vote
1answer
60 views

ConTeXt: Line numbers in different margins in doublesided document

I'm numbering my lines in a double-sided ConTeXt Mkiv document like so: \usemodule[ipsum] \setuppagenumbering[alternative=doublesided] \starttext \startlinenumbering \ipsum \ipsum \ipsum \ipsum \...
1
vote
0answers
68 views

Suppress line numbering for specific lines (including blank ones) in listings package

My question is exactly the same as this one, but in my case some of the lines for which I would like to suppress line numbering are blank, and the accepted answer for that question produces an ...
2
votes
1answer
88 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
99 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
66 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
83 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
74 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
155 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,...
1
vote
2answers
83 views

How to align line numbers horizontally 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
35 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 ...
5
votes
2answers
362 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
104 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
162 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
237 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
87 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
101 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
189 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 ...
6
votes
2answers
532 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
151 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
56 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
151 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
79 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
52 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
57 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
19 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
265 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
275 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
129 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. ...
1
vote
0answers
134 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 ...
2
votes
1answer
427 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
736 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 ...
5
votes
2answers
1k 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
271 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
36 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
288 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
68 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
110 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 ...