MacOS Pages getting line numbers

Mayn journals requiring consecutive line numbering which is not a problem with MS Word, Open Office or LaTeX but with Pages.

Maybe it is possible to add a new background to PDF? Acrobat can do it (which I would not recommend), there is some crazy script out there (that did not work as well as ). My initial solution

pandoc -s input.rtfd -o output.tex --template=header_template.tex | pdflatex -output-directory=output_directory

with the header_template.tex containing

---
header-includes:
- \usepackage[left]{lineno}
- \linenumbers
- \modulolinenumbers[5]
---

did not work as pandoc cannot read the rather complex rtfd format produced by Pages. Also the next try with rtf2latex2e looked terrible, so I went back to RTF export in Libre Office where I  corrected the few Math formulas that were not recognized correctly.

Another option would have been Google Docs – they introduced line numbering recently which is probably the fastest and easiest way to do that.

 

 

Whenver it comes to more than one formula, it would be even better to move from Pages to Overleaf (online) or Texifier (local).