Hello,

Rasmus <ras...@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 via email to