Number of each line of text in rmarkdown PDF

I am writing a document that knits in pdf and I need each line to be numbered so reviewers can refer to specific suggestions. I found some reading for snippets of numbering code, but what about just text?

+3


source to share


1 answer


Add the package lineno

to the header. Here is an example .Rmd file

---
title: "Line Number Example"
header-includes:
   - \usepackage{lineno}
   - \linenumbers
output:
   pdf_document
---

There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.  


There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.  
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.
There is a lot of text that goes here.  There is a lot of text that goes here.  

      



And the result will look like this: enter image description here

+7


source







All Articles