{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

4
votes
1answer
205 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 ...
7
votes
1answer
738 views

mdframed with tikz method: putting line numbers outside of frame

I want to number the lines in a mdframed environment with the line numbers appearing on the left of the frame, outside of it. \documentclass{article} \usepackage[framemethod=latex]{mdframed} ...
4
votes
1answer
735 views

Custom line numbers in lstlisting environment

I am using the lstlisting environment to display code and it works great, however for my current application I need something like: line 1; 3.1: line 2; line 3; 3.1.5: line 4; ...
10
votes
1answer
794 views

How to count number of lines in PDF document?

I'm using the lineno package to print line numbers (each page starts with number one) in the draft of my document: \usepackage[switch*, pagewise]{lineno} Is there a way to read out the number of ...
5
votes
2answers
432 views

lineno and syntax package incompatibilities

I'm using the syntax package from the mdwtools version 1996/05/17 1.07. I successfully set the properties to show a grammar definition properly but then when I try to combine it with the lineno ...
14
votes
1answer
4k views

Show the number of lines in margin

How to show the number of lines in a short passage like that: (EVEN PAGE STYLE) margin ...
4
votes
1answer
727 views

Suppress line numbering for specific lines in listings package

I would like to suppress the line numbering for specific lines in listings package by identifying the specific lines using some kind of command.
6
votes
2answers
1k views

Suppress line numbering for empty lines in listings package

The listings package quite nicely formats my pseudo code listings. Is there a way that one can specify that line numbering should be suppressed for empty lines?
2
votes
2answers
301 views

Wrong numbering of lines in lstlistings when using escaped commands

I'm using the listings package to format some Java code in my document. I want it to number lines (1 number every 5 lines), and I need to highlight some keywords inside the code with the following ...
8
votes
1answer
3k views

Algorithm spanning more than one page

I have an algorithm which is too long to fit on one page. Someone suggested splitting the algortithm manually and then altering the second algorithm's line numbers to follow on the first. I know ...
5
votes
1answer
1k views

In listings, how to show referenced linenumbers instead of standard ascending linenumbers

I'm just writing on my master thesis and have a (specific) problem with lstlisting package in LaTeX. I'm referring to the Random.class-file in Java and only want to print some specific line-ranges, ...
2
votes
2answers
246 views

Why is the ledmac line number misaligned with the final item?

Here's a minimal document showing the problem: \documentclass{article} \usepackage{ledmac} \begin{document} \firstlinenum{1} \linenumincrement{1} \beginnumbering \pstart \begin{itemize} \item This ...
3
votes
1answer
309 views

Lineno \internallinenumbers - how to make a line number label within a figure?

This concerns the "lineno" package. The \linelabel directive works within the ordinary linenumbers environment. How to create a line number label within a internallinenumbers environment to be able to ...
6
votes
1answer
547 views

verselinenumbersleft with twocolumn

Situation: a poem in the verse environment of the verse package, while the entire page is set with the twocolumn option. Line numbering is enabled via \poemlines{1} and set to the left by ...
6
votes
1answer
4k views

First line number in lstinputlisting environment

I use the following code to display line 23-45 of sort.cpp: \lstinputlisting[language=C++,linerange=23-45]{sort.cpp} However, the line numbering starts with 1 while I want it start at 23. I found ...
8
votes
1answer
1k 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
0answers
156 views

Source code line numbers in PDF [duplicate]

Possible Duplicate: Extended draft mode which includes source information for manual print-out to source synchronisation I am writing a document in LaTeX which I compile to PDF, which I ...
2
votes
4answers
695 views

How to place a program and a text side by side?

My first question is how you write a program in LaTeX, with and without a line number for each line. The second question is, because often my program is not too large, I want to save some space for ...
7
votes
1answer
1k views

LaTeX minted package: numbering lines does not work [closed]

I'm having a problem with the minted package. When I try to add line numbering to the minted command, I get the following error: ! Package keyval Error: stepnumber undefined. See the keyval package ...
5
votes
1answer
2k 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: ...
10
votes
1answer
10k views

How to put a line number every line of algorithmic

I am looking for a way to have a number for every line in algorithmic: \documentclass{article} \usepackage{algorithm} \usepackage{algorithmic} \begin{document} \begin{algorithm} ...
6
votes
1answer
798 views

Line numbers in pseudocode in figures - using lineno in figures

can someone show an example how to obtain line numbers in the alltt environment in figures, possibly using the lineno package? I've tried: \begin{figure}[h] \begin{alltt} {\linenumbers def insert(k, ...
12
votes
1answer
1k views

How to number all lines in a draft?

I want to have a draft of a document I am writing, with the line numbers aside. I looked at some options like lineno, but this way it skips some lines. Is there a simple workaround or another package ...
6
votes
2answers
2k views

Number every line of pages

When editing documents it is convenient to have all the lines on a page numbered (on the left margin) so that the reviewer can refer to them in his report. How can I achieve this with LaTeX?
4
votes
2answers
1k views

How to add paragraph line number in right margin

In passages, the line numbers are given on the right side of the paragraph. Like this: How could this be implemented in LaTeX?
9
votes
2answers
1k 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} ...
1
vote
1answer
416 views

line numbering of minipages

I can't manage to add linenumbers left of the boxes. Can anybody help me? \documentclass{article} \begin{document} \fbox{\fbox{ \begin{minipage}{0.8\linewidth} \textbf{def} mapper (key, value): ...
7
votes
1answer
778 views

Line length in fancyvrb

What I'm doing: Typsetting source code using pygments. What is happening: the code typsets fine, but because pygments puts the code into a Verbatim environment, some of the lines are far too long. ...
15
votes
1answer
7k 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 ...