{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

11
votes
1answer
462 views

Using listings: “zebra effects” AND line numbers

I just made a code listing with a "zebra effect", just like here: Creating a zebra effect using listings But afterwards, the line numbers at the left side of the listing don't appear any more. This ...
3
votes
1answer
288 views

Properly indent comments with no line-numbering in algorithmicx

Writing comments in pseudocode, I wanted to insert comments to the right side of the line which is commented. This thread help me a lot. The algorithm is line-numbered, however I need the comments ...
1
vote
0answers
137 views

XeTeX: Line numbering in a book with Devanagari and polyglossia

I am typesetting a book in XeLaTeX with both Samskrita in Devanagari script and English. I am trying to include line numbers for proofreading purposes. I want to use the lineno package which works on ...
1
vote
1answer
41 views

Compatibility issue between svn-multi and lineno

There is an issue between svn-multi and lineno. Setting the svnid confuses lineno witch results in a unwanted outcome. Without \svnid{$Id: abc.tex 1 2013-06-25 15:30:32Z asb $} everything works as ...
1
vote
0answers
90 views

How to manually set a line number for end statement in algorithm2e?

I can manually set line numbers in an algorithm2e environment using the \nlset command (together with \LinesNotNumbered). However, I can't figure out how to make the same for lines with the end or ...
1
vote
0answers
152 views

Listings: spacing between linerange and numbering [closed]

This is a combination of hacks, and only of interest for those who want hacks down to the detail. It is actually a two part question. I was going through some listings setups and hacks: Firstly ...
6
votes
2answers
171 views

Exclude line numbers from margin width

I am using the lineno package to add linenumbers on my twosided document. However, I have a restriction to leave a margin of 2.5cm inner and 4cm outer margin. This has to be completely free space. ...
5
votes
1answer
107 views

Line numbers on different margins in two-sided document

I'm using the lineno package to print line numbers in my two-sided document, but they are always printed in the left margin. \documentclass[twoside]{book} \usepackage{lineno} \usepackage{lipsum} ...
6
votes
1answer
384 views

Disabling line numbers in section headers

I'm using the lineno package to number lines in a document. By default, lineno attempts to number everything, including section headers. I would like disable line numbering on section headers, ...
6
votes
2answers
1k views

How to see the Steps number in an algorithm

In below algorithm I have used the package \usepackage[linesnumbered,ruled,vlined]{algorithm2e} 1) How do I see steps number after step 2? 2) Is there any command apart from ...
3
votes
1answer
301 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} ...
16
votes
5answers
1k views

How to create a lined page with line numbers?

I'd like to create a page in my LaTeX document that just consists of lines. It should look like this: Additionally, I want the lines numbered. I have no idea where to start. Are there any hints?
5
votes
2answers
1k views

How to avoid the number line for comments under algorithm2e

In the declaration of the input and output data, I would like to add a comment in order to explain the kind of data. I use: \usepackage[ruled,vlined]{algorithm2e} My code is: \begin{algorithm}[!ht] ...
4
votes
1answer
198 views

Incompatibility between 'flushend' and 'lineno' packages!

I have observed when using flushend package to balance the references at the last page, if at the same time the package linenois loaded, the last page of reference will not be displayed. I have ...
1
vote
0answers
61 views

Omitting white lines from line numbering using lineno

I am using the lineno package to number lines modulo 5 in a document that consists of several sections with lots of small paragraphs (typically 2-5 lines) and with white lines between every paragraph. ...
3
votes
1answer
179 views

Change lineno's number format for section headings (bold font)

This is a follow-up to the question Change from old style numbers to lining numbers in lineno's linenumbers environment I've discovered that the suggestion given there doesn't target the line ...
8
votes
1answer
132 views

Lineno splitting the document into hundreds of pages

I was trying to get all the lines numbered in my document, as explained in this question: Show the number of lines in margin However, when I added the lines: \usepackage{lineno} \linenumbers to ...
4
votes
1answer
138 views

