0

Possible Duplicate:
Tool for cleaning LaTeX code

Beamer presentation files are very structures, they have sections, in which you find subsections, which include frames that have titles and then itemizations lists consisting of many items.

It would be nice to have a program that auto-indents the input file based on this structure.

I have output of the following sort in mind:

 \begin{frame}{title}
              {subtitle}
   \begin{itemize}
      \item My first item
      \item My second item
      \item My third and very very long third item which occupies more than 
         my pre-specified line length which is (say) 80 characters. 
      \item My fourth item comprising a description
         \begin{description}
           \item[First Item]
              Described here.
         \end{description}
   \end{itemize}
 \end{frame}
Yossi Gil
  • 15,951
  • Note that this problem is much easier than the problem of general formatting of LaTeX code, since beamer input is so much more structured, and just dealing properly with a handful of commands, should be a great service. – Yossi Gil Apr 24 '12 at 16:45

1 Answers1

2

You don't need a special program for that. Just use an good editor. Vim, Emacs are able to auto-indent. Others maybe too.

If you have not so well formatted code, you have to reformat the code.

I can only speak for Vim. Here you just have to mark the code you want to reformat and then press

z= 

Give it a try.

schmendrich
  • 3,908