Adding line numbering to PDF and DOCX #6772
-
DescriptionI am writing a scientific manuscript with Quarto (version 1.2) and I need to export it to both PDF and DOCX. One of the requirements is line numbering. For PDF I tried:
which gives the following error message:
I also tried to use just I am totally unsure how to add line numbering to DOCX. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
See the ---
format:
pdf:
pdf-engine: lualatex
number-sections: true
toc: false
keep-tex: true
include-in-header:
text: |
\usepackage{rotating}
\usepackage{float}
\usepackage{typearea}
\usepackage{lineno}
include-before-body:
text: |
\linenumbers
---
{{< lipsum 4 >}}
|
Beta Was this translation helpful? Give feedback.
I think that what @mcanouil is saying is that since these two things are true at the same time:
lineno
only supports counting lines inside the LaTeX's document bodyabstract
needs to be outside LaTeX's document bodyThen you can't get line numbering for the abstract using
lineno
. Since you're usinglineno
yourself, there's nothing quarto can really do to help there.