Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there any indentation tool for (la)tex?

I currently use TexShop under Mac OSX, so I can either use a TexShop plugin or a command line tool.

share|improve this question
I just select the text I want indented and use command ] to indent, and command [ to unindent. Not very automated, but does work, and that way I have control of what it looks like. – Peter Grill Feb 23 at 17:13
It shifts the entire block of text. I'm looking for a utility that can indent inner parts (e.g. subsections) more than their parents (e.g. sections). – Adam Matan Feb 23 at 18:12
1  
What about Emacs? ;) – mbork Feb 23 at 18:20
As you are typing after a section, just use command ] on the first line, then all lines following will retain that indent (at least in TeXShop). Similarly if you are coming out of an indented block, use command [. For text that already exist select the block you want to indent and apply command ]. Any automated tool won't easily be able to work with custom environments or macros without some configuration set up. – Peter Grill Feb 23 at 18:25

1 Answer

up vote 5 down vote accepted

Just have a look to indent.plx. In my opinion an interesting tool. Have a look at LaTeX code sniffer and/or beautifier? for details.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.