[texworks] Feature Request: Bold Section titles in Editor

Uli Geisler ulge12 at gmx.net
Fri Dec 29 12:04:07 CET 2017


Hi,

Am Mittwoch, den 27.12.2017, 12:58 +0100 schrieb Stefan Löffler:
> 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
At my Installation this file already exists. I only have to enabel
syntax-highlighting via clicking (in german...) Format|Syntax-
Hervorhebung|LaTeX. Maybe in english format|syntax-
highlighting|LaTeX... ;-)
Then Highlighting is enabled.

Uli



>  (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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20171229/e06b61fd/attachment.html>


More information about the texworks mailing list