How to use lineno with \intertext?

I would like to number all lines of a document to help its reviewing. The lineno package is working fine, except for the \intertext{...} paragraphs that I use between aligned equations. ...
2
votes
1answer
763 views

How can I change the font size of the number in minted environment?

How can I change the font size of the number in minted environment? The font can be modified with fontsize parameter, but the number on the left side is not affected with it. This is the code: ...
6
votes
1answer
150 views

loading lineno changes spacing in document

I loaded lineno to number the lines on my resume for critique by a professor. Doing so changed the spacing after the headers. I would like to number the lines and retain the original formatting, if ...
2
votes
0answers
112 views

line numbering including blank (empty lines)

I have a latex document and I would like to include line numbers in it, the tricky part is that I need to count the blank (empty) lines too (emulating what MSWord does :(. I know I could use the ...
1
vote
0answers
28 views

Is it possible to automatically set numbers=none for single-line lstlisting environments? [duplicate]

I apologise if the answer to my question can be found in the listings documentation and I missed it. Essentially I would like line numbers to be set only if the number of lines is greater than one.
1
vote
1answer
89 views

Refer to a particular line of a page

I am new to LaTeX, so I was probably quite naive to think that I will get a ready answer to this but to my surprise was not able to find an answer to this. I just want to refer to a particular line ...
4
votes
1answer
176 views

fancyvrb and multicols together

I am using fancyvrb to list code in a multicols situation. I number the code using: \begin{Verbatim}[numbers=left] When the code is in the left column, this is good, but not when it is in the right ...
2
votes
1answer
107 views

line numbering within proof

I'm trying to enumerate the lines within my proof, based on the section that I'm working in. For instance I would like something that: Thereom 2.2 My theorem Proof: Statement (2.11) equation for ...
4
votes
1answer
102 views

Hyperlinks and line-numbering

For the following MWE hyperref complains that it can not find a target for the link, and thus does not create a link. What can I do to make it work? \documentclass{article} ...
2
votes
1answer
256 views

Hyperref and lineno: always jumping to first page

I have a document where lines are numbered. I want to reference some special lines, for which the correct line numbers are generated. But using hyperref does not give the expected result: clicking on ...
4
votes
1answer
139 views

Line Numbering from .tex file lines

Is it possible to have a feature similar to the lineno package that outputs the .tex file line number that the pdf line came from? \documentclass[11pt]{article} \usepackage[english]{babel} ...
4
votes
1answer
230 views

Line numbering the whole mainmatter in memoir

Ok, now I am panicking, since lineo cannot be used with memoir (using \RequirePackage{lineno}). The specifications for the paper I am writing are numbering the mainmatter, footnotes included for ...
7
votes
1answer
605 views

Problem with package lineno

I'm using package lineno for proofreading of my documents. So I usually have something like the following MWE: \documentclass{article} \usepackage{blindtext} \usepackage{ifthen} % to use ...
3
votes
1answer
81 views

Line numbers for listings using program package

Is it possible to add line numbers to listings using the programpackage? (I know, that it should be possible within the much more sophisticated other listings packages available, but I would really ...
3
votes
1answer
2k views

Turn off line numbering in algorithm2e

I have the following preamble for algorithm2e: \usepackage[ruled,vlined,linesnumbered,resetcount,algochapter]{algorithm2e} I have many algorithms, in on of the algorithm as follows: ...
1
vote
0answers
159 views

line numbers in Arabic poem [closed]

I am typing an Arabic poem as part of a longer XeLaTeX document. So my paper has three parts: Introduction (7 pages), edition of Arabic poem (5 pages) that I typeset using polyglossia and bidi ...
0
votes
1answer
284 views

Only Select Code without Line Numbers [duplicate]

I'm writing a LaTeX document and want to include several listings for source code examples. Is there a way to disable the selection of line-numbers when selecting the source code? My prof just wants ...
1
vote
0answers
72 views

How to add line number for the last line of abstract? [closed]

I'm writing a paper and line numbers are needed. I've used the \usepackage{lineno}, and add \begin{linenomath*}\end{linenomath*}around abstract. However, there is no line number on the last line of ...
4
votes
1answer
197 views

Line Numbering with \usepackage{dramatist}?

I would like to number lines every 5 lines, save the first line in each scene. This is what I have so far: Just for clarification, I am using \usepackage[lnps]{dramatist}. My MWE: ...
6
votes
0answers
556 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 ...
4
votes
1answer
3k views

Unnumbered lines in algorithm

My question is similar to this one, I need to skip number for some lines of the algorithm. However the solution from that question does not work for me. How can I disable numbers for some lines using ...
7
votes
2answers
411 views

Change from old style numbers to lining numbers in lineno's linenumbers environment

I am using old style numbers in my document, but I prefer lining numbers in my line numbering environments (lineno's \linenumbers environment). How can I enforce this (without changing to another ...
4
votes
1answer
508 views

Line numbering with Lineno within Minipage

I am trying to add line numbers to a reading passage. The issue is that I can't get them to display when I try to number lines within a minipage environment. Can anyone answer what seems to be a ...
5
votes
0answers
160 views

Lines Numbers with mdframed [duplicate]

Am looking for an elegant way to include line numbers in my mdframed documents. Unfortunately, the following produces a 85 page docuement with \linenumbers (either before or after the ...
2
votes
1answer
851 views

Disable line numbering of specific lines

Is there way how to turn off numbering of lines for specific line in algorithm2e? I need bold : after keyword. So I tried redefine these macros: \renewcommand{\KwIn}[1]{\textbf{Input:} #1} ...
4
votes
1answer
320 views

Grammar with numbered rules

I'd like to represent a grammar where rules are numbered (for example, the following grammar: http://en.wikipedia.org/wiki/LR_parser#Additional_Example_1.2B1), in order to refer to those rules later ...
4
votes
1answer
1k views

Algorithm2e modify line numbers

I'm using the LaTeX algorithm2e package by defining \usepackage[ruled, linesnumbered, vlined]{algorithm2e} The linesnumbered argument adds lines numbers from [1,...,n] if we have an algorithm with ...
5
votes
1answer
222 views

How to make the line number in algorithm shown in bold

I have tried following which works (making the number in second line bold) \begin{algorithm}[h] \begin{algorithmic}[1] \State TSO.assignStartTs() {\bf\State} TSO.assignCommitTs() \end{algorithmic} ...
3
votes
1answer
803 views

Line number error using “Require” and “Ensure” in package{algorithmicx}

I’m using the packages algorithmicx and algpseudocode to write algorithms in my paper. It’s more convenient and beautiful to specify comments than with the algorithmic. But I encounter an error while ...
9
votes
1answer
6k views

How to add unnumbered lines in an algorithm?

I am typesetting algorithms with the algorithm package, and I would like to add unnumbered lines in them. Is there a way to create a \State* command, the same way there is an equation* environment? ...
3
votes
1answer
223 views

lineno not showing line numbers on proofs using the llncs class

Line numbers are not properly rendered on the last paragraph of a proof when using the lecture notes in computer science class llncs. Here's a minimal working example. \documentclass[oribibl]{llncs} ...
6
votes
1answer
312 views

Line numbering in ConTeXt outside of verbatim

Basically, I would like a way to number the lines in a block of text, without resorting to verbatim mode. I have tried \definetyping[code][numbering=line,style=\tf] \startcode[step=5] Thus, I came ...
4
votes
2answers
1k views

Continue line numbers in listings package?

I have been using the listings package to present my source code in LaTeX. However, I can't get the line numbers to continue between two separate user-defined listings that have been given the same ...