{line-numbering} is about numbering the text lines of documents or parts of them. Popular packages are `lineno` and {ledmac}.
4
votes
1answer
48 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:
...
3
votes
0answers
45 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 ...
5
votes
1answer
58 views
Listings line numbers that match the linerange specification
This is a follow-up question to First line number in lstinputlisting environment. Consider the MWE:
\documentclass{article}
%\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
...
4
votes
1answer
66 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
93 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 ...
5
votes
0answers
72 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
0answers
45 views
Numbering all lines in a presentation
I would like everyline of a presentation to be numbered. Like the lineno package will do.
I tried the following but it does not print line numbers. I don't see why, I know there are some \par ...
2
votes
1answer
101 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}
...
1
vote
1answer
34 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}
...
4
votes
1answer
110 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 ...
4
votes
1answer
101 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 ...
2
votes
1answer
257 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
88 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}
...
2
votes
1answer
102 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 ...
1
vote
1answer
59 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
104 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 ...
3
votes
2answers
135 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 ...
7
votes
2answers
179 views
How can I use line numbers with leading zeros?
I use the listings package for source-code and have read all documentation. However, it appears that leading zeros for line numbers are not implemented as standard option yet. How can I redefine the ...
4
votes
1answer
64 views
Headline-ignoring, pagewise line numbers
Despite the easy-sounding task, it appears to be hard to find a suitable package to print line numbers that ignore the automatically generated section/subsection etc. headlines in their counter.
The ...
3
votes
0answers
49 views
Linenumbering per page with XePersian and the traditionalpoem environment
I’m editing an Arabic poem with XePersian and the traditionalpoem environment which works fine so far, but I have some questions regarding the line numbers and the paragraph footnotes.
(1) I would ...
4
votes
1answer
108 views
Running heads containing verse line numbers?
I'm typesetting a long poem using memoir and the verse environment. I would like to provide running heads showing the numbers of the first and last lines appearing on that page (like "lines 36--81").
...
5
votes
1answer
132 views
Eledmac line numbering out of margin at top of column (memoir)
I'm using eledmac to typeset a doc with two columns in memoir. The first line number at the top of the right column continues to be placed to the left of the column, as it was with the left column, ...
2
votes
1answer
115 views
Change line numbering in algorithmics package
I would like to start the line numbering of the following code not from 1 but from 12 (as it is cut out of a larger code). So it should be 12,13,14,15 instead of 1,2,3,4.
\documentclass{article}
...
5
votes
1answer
966 views
How to adjust line numbers of algorithm2e package?
When using line numbers in the algorithm2e package, the line numbers are placed left of the text block, not directly below the text.
See page 5 of the algorithm2e manual.
Is it possible to place them ...
3
votes
2answers
128 views
breqn and lineno incompatibility
Journals often require line numbering for the review process. This is achieved using lineno package. Next, it seems like a good idea to use breqn package (dmath environment) to auto-break long ...
4
votes
1answer
211 views
Linenumbers with lineno (edtable) breaks inside threeparttable because of caption
I'm trying to show linenumbers for tables using lineno, i.e. edtable. The table is set using threeparttable and linenumbers work fine, but compilation fails when including a caption. The error message ...
3
votes
1answer
81 views
how to better control the number display of listings?
I'm using the listings package for my sourcecodes, and among other things to control the display of those, I'm using \lstset, obviously.
Now, When setting numberstyle, I've set them to ...
2
votes
1answer
155 views
Remove line numbering from algorithmicx procedure/function
I would like the lines of "procedure" and "end procedure", "function", and "end function" etc to not be numbered.
For example, the default behavior produces this:
1 procedure hasNext(v,V,s)
2 ...
5
votes
1answer
268 views
Line numbering in algorithmic
I want to change the first number of the line numbering in my algorithm, but how is it done?
This is my example:
\documentclass[12pt]{beamer}
\usepackage{amsmath, amsfonts, amssymb, amsthm}
...
6
votes
1answer
153 views
Shipout line like Shipout page
In lineno package guide, I found:
Attaching line numbers after TeX has broken the paragraph into lines
is already quite a difficult job for TeX. Why? Because TeX does not
normally give you any ...
11
votes
1answer
194 views
Line numbering using listings package starts at random number
I'm using the listings package to include code directly from a file. In the first instance my code is numbered as I want it 1 at the 1st line, 11 at the 11th, ... However, the second block of code it ...
0
votes
1answer
124 views
How to get Roman line numbering in algorithmicx? What is the counter name?
I try to get Roman numbering but couldn't find how to change it in the package documentation. After some research, I figured out how to do it using the algorithm2e package. (Use algonl as optional ...
3
votes
1answer
173 views
line numbers on flalign environment
Why is there an additional line being numbered in the following example? I would like to remove this so that the line numbers only correspond to the equations specified. I realize that this is due to ...
2
votes
1answer
84 views
How to put a reference into nlset command of algorithm2e package
I would like to provide an alternative version of only some part of already existing algorithm, using the algorithm2e package. My source looks like:
\begin{algorithm}[t]
\dots \;
...
3
votes
1answer
81 views
If I have a list of numbered questions, how can I align my questions to the right of the number?
I'm editing a paper with a bunch of questions numbered from 1 to 10. In the example that my professor gave me, he had it formatted so that the number of the question would be listed, and then the ...
3
votes
2answers
313 views
Listings line numbers and figure
I'm using listings to typeset some C inside a figure environment next to a diagram, and I have the numbers on the left. My problem is in two-column mode the line numbers appear in what should be the ...
5
votes
1answer
93 views
Is it possible to change the font of line numbers in a code listing?
Using LyX I can add line numbers to my code listing. However, these are in the document (serif/Roman) font and look strange next to code blocks (Typewriter font). Is it possible to change the font of ...
4
votes
2answers
233 views
Line numbers in traditionalpoem environment?
So I've been trying to get satisfactory results typesetting Persian and Arabic poems, in the traditional format, with XeLaTeX. It works just about fine – see the sample document below – but I would ...
6
votes
1answer
144 views
How to introduce line numbers on specified lines
I'm trying to introduce line numbers in a hymn on specific lines. I'm using the lineno package but I'm having no luck with it. Ideally I'd like a macro that I can use to say place line number here. ...
6
votes
2answers
187 views
How do I prevent conflicts between accsupp and hyperref?
This question is related to the answer to the question Is there a LaTeX trick to prevent a PDF viewer from copying the line number?
Unless you turn hyperref off, the following MWE
...
47
votes
3answers
984 views
Is there a LaTeX trick to prevent a PDF viewer from copying the line number?
A PDF output is obtained by compiling the following code.
\documentclass{article}
\usepackage{xcolor}
\usepackage{listings}
\lstset
{
language={[LaTeX]TeX},
numbers=left,
...
3
votes
1answer
206 views
Numbering not every line with lineno
How it is possible to number not every line with lineno?
For example only every fifth line.
There are no hints in the manual.
3
votes
1answer
450 views
Code over two Pages and continue counting Lines
I'm using Minted to show my Javascript Code. It seems not possible to spread a code with Minted over two pages.
So i do it like shown in Algorithm over two pages, with itemized lists. But the Code ...
5
votes
1answer
297 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 ...
3
votes
3answers
407 views
adding captions outside of a figure or table?
For my thesis, I have written a computer program that reads in a parameter file. I want to show the parameter file in my thesis but am not sure what the best way to go about this is.
Ultimately, I ...
2
votes
1answer
88 views
Resetting line count in dtx files
I'm writing a dtx file containing several source files. Is there a way to reset the line counter when commenting the code of a different file?
My dtx file looks something like this:
....
%\iffalse
...
4
votes
1answer
172 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 ...
6
votes
1answer
546 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}
...
6
votes
3answers
580 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 ...
4
votes
1answer
496 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;
...
