LaTeX indentation (formatting) in Emacs
Posted
by nkuyu
on Stack Overflow
See other posts from Stack Overflow
or by nkuyu
Published on 2010-03-19T12:29:47Z
Indexed on
2010/03/19
12:31 UTC
Read the original article
Hit count: 521
Hi,
what is the correct way to do indentation of a LaTeX document in Emacs (AucTex)?
For example when I have a list:
\begin{itemize}
\item orem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam enim urna, mattis eu aliquet eget, condimentum id nibh. In hac habitasse platea dictumst.
\item orem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam enim urna, mattis eu aliquet eget, condimentum id nibh. In hac habitasse platea dictumst.
\end{document}
and would like to ended up with:
\begin{itemize}
\item orem ipsum dolor sit amet, consectetur
adipiscing elit. Aliquam enim urna, mattis eu aliquet eget,
condimentum id nibh. In hac habitasse platea dictumst.
\item orem
ipsum dolor sit amet, consectetur adipiscing elit. Aliquam enim
urna, mattis eu aliquet eget, condimentum id nibh. In hac
habitasse platea dictumst.
\end{document}
I tried indent-region
but it doesn't do anything and the LaTeX-fill-*
produces weird results like:
\item orem ipsum dolor sit amet, consectetur
adipiscing elit. Aliquam enim urna, mattis eu aliquet eget,
condimentum id nibh. In hac habitasse platea dictumst. \item orem
ipsum dolor sit amet, consectetur adipiscing elit. Aliquam enim
urna, mattis eu aliquet eget, condimentum id nibh. In hac
habitasse platea dictumst. \end{document}
Thanks!
© Stack Overflow or respective owner