|
From: | Maxim Nikulin |
Subject: | Re: Comments break up a paragraph when writing one-setence-per-line |
Date: | Wed, 21 Jul 2021 23:13:14 +0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 21/07/2021 22:22, Eric S Fraga wrote:
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:
...
(untested) :-)
"@@backend:@@" aka Export Snippet is an "object", not "element" thus is should not start paragraph https://orgmode.org/worg/dev/org-syntax.html#Export_Snippets Though... With LaTeX you should be careful ---- >8 ---- One sentence is here. @@html:inline HTML@@ Second sentence. ---- 8< ---- Export to LaTeX: ---- >8 ---- One sentence is here. Second sentence. ---- 8< ----"@@latex:@@" line in HTML export generates empty line but does not break the paragraph. "#+html:" construct splits paragraphs:
One sentence is here. #+html: <!-- HTML --> Second sentence. <p> One sentence is here. </p> <!-- HTML --> <p> Second sentence. </p>I find behavior of HTML exporter more consistent but partially the difference originates in distinct interpretation of empty lines.
P.S. There are two types of comments: ones that should be exported as comments and that should be completely removed. "#+latex: %" comments leak to LaTeX, though they will be stripped during generation of PDF. So depending of what format you should provide, such behavior may be acceptable or not.
[Prev in Thread] | Current Thread | [Next in Thread] |