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
1
vote
2answers
45 views

How can I add some line numbers of emacs into pdf created by latex

Is it possible to print Line Number in emacs to the Latex pdf for lines that I prefer? If it is easy, I want to use those numbers with M-g M-g (goto-line command) I asked the same question here, I am ...
1
vote
0answers
79 views

How to add line numbers to a PDF?

I am trying to add line numbers to a PDF of a thousand pages. I only have the PDF and don't have the source text that was used to generate the PDF. As part of my research, I have reviewed the ...
3
votes
1answer
58 views

circle for each number in the algorithm

Is there an algorithm package that allows me to achieve the style of the algorithms where each number is inside a circle in an algorithm? I am interested specifically in the numbering of the steps by ...
1
vote
1answer
49 views

number line with different interval

I'm new to the latex and I'm wondering how I can create a number line with different interval and labeled letter like this:
2
votes
0answers
31 views

Environment with its own line numbers

I would like to create an environment with its own line numbers, that is to say: (1) the lines within this environment are not counted by lineno (2) it has a continuous line numbering itself, with ...
0
votes
0answers
18 views

How do I define a more stable numbering of proof steps with letters

I have some proofs that require many steps, and I wanted to number them with letters so as to not confuse with the numbers used for Definitions, Axioms, Lemmas and Theorems. Here is a MWE of what I ...
0
votes
0answers
116 views

How to remove line numbers from my paper?

I am using the template of MDPI https://www.mdpi.com/data/MDPI_template.zip?v=20201020 I wonder how can I remove line numbers next to each line? % LaTeX support: latex@mdpi.com % In case you need ...
0
votes
0answers
28 views

How to not count lines in a part of a latex document with lineo?

I am using lineo with revtex to count lines in my latex documents. I would like to not count lines for a small part of the document but still count for the rest of the document. Do you know how I can ...
0
votes
0answers
14 views

Resize line numbering

I use Texmaker to help with writing in LaTex. I have added line-numbering to the draft of my thesis. The size of the line number is a bit too small. Is there a way to make the size a bit bigger? The ...
3
votes
1answer
27 views

Empty line number when removing date

I have line numbers displayed and no date after the title. However, if I remove the date with \date{} there is a line number left in the empty line after the title. How can I remove it? Here is the ...
0
votes
1answer
41 views

latex linenumbers do not work properly

I am having some problem with lineno. Specifically, this happens when I introduce the first equation in my document. I the following example I get a wrong numbering of text lines in the latex ...
1
vote
1answer
35 views

Listings: skip line number ONLY where command is defined

I have looked at the following: Suppress line numbering for empty lines in listings package Suppress line numbering for specific lines in listings package However, the solution given in the latter ...
0
votes
1answer
26 views

Disabling Line Number in Section Titles not Working

I am trying to apply the answer to this question in Overleaf. I want to number my lines but I don't want the chapter/section titles to be numbered. I'm running into errors when applying the answer. ...
0
votes
0answers
15 views

Line numbering within pages with listings package

When I use listings package as is, line numbers appear in the margin and the listing lines start at the margin. I know a workaround of putting each listing into a minipage with \noindent, but it is ...
0
votes
0answers
120 views

LaTeX listings package JSON formatting

I am using package listings for JSON data. I am following this example How to improve listings display of JSON files from this stackexchange answer. It generates the following output: I added caption ...
0
votes
1answer
25 views

First number and captions in listings environment

I am using listings to display code and I added firstnumber and caption but it doesn't appears to work. There's an example: \documentclass[11pt,fleqn]{book} % Default font size and left-justified ...
0
votes
1answer
47 views

Continue linenumbering between sections in reledmac + reledpar

I am helping my girlfrien with her thesis (a commented edition and translation of an old occitan poem). The main portion of the work is the critical edition: a chapter in which she divided the poem's ...
0
votes
0answers
10 views

Quotes within numbered text: position of line numbers

I am wondering if, for an indented passage (a quote) it would be possible to shift reledmac's line numbering from the margin into the gap left by the indentation? The following MWE \documentclass{...
1
vote
1answer
29 views

poemscol: How to fix slight indent with \startverseline?

I'm using \startverseline to get my line numbers aligned with the beginning of a runover line (as described in the poemscol manual, 3.3.2). The line number is now in the right place, but the line is ...
1
vote
1answer
45 views

code input with linenumbers

I write a thesis and want to have my code/textfile in the appendix. I dont want to copy the code, I only want to write the path of my file into tex. I already tried \verbatiminput{main.py} and \...
3
votes
1answer
191 views

Enumerating from highest number to the lowest

I would like to know if there is a way to get an enumerate list in LaTeX such that if I write a total of N items, then I get N. Item numeber N N - 1. Item number N - 1 ... 1. Item number 1 So if N = ...
0
votes
0answers
37 views

traditionalpoem environment, line and stanza numbers, line breaks = help plz!

I have a single lined (no hemistiches) arabic poem that consists of stanzas with several lines each. I want to have it right aligned and justified and traditionalpoem does that very well. However, I ...
2
votes
1answer
47 views

Central line number for large function with algorithm2e

