emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [POLL] Syntax change: make \[...\] non-inline (+1)
Date: Sat, 02 Aug 2014 21:12:57 +0200	[thread overview]
Message-ID: <8761iahfie.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <877g2t3nox.fsf@gmx.us> (rasmus@gmx.us's message of "Thu, 31 Jul 2014 10:03:10 +0100")

Hello,

Rasmus <rasmus@gmx.us> 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	other threads:[~2014-08-02 19:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-30 16:50 [POLL] Syntax change: make \[...\] non-inline (+1) Federico Beffa
2014-07-30 17:17 ` Nick Dokos
2014-07-31  9:03 ` Rasmus
2014-08-02 19:12   ` Nicolas Goaziou [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-07-30 20:19 Federico Beffa
2014-08-01  8:22 Federico Beffa
2014-08-03 16:32 Federico Beffa
2014-08-03 18:19 ` Nick Dokos
2014-08-03 20:05 Federico Beffa
2014-08-03 20:48 ` Nick Dokos
2014-08-04  8:55 ` Rasmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8761iahfie.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).