[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL |
Date: |
Wed, 16 Jul 2014 15:04:40 +0200 |
Hello,
Rasmus <address@hidden> 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
- [O] [bug?, org-element] latex-environment delimiters must be at BOL, Rasmus, 2014/07/10
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL,
Nicolas Goaziou <=
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL, Rasmus, 2014/07/18
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL, Nicolas Goaziou, 2014/07/20
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL, Rasmus, 2014/07/21
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL, Nicolas Goaziou, 2014/07/22
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL, Rasmus, 2014/07/22
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL, Nicolas Goaziou, 2014/07/22
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL, Rasmus, 2014/07/22
- Re: [O] [bug?, org-element] latex-environment delimiters must be at BOL, Nicolas Goaziou, 2014/07/23