TeXworks / texworks

Main codebase for TeXworks, a simple interface for working with TeX documents
https://tug.org/texworks/
GNU General Public License v2.0
698 stars 127 forks source link

Highlighting chapter / section lines to enhance document navigation #583

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Often we have to create a document in a single file. It doesn't take many lines 
before the document becomes difficult to visually navigate between different 
sections of the document.

Recently I had the experience of using WinEdt to edit a document. While its 
interface is far too busy, one nice feature was that they put a coloured line 
under each chapter / section header which made scanning through the document 
quite easy (see http://winedt.com/snap.html second graphic).

I think this would be a nice addition to TexWorks which I use frequently on my 
iMac.

Thanks in advance,

MarkL

Original issue reported on code.google.com by livingst...@gmail.com on 18 Jun 2012 at 3:07

GoogleCodeExporter commented 9 years ago
TeXworks already includes a syntax-patterns.txt file which allows you to declare
syntax highlighting. Look at TeXworks manual or 
http://www.texdev.net/2009/11/13/background-colouring-in-texworks/

Including something like

red/lightgrey   Y  \\chapter\{[^}]*\}

in your syntax-pattern.txt file and lines containing \chapter will appear with 
red on lightgrey.

You must close and open TeXworks before changes are applyed.

Original comment by nign...@gmail.com on 12 Jul 2012 at 4:35

GoogleCodeExporter commented 9 years ago
Hi!

That worked nicely thanks - although at first I couldn't figure out
why it still always remained blue till I realised to put it before
"control sequences" which was gobbling it before it got to my
modification ;-)

Original comment by livingst...@gmail.com on 16 Jul 2012 at 6:53

GoogleCodeExporter commented 9 years ago
Just wanted to thank both commenters! I was looking for a way to highlight 
footnotes in my tex files and was finding the official guide a bit too complex 
for me. Now I have it :)

Original comment by mustafai...@gmail.com on 5 Oct 2013 at 1:48

GoogleCodeExporter commented 9 years ago

Original comment by st.loeffler on 2 Nov 2013 at 7:57