7

Possible Duplicate:
Tool for cleaning LaTeX code

I got a simple question.

I just got hold of a, very "ugly" latex document. By ugly I mean, that the source code is almost unreadable.

Is there a application (or a plugin ...) to autoformat latex markup?

2
  • 7
    Welcome to TeX.sx! This question is very similar to tex.stackexchange.com/questions/100/…. Please take a look at it as the information there might help you. If so, that's great, and we'll probably close this question as a duplicate just to keep the place tidy and to help people find answers quickly. If not, please edit your question here to explain why so that people can better focus their attention to help you.
    – doncherry
    Oct 14, 2011 at 14:56
  • 7
    Let me ask two questions: First, notwithstanding the input file's ugliness, can you compile it on your system, or does it require additional files that you don't have? Second, does the latex file by any chance come from a co-author who uses "Scientific Workplace"? If the answer to the second question is "yes," you should ask him/her to use the non-default way of saving a file. SWP's default save mechanism makes the raw tex file nearly unreadable. Fortunately, there's a second save option that makes the source file much more readable and also less dependent on SWP's special codes.
    – Mico
    Oct 14, 2011 at 19:22

1 Answer 1

0

Emacs in latex mode does a very good job. Just open the document in Emacs, select it and run C-M-\ (indent-region)

Not the answer you're looking for? Browse other questions tagged .