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: [bug?, org-element] latex-environment delimiters must be at BOL
Date: Wed, 16 Jul 2014 15:04:40 +0200	[thread overview]
Message-ID: <87iomxjvyv.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <877g3ltomt.fsf@gmx.us> (rasmus@gmx.us's message of "Thu, 10 Jul 2014 13:54:50 +0200")

Hello,

Rasmus <rasmus@gmx.us> writes:

> Looking at org-element-latex-environment-parser LaTeX environments are
> recognized as "[ \t]*\\\\begin{\\([A-Za-z0-9]+\\*?\\)}" (for start)
> and "^[ \t]*\\\\end{%s}[ \t]*$" (for the end).
>
> However, for e.g. small equations one might want to write
>
> (*)         \begin{equation} PLACEHOLDER \end{equation},
>
> i.e. in one line.  This fails to be recognized as the latter regexp is
> not satisfied.  For code generated by humans this is not an issue.
> However, e.g. SymPy generates code in the (*) format.  Prefixing (*)
> with "#+LATEX:" will prevent ox-html from recognizing it.
>
> Should org-element try to catch one-line environments as the one
> above?  Or is it "a can of worms"?

I think allowing them is possible, as long as \end{equation} ends the
last line (with trailing whitespaces tolerated).

I assume that, for simplicity, PLACEHOLDER could be longer than one
line, too.

If Bastien agrees and if you want to provide a patch, please be sure to
include tests in test-org-element.el, and appropriate changes to "Org
Syntax" document. The manual may need to be updated, too.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2014-07-16 13:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10 11:54 [bug?, org-element] latex-environment delimiters must be at BOL Rasmus
2014-07-16 13:04 ` Nicolas Goaziou [this message]
2014-07-18 15:49   ` Rasmus
2014-07-20 17:49     ` Nicolas Goaziou
2014-07-21  9:29       ` Rasmus
2014-07-22  7:54         ` Nicolas Goaziou
2014-07-22  9:08           ` Rasmus
2014-07-22 10:03             ` Nicolas Goaziou
2014-07-22 13:28               ` Rasmus
2014-07-23  8:29                 ` Nicolas Goaziou

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=87iomxjvyv.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).