Generalbegin{...} end {...} pair matching & highlighting in editors

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
ptrcao
Posts: 88
Joined: Sun Dec 05, 2010 3:26 am

begin{...} end {...} pair matching & highlighting in editors

Post by ptrcao »

Ok, so I often have to type large documents with a lot of nested environments.

I was hoping that latex editors would match and highlight begin{...} end {...} pairs but so far to my knowledge none offer this feature.

Now that I've created a mess of nesting and have lost track of my pairs, I'm in particular need of it. Latex at this level of usage is just not human-readable. Suggestions?

PS, I found this http://www.cs.stir.ac.uk/~kjt/software/ ... hktex.html script written in 1992, but I don't know how to use it in Debian 6 Linux. Do I have to make it executable and then how do I use it? Either way, I did what it says in a terminal but command not found.
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

begin{...} end {...} pair matching & highlighting in editors

Post by Stefan Kottwitz »

Hi,

you could have a look at the small Ruby script match_parens. Perhaps you can extend it by \begin ... \end pairs.

Stefan
LaTeX.org admin
ptrcao
Posts: 88
Joined: Sun Dec 05, 2010 3:26 am

begin{...} end {...} pair matching & highlighting in editors

Post by ptrcao »

Stefan_K wrote:Hi,

you could have a look at the small Ruby script match_parens. Perhaps you can extend it by \begin ... \end pairs.

Stefan
Great suggestion - only I'm a bit timid when it comes to programming - I must confess, I'm not a programmer. :(

Since the script quoted in the original post seems to be specifically written for checking begin/end pairs, do you or someone else think they could give it a go and tell me how they got it to work? I would've thought just chmod +x and run the command, but that didn't work for me unless I did something wrong.
OS info: Win XP | Debian 6.0 | Ubuntu 10.04
Latex editor of choice: TexWorks (for dual view feature)
Post Reply