[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Font locking -- highlighting only the second of two pairs of br

From: AW
Subject: [AUCTeX] Font locking -- highlighting only the second of two pairs of brackets
Date: Fri, 16 Apr 2010 17:19:33 +0200
User-agent: KMail/1.13.2 (Linux/; KDE/4.4.2; i686; ; )

Dear all,

did you ever try to write documents with two columns, German (or whatever 
language) text in the left and a translation in the right hand column? LaTeX 
may produce a nice PDF, but in your editor you get confused easily.which text 
belongs to which column.

For the two parallel running columns I employ the »parcolumns«-package and 
define a macro called »\PC«  followed by two mandatory arguments. The first 
one takes the German text, the second one the English text. 

What I'd like to do is to highlight the second argument, but not the first 
one. Often I'm writing a text completely in German and translate it later or 
ask somebody to translate. I would be helpfull to have the English text (or 
the yet empty brackets) highlighted.

Here is a small example:




\PC{Deutscher Text}{English text}


Highlighting both brackets is possible by adding 

(font-latex-user-keyword-classes (quote (("Parcolumns" (("PC" "{{")) 
(:background "yellow") command))))

to .emacs. But how to highlight only the second pair of brackets?

The easiest way would be to redefine the PC-Macro to start with English 
version and have the German version on the right hand side. But I really would 
like to keep the German text on the left.

Any suggestions would be appreciated!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]