I have an algorithm (using algorithm2e) where I need a big function, so I want to enter it as an equation. But the line numbering seems a bit weird, as it numbers an empty line. I want the number to ...
0
votes
0answers
58 views

Show lines of errors in VSCode

I am writing the TeX-documents in visual studio code using the latex-workshop-addon. When I have errors in my document, arara fails (obviously) and shows me which compilation-step exactly failed. ...
0
votes
1answer
48 views

set margin 7 mm from left lineno internal line numbers

I am trying to set a 7 mm margin from the left on my pseudocode. I am using lineno package and this is what I wrote: \lipsum[2-4] \begin{alltt}{\footnotesize{\internallinenumbers S = \(\emptyset\) ...
0
votes
1answer
50 views

Line numbering problem with the AIP template

I am writing a paper based on the AIP template, and I want to add the line number. I tried with lineno, but it has some problems: as a standard (you can see that by opening the template in Overleaf), ...
0
votes
0answers
15 views

Continuous \inputlineno for documents with \include and \input

The \inputlineno counter represents the current line of code in the .tex file. \the\inputlineno returns said number. If, however, I have a document which \includes or \inputs other .tex files, \...
1
vote
1answer
38 views

Combining linerange, firstnumber and consecutivenumbers leads to non-consecutive numbers

If I use linerange, firstnumber and consecutivenumbers with line markers it results in non-consecutive line numbers. MWE: \documentclass[a4paper]{article} \usepackage{listings} \begin{filecontents}{...
1
vote
2answers
28 views

Hide the numbering of some lines in algorithmc

I have the following LaTeX algorithm's code. I just need to hide the numbering of the first three lines; any suggestions? \documentclass{article} \usepackage{algorithm} \usepackage{algorithmic} \...
0
votes
1answer
38 views

Line numbering outside a box

I have problems getting a line numbering similar to that in the picture. I created the box with \frambox{\parbox{ but with the command \linenumbers I only get the whole box numbered with a 1. I ...
4
votes
1answer
50 views

Don't reset line numbers using Verse package

I would like line numbers to not reset when using verse environment. Consider this MWE: \documentclass{book} \usepackage{verse} \poemlines{5} \begin{document} \chapter{} \begin{verse} Lorem ipsum ...
1
vote
2answers
113 views

Find the line number inside a vbox (at end of paragraph), and change the behavior of a macro that follows next

Edit: I have added a luatex solution as an answer to my question. I have a \vbox in which I plan to typeset long material (long poetry), the way it is typeset is slightly unique. There is a special ...
0
votes
1answer
54 views

How to add title on line numbers?

So I am using the function \linenumbers which by default puts a number for each line at the left for the written text. But I somehow need a unit/title on the number but I can't find anything about ...
4
votes
2answers
97 views

Indentation of line numbers while using equations within algorithm2e

I have written some algorithms using the package algorithm2e. Some of my algorithms also include aligned formulas. My problem is that line numbers below lines ending with equations have a larger ...
2
votes
0answers
27 views

Position of line numbers using algorithm2e and fontenc [duplicate]

I want to present an algorithm with the package algorithm2e. It mostly works fine, only the position of the line numbers are wrong. The numbers are printed within the margin of the page. I figured ...
1
vote
1answer
57 views

Semi-automatically fix orphan words

I'm trying to build a script to semi-automatically fix orphan words. To do that I need a way to write an auxiliary file that contains some data. The idea is to have a command like: Wor\OrphansSpotter[...
4
votes
3answers
281 views

Ignore specific lines when numbering lines

This may also be a potentially trivial question, but did not find the answer. Edit: It may be nontrivial... ... \usepackage{lineno} ... \begin{linenumbers} \begin{verbatim} A B C \end{verbatim} ...
1
vote
1answer
234 views

How to remove line number from \tcc comments in algorithm2e

I am trying to write an algorithm using algorithm2e. I have to use \tcc comments at different phases of the algorithm. When I am adding \tcc comment in the code, in the output, each \tcc comments are ...
1
vote
0answers
66 views

ConTeXt: Line numbering in two column layout conflicts with marking

In ConTeXt, line numbering in a two column layout apparently conflicts with the marking mechanism. As far as I understand (the documentation on this subject being rather scarce), ConTeXt's "marking" ...
1
vote
1answer
162 views

Columnwise line numbering in a two column environment (with multicol)

In a two column environment, I need columnwise line numbering and the possibility to get the actual column number. Now, columnwise line numbering is possible with lineno and the option columnwise. ...
0
votes
1answer
309 views

How to automatically reference line numbers of a quote?

I am trying to find a way to automatically reference the line numbers of a quote that may run on multiple lines. I am using the lineno package to number the lines of a text and it also enables to ...
2
votes
1answer
163 views

How to refer to line numbers of source code in listings without adding labels by hand?

I use listings to produce my Matlab code. There I can use the \label and \ref commands for readers to direct them to my code and line number. \begin{lstlisting}[caption={Code for deflection at the ...
0
votes
1answer
79 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
73 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
406 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
55 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
2answers
251 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
49 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
35 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
142 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
2 3 4 5
7