Different exporters behave differently re exporter-specific lines

2019-10-29 Thread Thibault Polge
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:


Hello


World

Wide Web

!


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


signature.asc
Description: PGP signature


Re: Different exporters behave differently re exporter-specific lines

2019-10-29 Thread Nicolas Goaziou
Hello,

Thibault Polge  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:
>
> 
> Hello
> 
> 
> World
> 
> Wide Web
> 
> !
> 
>
> 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



Re: Different exporters behave differently re exporter-specific lines

2019-10-29 Thread Thibault Polge
> 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:
.

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



Re: Different exporters behave differently re exporter-specific lines

2019-10-29 Thread Fraga, Eric
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



Re: Different exporters behave differently re exporter-specific lines

2019-10-29 Thread Nicolas Goaziou
Thibault Polge  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,