On Wednesday, 21 Jul 2021 at 21:48, Maxim Nikulin wrote:
> It is at least fragile. HTML export results in separate paragraphs:

Yes, I said "if exporting to LaTeX"... ;-)

> I am unsure, but "#+latex:" probably belongs to "Keywords" that are
> elements, so it should end a paragraph. If such interpretation is
> correct than either LaTeX exporter has a bug or syntax description
> should be justified.

No, I don't think of it as a keyword and it cannot end a paragraph as it
would then break any document that uses such constructs.  Not sure what
to call it but it falls into the same category as inline directives like
@@latex:...@@.  And, in fact, this would work as well as the first
example, again failing for HTML export:

--8<---------------cut here---------------start------------->8---
This is the first sentence.
@@latex:%@@ this is the second which is commented out.
And this is the third.
--8<---------------cut here---------------end--------------->8---

Both of these rely on the fact that % is a comment character for
LaTeX.  For HTML, you would have to something even more ugly, as in:

--8<---------------cut here---------------start------------->8---
This is the first sentence.
@@html:<!-- @@ this is the second which is commented out. @@html:-->@@
And this is the third.
--8<---------------cut here---------------end--------------->8---

and if you are really masochistic, you could combine the two:

--8<---------------cut here---------------start------------->8---
This is the first sentence.
@@latex:%@@@@html:<!-- @@ this is the second which is commented out. 
@@html:-->@@
And this is the third.
--8<---------------cut here---------------end--------------->8---

(untested) :-)

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-598-g604bfd
: Latest paper written in org: https://arxiv.org/abs/2106.05096

Reply via email to