emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [POLL] Syntax change: make \[...\] non-inline (+1)


From: Nicolas Goaziou
Subject: Re: [O] [POLL] Syntax change: make \[...\] non-inline (+1)
Date: Sat, 02 Aug 2014 21:12:57 +0200

Hello,

Rasmus <address@hidden> writes:

> It works sensibly in latex-mode.  If your text is
>
>    My displayed \[equation\]
>    is here
>
> M-q will make it 
>
>    My displayed \[equation\] is here
>
> But 
>
>    My displayed
>    \[equation\]
>    is here
>
> Is unaltered by M-q (though it was not obvious to me how tex-mode.el
> implemented this).
>
> I didn't read the other thread is details, but it seems the most
> sensible thing to do is alter the org fill function(s).  These seems
> to rely on org-element, though, and I'm guessing that is why a syntax
> change is necessary, yes?

As explained in the original thread, this is not quite possible. Unlike
to LaTeX, Org puts a strong emphasis on the difference between inline
and non-inline blocks. You can write

  #+begin_center
  contents
  #+end_center

but not

  #+begin_center contents #+end_center

As you know, it doesn't matter much in LaTeX,

  \begin{equation} contents \end{equation}

is as fine as

  \begin{equation}
  contents
  \end{equation}

Of course, it would be possible to add extra code in filling functions
(and more) to mimic this behaviour, but that would really go against the
syntax.

Org is not LaTeX, nor it is meant to mimic it. \[...\] are either inline
or not, like every other construct. In the first case, M-q will fill
them within a paragraph. In the second case, it will not be possible to
have \[...\] in the middle of the line. Hence the poll.

IMO, filling \[...\] is a minor issue since you can write, e.g.,

  \begin{displaymath}
  ...
  \end{displaymath}

when you absolutely don't want M-q to be active. There is no strong
incentive to alter syntax or filling functions.


Regards,

-- 
Nicolas Goaziou



reply via email to

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