[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: indentation
From: |
Tassilo Horn |
Subject: |
Re: indentation |
Date: |
Fri, 30 Apr 2021 22:17:07 +0200 |
User-agent: |
mu4e 1.5.12; emacs 28.0.50 |
Wayne Harris via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
Hi Wayne,
> Today I was writing some TeX and the following happened. Let me use
> ``[]'' to represent the point.
>
> \noindent {\em Notation.} As we often write polynomials in
> finite rings of characterisc 2, let's define
> %v
> \[\poly(x) = ...\]
> %e
> in the same way that it was used in the introduction. []%% Well...
>
> When I pressed RET, I got this
>
> \noindent {\em Notation.} As we often write polynomials in
> finite rings of characterisc 2, let's define
> %v
> \[\poly(x) = ...\]
> %e
> in the same way that it was used in the introduction.
> []%% Well...
Electric indent works well when you just let Emacs do the indentation.
In your example, Emacs wouldn't indent the inline math (hitting TAB in
that line makes it pop to column 0), and then the next sentence wouldn't
be indented as well. So basically you are fighting Emacs' LaTeX
indentation rules, and that becomes harder when `electric-indent-mode'
is enabled [1]. (At least with AUCTeX, `fill-paragraph' will also
adjust the indentation.)
FWIW, I'd write your example as
--8<---------------cut here---------------start------------->8---
\noindent {\em Notation.} As we often write polynomials in finite rings of
characterisc 2, let's define
\[
\poly(x) = ...
\]
in the same way that it was used in the introduction.
--8<---------------cut here---------------end--------------->8---
which is indented according to how AUCTeX would do it or the builtin
`latex-mode' if `latex-indent-within-escaped-parens' is t.
Bye,
Tassilo
- Re: on interface and behavior (Was: Re: indentation), (continued)
- Re: on interface and behavior (Was: Re: indentation), Eli Zaretskii, 2021/04/30
- Re: indentation, ptlo, 2021/04/30
- Re: indentation, Philip Kaludercic, 2021/04/30
- Re: indentation, ptlo, 2021/04/30
- Re: indentation, Thibaut Verron, 2021/04/30
- Re: indentation, ptlo, 2021/04/30
- RE: [External] : Re: indentation, Drew Adams, 2021/04/30
- Re: indentation, Jean Louis, 2021/04/30
- Re: indentation, Stefan Monnier, 2021/04/30
- Re: indentation, Wayne Harris, 2021/04/29
- Re: indentation,
Tassilo Horn <=