all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Different exporters behave differently re exporter-specific lines
@ 2019-10-29 13:24 Thibault Polge
  2019-10-29 15:54 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Thibault Polge @ 2019-10-29 13:24 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Different exporters behave differently re exporter-specific lines
  2019-10-29 13:24 Different exporters behave differently re exporter-specific lines Thibault Polge
@ 2019-10-29 15:54 ` Nicolas Goaziou
  2019-10-29 16:22   ` Thibault Polge
  2019-10-29 16:29   ` Fraga, Eric
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2019-10-29 15:54 UTC (permalink / raw)
  To: Thibault Polge; +Cc: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Different exporters behave differently re exporter-specific lines
  2019-10-29 15:54 ` Nicolas Goaziou
@ 2019-10-29 16:22   ` Thibault Polge
  2019-10-29 17:19     ` Nicolas Goaziou
  2019-10-29 16:29   ` Fraga, Eric
  1 sibling, 1 reply; 5+ messages in thread
From: Thibault Polge @ 2019-10-29 16:22 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Different exporters behave differently re exporter-specific lines
  2019-10-29 15:54 ` Nicolas Goaziou
  2019-10-29 16:22   ` Thibault Polge
@ 2019-10-29 16:29   ` Fraga, Eric
  1 sibling, 0 replies; 5+ messages in thread
From: Fraga, Eric @ 2019-10-29 16:29 UTC (permalink / raw)
  To: Thibault Polge; +Cc: emacs-orgmode@gnu.org

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Different exporters behave differently re exporter-specific lines
  2019-10-29 16:22   ` Thibault Polge
@ 2019-10-29 17:19     ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2019-10-29 17:19 UTC (permalink / raw)
  To: Thibault Polge; +Cc: emacs-orgmode

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,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-29 17:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-29 13:24 Different exporters behave differently re exporter-specific lines Thibault Polge
2019-10-29 15:54 ` Nicolas Goaziou
2019-10-29 16:22   ` Thibault Polge
2019-10-29 17:19     ` Nicolas Goaziou
2019-10-29 16:29   ` Fraga, Eric

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.