auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] Problem with the LaTeX-indent-environment-list


From: Uwe Brauer
Subject: [AUCTeX-devel] Problem with the LaTeX-indent-environment-list
Date: Thu, 26 Jul 2018 21:14:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Hi 

I am playing around with the comment package to hide and show parts of a
latex (poor man solution of lamports pf.sty).

So please look at the following minimal example
,----
| 
| \documentclass[12pt]{article}
| \usepackage{comment}
| \includecomment{proof1}
| \excludecomment{proof2}
| \begin{document}
| 
| Works 
| \begin{proof1}
| \begin{enumerate}
| \item level 1
| \begin{proof2}
| \begin{enumerate}
| \item level 2
| \end{enumerate}
| \end{proof2}
| \end{enumerate}
| \end{proof1}
|
| Does not work
| \begin{proof1}
|   \begin{enumerate}
|     \item level 1
|     \begin{proof2}
|       \begin{enumerate}
|         \item level 2
|       \end{enumerate}
|     \end{proof2}
|   \end{enumerate}
| \end{proof1}
| \end{document}
`----

The second one does not work because of some undesired indentation of
proof2.
So I thought the easiest way is to tell auctex to treat the proof1 and
proof2 environment to treat as if they were verbatim. So I have now 

,----
| LaTeX-indent-environment-list is a variable defined in ‘latex.el’.
| Its value is shown below.
| 
| Documentation:
| Alist of environments with special indentation.
| The second element in each entry is the function to calculate the
| indentation level in columns.
| 
| Environments present in this list are not filled by filling
| functions, see ‘LaTeX-fill-region-as-paragraph’.
| 
| You can customize this variable.
| 
| Value:
| (("proof1" current-indentation)
|  ("proof2" current-indentation)
|  ("proof3" current-indentation)
|  ("proof4" current-indentation)
|  ("verbatim" current-indentation)
|  ("verbatim*" current-indentation)
|  ("comment" current-indentation)
|  ("tabular" LaTeX-indent-tabular)
|  ("tabular*" LaTeX-indent-tabular)
|  ("align" LaTeX-indent-tabular)
|  ("align*" LaTeX-indent-tabular)
|  ("array" LaTeX-indent-tabular)
|  ("eqnarray" LaTeX-indent-tabular)
|  ("eqnarray*" LaTeX-indent-tabular)
|  ("displaymath")
|  ("equation")
|  ("equation*")
|  ("picture")
|  ("tabbing"))
| 
`----

However when I run  LaTeX-fill-environment on the first working example, then 
verbatim is *not*
indented but proof1 and proof2 are!!!!

What do I miss here? Is this a BUG?

Uwe Brauer 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]