auctex
[Top][All Lists]
Advanced

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

Re: Changing auto-indent behaviour for tabular environments


From: pglpm
Subject: Re: Changing auto-indent behaviour for tabular environments
Date: Wed, 29 Jun 2022 16:41:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

PS: You can also turn off this special kind of aligned indentation for all LaTeX 
environments via the customizable variable "Latex Indent Environment Check".

Finally, as something more advanced, one could re-define the built-in 
"LaTeX-indent-tabular" function, in such a way that this kind of indentation 
does not take place when some rows are too long. But I fear such redefinition could break 
some things either now or in future AUCTeX updates.

Cheers,
Luca


On 06-29 16:31, pglpm@duralexnonlex.org wrote:
Hi Jason,

I think the relevant variable is "Latex Indent Environment List", which you can 
customize. You can for example delete the "tabular" entry, or deactivate its indenting 
function or replace it with something different.

Let me know if you need more info or if this is enough.

Cheers,
Luca

On 06-29 15:18, Alexander,J wrote:
Hello,

I’ve encountered some unwanted behaviour with the auto-indent behaviour for 
tabular environments.  Suppose I have the following source, (with the cursor at 
* on the next-to-last line):

   \begin{tabular}{p{4cm}ccc}
     \citet{Moses/Letnes:2004,Moses/Letnes:2005} & Complete
     & 73.6 & 96.5\\
     & Partial & 29.3 & 54.8\\*
   \end{tabular}

If I type C-j to add a new line and auto-indent, I end up with the following 
(cursor at *):

   \begin{tabular}{p{4cm}ccc}
     \citet{Moses/Letnes:2004,Moses/Letnes:2005} & Complete
     & 73.6 & 96.5\\
                                                 & Partial & 29.3 & 54.8\\
     *
   \end{tabular}

I would like to turn off this behaviour, because it can make the source text 
hard to read — especially if there is a lot of text before the first column 
indicator.  And I’ve noticed that this not only affects the tabular 
environment, but amsmath environments like align as well.

I’ve googled and tried to find the relevant option to suppress this, but I’ve 
been unsuccessful. Any recommendations would be appreciated!

Best wishes,

Jason



reply via email to

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