emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Federico Beffa <beffa@ieee.org>
To: emacs-orgmode@gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>
Subject: Re: Bug: wrong interpretation of LaTeX [8.2.6 (8.2.6-47-ge3d2c1-elpa @ c:/Users/beffa/.emacs.d/elpa/org-20140526/)]
Date: Sun, 27 Jul 2014 11:27:25 +0200	[thread overview]
Message-ID: <CAKrPhPPaFwAbFBB4hsYm9x+FCajgR+qb7nvC61qG9275Ldri6Q@mail.gmail.com> (raw)
In-Reply-To: <CAKrPhPOQgSWfdkPw1pUZdtpKpVfZQPc7NrEWOfz0hsN5LQn8BQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2834 bytes --]

Hi Nicolas,

I understand that org-mode is not LaTeX and therefore the org-mode
internal representation of LaTeX should not matter to end users like
me. That's fair enough. In the end of the day the reason why I started
looking into this is the fact that I do not find user friendly that
org-mode, when filling a paragraph, interprets \[...\] as any inline
snippet and does not keep it on a separate line (as recommended by the
LaTeX manual, see attached document). That's it.
I've therefore started messing around with
org-element-paragraph-separate, but after a while I thought that it
would be better to look at how the \begin...\end environments are
handled and try to do the same with \[...\]. That's how I noticed the
difference between the two (and perceived it as wrong handling of
\[...\]). I just thought that correcting the filling behavior of
org-mode would be useful to all users of org-mode and not just me.

In any case, if it's just me, I would greatly appreciate an advice on
how to achieve my goal from somebody with a good understanding of the
internals of org-mode. Is there a better way than just changing
org-element-paragraph-separate?

Thank you in advance for any advice.
Best Regards,
Fede

P.S.: I've attached for reference two pages, from the book written by
LaTeX's creator (the book I've mentioned on my first email), on how to
use the various mathematical constructs.

On Sat, Jul 26, 2014 at 11:20 AM, Federico Beffa <beffa@ieee.org> wrote:
> I understand that. However, using \[...\] inline within a paragraph is
> not the intended use of \[...\]. The use of \[...\] is for
> mathematical expressions which you want to stand out, on their own
> lines.
>
> For inline mathematical expressions there are the constructs \(...\) and $...$.
>
> Regards,
> Fede
>
> On Sat, Jul 26, 2014 at 10:26 AM, Nicolas Goaziou
> <mail@nicolasgoaziou.fr> wrote:
>> Federico Beffa <beffa@ieee.org> writes:
>>
>>> Of course \[ 1+1 \] is valid LaTeX syntax, just as inline
>>> \begin{displaymath} 1+1 \end{displaymath} is valid.
>>
>> But \begin{displaymath} 1+1 \end{displaymath} isn't valid in an Org
>> paragraph.
>>
>>> In my opinion a construct which will be displayed on a line by itself
>>> and with some space separating it from the preceding and the following
>>> text lines such as "\[ ... \]" would be better represented as a
>>> latex-environment and not an inline latex-fragment. In this way the
>>> org-mode text representation with proper fill-paragraph handling would
>>> be much more readable and consistent with the meaning of the syntax
>>> that it borrowed.
>>
>> That would prevent \[...\] to be recognized within a paragraph, as in
>> the example above. I don't think it's worth removing it as long as there
>> is a latex-environment alternative for it.
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou

[-- Attachment #2: latex-math.pdf --]
[-- Type: application/pdf, Size: 87567 bytes --]

  reply	other threads:[~2014-07-27  9:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25 13:04 Bug: wrong interpretation of LaTeX [8.2.6 (8.2.6-47-ge3d2c1-elpa @ c:/Users/beffa/.emacs.d/elpa/org-20140526/)] Federico Beffa
2014-07-25 18:32 ` Nicolas Goaziou
2014-07-25 20:39   ` Federico Beffa
2014-07-26  8:26     ` Nicolas Goaziou
2014-07-26  9:20       ` Federico Beffa
2014-07-27  9:27         ` Federico Beffa [this message]
2014-07-27 16:46           ` Nicolas Goaziou
2014-07-28 11:16             ` Federico Beffa
2014-07-28 12:03               ` Nicolas Goaziou
2014-07-27 11:36       ` Bastien

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=CAKrPhPPaFwAbFBB4hsYm9x+FCajgR+qb7nvC61qG9275Ldri6Q@mail.gmail.com \
    --to=beffa@ieee.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@nicolasgoaziou.fr \
    /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).