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

learn more… | top users | synonyms

2
votes
0answers
32 views

how can I create a tcolorbox with line numbering?

I created the following tcolorbox: \documentclass{article} \usepackage{tcolorbox} \usepackage{lineno} \begin{document} \begin{tcolorbox}[middle=0mm,boxsep=0mm] Headers \tcblower ...
3
votes
2answers
86 views

Programming code listing: enumeration and left margin

I'd like to inlcude programming codes in LaTeX by using the verbatim package. For the code I use, the enumeration is continous. So if a new code starts, the numbers are ongoing, which should not be ...
2
votes
1answer
110 views

Adding line numbers to an IEEE Latex document

I would like to add line numbers to an IEEE paper style. I have tried using different approaches, however non was successful. For example, when using \usepackage[switch,columnwise]{lineno} there will ...
1
vote
1answer
38 views

lineno skips some lines containing equation environments

I am using TeXworks 0.5 r.1350 (Debian). My tex source is \documentclass[a4paper,11pt]{article} \usepackage{amsmath} % needed to get the command equation* to work \usepackage[a4paper]{geometry} % ...
0
votes
0answers
10 views

labeling lines in text body [duplicate]

Is it possible to set "label markups" or a "placeholders" in a text, to refer to a particular line? I am thinking of this in the context of academic article revision, where usually people comment on ...
1
vote
1answer
51 views

To linenumber at start of sentences without altering data?

I have data which I do not want to change or duplicate it. I would like to have a line number after each empty line. It would be great if this can be done by some presentation only. Data This is a ...
2
votes
1answer
48 views

line numbers across multicols in scrartcl

The answer to the following question suggested by @IanThompson with left and right column numbers works sufficiently when we use \documentclass[twocolumn]{article} However I am using a different ...
6
votes
1answer
736 views

How to have inline code and line numbering with minted?

I'm using the code found in this answer to allow minted to provide inline code. But, unfortunately, this breaks line numbering, which is not shown anymore. How can I have both inline code and line ...
7
votes
0answers
92 views

KOMA + bigfoot + lineno seem to produce vertical gaps in some cases

in a lengthy critical edition, I am using KOMA-Script, bigfoot and lineno. In certain cases, all involving footnotes, there are vertical gaps on the page containing the footnotes. This affects roughly ...
11
votes
3answers
3k views

Why doesn't lineno number a paragraph when it is followed by an indented equation?

While searching for the source of missing line numbers, I realized that paragraphs followed immediately by an equation have no line number, but this is fixed when a space is included, e.g. the ...
2
votes
2answers
31 views

How to get continuos line numbers for minted code blocks

I use minted in following way: \documentclass[a4paper, 11pt, twoside]{article} \usepackage{xltxtra} \usepackage{xunicode} \usepackage{polyglossia} \usepackage[svgnames]{xcolor} % Syntax higlight ...
4
votes
1answer
74 views

Supressing the very first line number in the code

So I have looked at the following: Suppress line numbering for specific lines in listings package And the solution works great for the nth line of code. What if I want to suppress the very first ...
1
vote
1answer
28 views

Printing the line number with eledpar in facing pages only on the left page, but not on the right one

I am editing an ancient poem with an apparatus criticus and my own prose translation of it. So I want the line numbers only on the leftpage (poetry), but not on the the right one. As far as I have ...
15
votes
3answers
5k views

Why doesn't lineno number a paragraph when it is followed by an “align” equation environment without a space?

lineno skips the line numbering in this case: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{lineno} \linenumbers \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing ...
2
votes
1answer
63 views

Listings: Skip line number on current line

So I am trying to use the listings package to show some source code. However I would like to be able to skip line numbers for certain lines, such that the do not receive any line number, but does not ...
13
votes
3answers
3k views

Lineno - numbering abstract's lines.

The package lineno.sty is not numbering my abstract's lines. Any suggestions? Thanks. \documentclass[a4paper,12pt]{amsart} \usepackage{indentfirst} \usepackage{hyperref} \usepackage{showkeys} ...
4
votes
1answer
274 views

