emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pandoc and nested emhases


From: Juan Manuel Macías
Subject: Re: Pandoc and nested emhases
Date: Sun, 22 Oct 2023 19:15:00 +0000

Sorry for the late reply. I haven't had much time these days to
keep up with the list...

Max Nikulin writes:

> It was long time ago...
>
> On 18/02/2022 07:47, Juan Manuel Macías wrote:
>> Otherwise, if you export to LaTeX with pandoc (v. 2.14.2), the result is
>> (to my surprise) correct:
>> #+begin_src sh :results latex
>> str="/lorem /ipsum/ dolor/"
>> pandoc -f org -t latex <<< $str
>> #+end_src
>> #+RESULTS:
>> #+begin_export latex
>> \emph{lorem \emph{ipsum} dolor}
>> #+end_export
>
> Nesting of the same emphasis style may be achieved with Org parser as well:
>
> (org-export-string-as
>  "/lorem /ipsum// /dolor/"
>  'latex t)
> "\\emph{lorem \\emph{ipsum}} \\emph{dolor}
> "
>
> Namely closing markers should be combined. See the recent thread
> Tom Alexander to emacs-orgmode. Inconsistent text markup handling when
> double-nesting markers. Mon, 09 Oct 2023 19:02:18 -0400.
> dad964f5-c764-4dd5-9829-ca38e3fbeb0d@app.fastmail.com">https://list.orgmode.org/dad964f5-c764-4dd5-9829-ca38e3fbeb0d@app.fastmail.com

Interesting. So it should be understood that in Org syntax this dummy
title would be possible:

/Essays on Homer's /Odyssey//

==>

\emph{Essays on Homer's \emph{Odyssey}}

but not this other one:

/Essays on Homer's /Odyssey/. Part One/

\emph{Essays on Homer's /Odyssey}. Part One/

In any case, as Ihor commented in the thread you link, and as you also
commented in the other old thread of my discovery about Pandoc, this
behavior of Pandoc should be understood as a bug since it does not
respect the Org syntax. Although the previous example leaves me a little
perplexed.

Actually, I think nested emphases of equal category are not that
necessary. In general, putting something like \textbf{lorem
\textbf{ipsum} dolor} in LaTeX doesn't make much sense, because \textbf
is not a switch. It would only make sense with the LaTeX \emph command,
which, contrary to what some may think, is not used to put text in
italics (that's what \textit is for), but to emphasize a text according
to the context: if the context is in normal font, italics; and vice
versa. If I don't miss anything, I think there is nothing similar in
either html or odt/docx.


-- 
Juan Manuel Macías



reply via email to

[Prev in Thread] Current Thread [Next in Thread]