[texworks] Feature Request: Bold Section titles in Editor
Stefan Löffler
st.loeffler at gmail.com
Wed Dec 27 12:58:06 CET 2017
Hi,
On 2017-11-12 11:03, Posch Martin wrote:
> Kile has the option to highlight section (sub-)titles by showing them in
> a bold font.
>
> It would be great to have that in TeXworks as it facilitates the
> navigation in the document. Or is this option already there and I missed it?
You can configure TeXworks syntax highlighter to do a similar thing.
Edit the file ~/.TeXworks/configuration/syntax-patterns.txt (note that
it might be read-only by default) and add the following line somewhere
between the lines "[LaTeX]" and "# control sequences":
blue;B N \\(?:sub)*section\*?\s*\{[^\}]*\}
This will make all section, section*, subsection, ... bold (and blue) -
you can customize this to your liking, of course.
Note that the syntax highlighting is currently somewhat limited, e.g.,
it's not possible to just format the argument of the section command
(i.e., the actual section title without the surrounding command), and if
the section title contains the character '}' this will also confuse the
program (i.e., it will stop the bold blue formatting there). Still, I
guess it should give you sufficient visual distinction to facilitate
navigation.
HTH,
Stefan
More information about the texworks
mailing list