public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: Unable to convert markdown to latex while it's in latex blocks
Date: Wed, 11 Nov 2020 09:09:53 +0100	[thread overview]
Message-ID: <87h7pws4a6.fsf@zeitkraut.de> (raw)
In-Reply-To: <8c50d176-a9cb-422a-b78f-1e8fd36dce52n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

Please
Bernardo Giordano writes:

> Hello. I'm facing the following issue:
>
> I have a markdown document that occasionally contains latex blocks, e.g.:
>
> # My Title
>
> \epigraph{
> \begin{center}
> Markdown text inside,
> occasionally *italic*
> \end{center}
> }{some epigraph author}
>
> Normal markdown text
> ...
>
> When converting from markdown to latex, italic text keeps the * rather than
> being transformed to \emph{}. Is there a workaround? Thank you

Telling LaTeX and Markdown apart is difficult, see also
https://github.com/jgm/pandoc/issues/2453

The best workaround (IMHO) is to mark the LaTeX explicitly,
ensuring that the rest will be interpreted as Markdown:

    # My Title

    `\epigraph{
    \begin{center}`{=latex}
    Markdown text inside,
    occasionally *italic*
    `\end{center}
    }{some epigraph author}`{=latex}

    Normal markdown text


--
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


  parent reply	other threads:[~2020-11-11  8:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  7:45 Bernardo Giordano
     [not found] ` <8c50d176-a9cb-422a-b78f-1e8fd36dce52n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-11  8:09   ` Albert Krewinkel [this message]
     [not found]     ` <87h7pws4a6.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2020-11-11  8:19       ` Bernardo Giordano
     [not found]         ` <8c42cf82-8531-4a70-bbb1-f56de736235fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-11-11  9:52           ` File transclusion with no-inline (on steroids) Gabriel Nützi
2020-11-11 18:09   ` Unable to convert markdown to latex while it's in latex blocks John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7pws4a6.fsf@zeitkraut.de \
    --to=albert+pandoc-9eawchwdxg8hfhg+jk9f0w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).