Page LayoutLine Numbers from Source Code in PDF Output

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
danoz
Posts: 1
Joined: Wed May 09, 2012 4:42 am

Line Numbers from Source Code in PDF Output

Post by danoz »

Hi,

I'm very new to LaTeX but am really starting to see the possibilities.

I have one question that I could not seem to find an answer for online. Basically I would like the command line numbers from TeXworks to be displayed when I output a PDF. This will make editing my work far more efficient as I will automatically know where to find errors my work. This will be very important for me as i have just begun a Ph.D and will have a very large body of work.

I have tried the package lineno, but that dosent help much at all.

Any help with this would be greatly appreciated.

cheers,

Danoz

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Line Numbers from Source Code in PDF Output

Post by localghost »

Since the line numbers in the source code are never the same as in the final output, this is not possible (and furthermore makes no sense).

Use the SyncTeX capabilities of TeXworks to switch between source and output. A right-click opens a context menu which offers either to go to the output or to the source, depending on the window in which you do the right-click. This should help to keep track of changes and make the navigation in the document as well as the source much easier.


Best regards and welcome to the board
Thorsten
Post Reply