SLatex and line numbering?

I'm using SLaTeX to typeset some Racket source code. I would like to have line numbers along the left edge, so that I can refer to them in my document. However, I haven't yet discovered the option ...
1
vote
0answers
29 views

Count lines of multiple files (Using minted for formatting.)

I am using minted to show source code in my document like this: \section{Image functions} \inputminted{python}{src/imagefuncs.py} \section{Matrix operations} \inputminted{python}{src/matrices.py} ...
2
votes
1answer
89 views

Left-align numbers in ToC

How do I lelft-align the chapter and section, number in the ToC? My code is: \documentclass[12pt]{report} \usepackage{tocloft} \makeatletter \renewcommand{\numberline}[1]{#1~} \begin{document} ...
6
votes
1answer
54 views

Command that outputs at the end of the document the pages and line numbers where it was used

I need to a command that outputs at the end of the document the pages and line numbers where it was used. I've tried different variants of the following code but my knowledge of latex is limited. I'm ...
4
votes
2answers
208 views

how do I add line numbers to itemize environment?

I have an itemize environment that I use in a figure to describe, say, an algorithm or a process. I want to include line numbers, all aligned on the left most side of the figure so that I can refer to ...
1
vote
0answers
37 views

How to get listings package line number behavior of v1.3 in v1.5?

In the listings package v1.3, when including lines from a file, the numbering is that from the file, even if lines are omitted (absolute numbers). But in v1.5, the numbering ignores the location in ...
1
vote
2answers
49 views

add line number to the algorithm2e [duplicate]

How can I add line number to my algorithm? I want to write line number in the front of the algorithm line. How can I get that with the \usepackage[ruled]{algorithm2e}? Code: \documentclass{article} ...
6
votes
2answers
697 views

Shared line counter with \lstinputlisting

Using the listings package, you can name your listings to make them share a line counter: On the other hand you can use firstnumber=auto and name your listings. Listings with identical names ...
0
votes
0answers
81 views

Line numbers in listings (lstlisting) based on actual appearence in PDF file

I'm using the listings package to insert source code into my TeX files. I also set the option \lstset{numbers = left} in order to have the line numbers next to my source code and be able to refer to ...
4
votes
2answers
90 views

Incompatibility between lineno and equation*

In addition to a lot of others incompatibilities, also there is one between lineno and equation*. Is there any chance to have the lineno package updated to solve this problem? Does anybody here knows ...
2
votes
1answer
97 views

Skipping line numbers in lstlisting

Referring to Skip line numbers and resume from specific number I tried to skip several line numbers in my listings and continue with a specific number. But in my case there is a really bad side ...
7
votes
1answer
47 views

How can you correctly combine lineno and paracol?

When a paragraph inside paracol is split up over multiple pages all the line numbers show up at the top of the page where the paragraph has ended instead of next to the line they belong to. The ...
3
votes
1answer
68 views

How to put a line number with levels in algorithm?

\documentclass[a4paper, 10pt, 3p, final, twocolumn, times]{elsarticle} \usepackage{algorithm} \usepackage{algorithmic} \begin{document} \begin{algorithm}[htbp] \caption{somealg} \label{alg} ...
1
vote
0answers
20 views

How to align algorithm with text [duplicate]

I am using the algorithm2e package for a paper, and I am using it as follows: \usepackage[ruled,linesnumbered]{algorithm2e} Everything works OK, however, when I added the linesnumbered directive ...
2
votes
1answer
45 views

Number equations and preserving alignment of equal signs

So as I have learned from a previous post that the \begin{aligned}... \end{aligned} with the usage of "&" before "=" will help arrange neatly the equations where the equal sign of each equation ...
2
votes
1answer
36 views

How do I cite a range of lines?

I want to be able to specify a short excerpt of text that can be cited as a range of lines in the output PDF, ideally with this kind of syntax: \documentclass{memoir} \usepackage{lineno} ...
4
votes
0answers
90 views

line numbering in article class

I want to make numbering line even though they are blank lines in the article class, how can I do with package of lineno? You can wonder why I must numbering the blank line because that is ...
5
votes
1answer
51 views

Why does it appear that some lineno internal commands are never called?

At the end of lineno's cryptic documentation, the author lists certain "for wizards commands." I'm trying to implement a special tag for the first line number, so I thought I would probably begin by ...
0
votes
0answers
16 views

How to print numbers in both margins with lineno [duplicate]

It was said here that the package lineno is able to print numbers in both margins on a page. However, after reading the documentation I don't see how to do this.
1
vote
1answer
86 views

two column with linenumber outer text-area

I would like to print the linenumbers in the outer-margin. How do get the linenumbers in the margin (in this example linenumbers 33 to 63 should be print in right column)? My LaTeX Code is: ...
7
votes
1answer
3k views

Listing with line numbers inside a table

I typeset a lot of listings (using the listings package) inside (array-based) tabular environments. This works like a charm, however, breaks when I pass the numbers= option to the listing: ...
1
vote
0answers
23 views

Linenumbering problem

When I am using line numbering I am getting to this problem: Basically the command for line numbering is perfectly working until page 8 from 11 of my document. It seems that from this point the ...
9
votes
2answers
81 views

Paragraph numbering (lineno for paragraphs)

How can I add margin numbering for paragraphs? It should be alternating (left and right) for odd and even pages. So basically like lineo with the switch option but for paragraphs instead of lines.
0
votes
1answer
37 views

Line number in cross reference without visible line number in the entire document

My question is related to Line number in cross reference. I would like to give a reference to the line number of an specific line without any visible line number on the entire document. The below ...
3
votes
2answers
610 views

Linenumbers don’t reset with switch option

When I use the package lineno with option [switch], linenumbers don’t reset when asked to (my setup: up to date TL 2012). MWE: \documentclass{article} \usepackage[switch]{lineno} \usepackage{lipsum} ...
1
vote
1answer
45 views

How to switch between “ON” & “OFF” modes for printing line numbers in a modular document, using lineno package?

Background: I am using the modular document approach for writing my thesis. Since, the work is still in progress, I am also printing line numbers wherever needed, using the \linenumbers & ...
2
votes
1answer
87 views

Can I change linenumber colour?

I've tried adding the lineno package to my document. It's nice but I would like to make the numbers a different colour, like a light grey or blue, if possible. Can I do this in my style document ...
1
vote
0answers
60 views

How to number lines (per page and on the inner margin) without lineno?

I have been experimenting a lot lately to find a cure to the question I asked in December but as of yet I have been unsuccessful. Now, while this is entirely due to the fact that I do not have enough ...
2
votes
2answers
214 views

Increase the maximum line numbers of a page

I am trying to achieve an ieee draft to meet the requirements: Double spacing, single-column format, 12 point font, 1 inch margins and no more than 25 lines of text per page. I am using the following ...
17
votes
1answer
9k views

Adding line numbers to latex and respecting equations

It's often convenient to add line numbers to a page automatically and the lineno package generally does the trick. But I've had two problems with it It doesn't seem to align the line numbers with ...
4
votes
1answer
40 views

Typesetting verse with line numbers directly adjacent (not in margin)

When I quote verse (in a document typeset by XeLaTeX), I would like to be able to place line numbers directly adjacent to the lines, not in the margin to the left. For example: ...
4
votes
0answers
190 views

\inputminted: distinct file parts in one listing (equivalent to linerange in listings)

I want to include code from a file into my document. However, several distinct line ranges should appear in the same listing. Also, I want to use gobbling, and it would be nice to include some blank ...
3
votes
1answer
115 views

Listings: line number separator rule

Here I found a similar question with horizontal rule, which answer I don't understand to a degree I could use it to solve my problem: Adding a horizontal rule between caption and lstlisting inside a ...
7
votes
0answers
67 views

lineno package has different output in pdflatex and lualatex [closed]

Using line label references from the lineno package prevents lines from being broken at explicit hyphens in words adjacent to the label. Consider the following MWE: \documentclass{article} ...