[Tex/LaTex] How to get line numbers in TexWorks

texworks

I opened up a file of mine in TexWorks. There were no line numbers. So, I navigated to Edit > Preferences and checked the line numbers box.

TexWorks_preferences_menu

Oddly enough, if I open up a new empty document, line numbers are displayed for the new document. However, there are no line numbers in my existing document. I have tried closing TexWorks, restarting it, and reopening my document. However, anytime I open my document instead of creating a new one, line numbers fail to display.

new doc and old doc

Any thoughts?

I'm running Windows 10 Home Edition

tex works version

Best Answer

In menu EditPreferences☑ Lines numbers you set the default behavior for new or unkown documents, but you can change the settings only for the actually edited document in menu FormatLines numbers (see image below).

This will change the behavior of that file even if you close and open the file again, while it is in the Recent Files List, i.e., with FileOpen RecentClear Recent files you will lost that individual settings of all your files, so the next time you open the file, you will see the default behavior set in the Preferences window.

screen

Related Question