[-- Attachment #1: Type: text/plain, Size: 594 bytes --] I'm not sure how this feature is called, but in Org you can restrict a line to a given exporter by prepending it with, eg, #+latex: There's a bug with some exporters f treat these lines as paragraph breaks, some don't. For example, the following input: Hello #+latex: \TeX{} World #+html: Wide Web ! Is exported to LaTeX as a single line, "Hello TeX World !", but to HTML as separate paragraphs: <p> Hello </p> <p> World </p> Wide Web <p> ! </p> I wouldn't except these lines to introduce any paragraphs break. This is with Emacs built from Git, using Org 9.2.6. Best regards, Thibault [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 832 bytes --]
Hello, Thibault Polge <thibault@thb.lt> writes: > I'm not sure how this feature is called, but in Org you can restrict a line > to a given exporter by prepending it with, eg, #+latex: > > There's a bug with some exporters f treat these lines as paragraph breaks, > some don't. For example, the following input: This is not a bug in the exporters. The discrepancy exists in the output languages, in particular in paragraphs. Org uses a definition of a paragraph close to LaTeX's, so an Org paragraph isn't quite a HTML paragraph. > Hello > > #+latex: \TeX{} > World > > #+html: Wide Web > ! > > Is exported to LaTeX as a single line, I doubt it. There are 3 paragraphs, even for LaTeX, since there are empty lines. > "Hello TeX World !", but to HTML > as separate paragraphs: > > <p> > Hello > </p> > <p> > World > </p> > Wide Web > <p> > ! > </p> > > I wouldn't except these lines to introduce any paragraphs break. Of course they should. You should look at the definition of a paragraph, per Org syntax. Keywords cannot belong to a paragraph. Regards, -- Nicolas Goaziou
> I doubt it. There are 3 paragraphs, even for LaTeX, since there are > empty lines. I believe there may have been a communication issue somewhere, since you cite my message with extra \n --- there are no empty lines in my original message. For reference, here's the exact input I've used: <https://paste.thb.lt/1572354712.org>. The PDF output is at https://paste.thb.lt/test.pdf, the HTML output here https://paste.thb.lt/test.html As you can see, the LaTeX PDFs have everything in a single line, the HTML output displays four separate paragraphs. Best regards, Thibault
Thibault, in case you might find this useful, you can use the @@ construct to put things inline, causing less issues with paragraphs. For instance, you can write @@latex:\TeX{}@@. -- Eric S Fraga via Emacs 27.0.50, Org release_9.2.6-544-gd215c3
Thibault Polge <thibault@thb.lt> writes:
> As you can see, the LaTeX PDFs have everything in a single line, the
> HTML output displays four separate paragraphs.
This is because the definition of a paragraph in HTML, or LaTeX,isn't
the same as in Org. In this particular case, HTML matches Org
definition. LaTeX is more lax.
Regards,