* How to convert Markdown to RTF and keep the headings using Pandoc?
@ 2021-10-08 16:04 bolidesun
[not found] ` <5e172c05-1d61-4382-ad4c-5dfb77a520bdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: bolidesun @ 2021-10-08 16:04 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 973 bytes --]
When I convert the following markdown to .docx
# Header lvl 1
## Header lvl 2
Some text
## Another Header lvl 2
Some different text
The headings are showing properly when I open the .docx file. I'm using the
following arguments `-f native -s -o ${outputPath} -t docx`.
When converting to .rtf though, with `-f native -s -o ${outputPath} -t rtf`
, the headings aren't visible in the produced .rtf file; they show as
normal body style text.
Is there a way to force pandoc to keep the headings in the .rtf, the same
way it does in .docx?
Thank you.
--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5e172c05-1d61-4382-ad4c-5dfb77a520bdn%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1319 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to convert Markdown to RTF and keep the headings using Pandoc?
[not found] ` <5e172c05-1d61-4382-ad4c-5dfb77a520bdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-10-08 16:54 ` John MacFarlane
0 siblings, 0 replies; 2+ messages in thread
From: John MacFarlane @ 2021-10-08 16:54 UTC (permalink / raw)
To: bolidesun, pandoc-discuss
If you're converting from markdown, you should use -f markdown,
not -f native. So that confused me.
But headings should work properly in rtf. Here is what I
get when I convert your sample to rtf (looking at the rtf
with a regular text editor):
{\rtf1\ansi\deff0{\fonttbl{\f0 \fswiss Helvetica;}{\f1 \fmodern Courier;}}
{\colortbl;\red255\green0\blue0;\red0\green0\blue255;}
\widowctrl\hyphauto
{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel0 \b \fs36 Header lvl 1\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Header lvl 2\par}
{\pard \ql \f0 \sa180 \li0 \fi0 Some text\par}
{\pard \ql \f0 \sa180 \li0 \fi0 \outlinelevel1 \b \fs32 Another Header lvl 2\par}
}
As you can see, this includes font size switching commands.
Do you get the same thing?
bolidesun <krastev-lWZO6X+oKmKsTnJN9+BGXg@public.gmane.org> writes:
> When I convert the following markdown to .docx
>
> # Header lvl 1
>
> ## Header lvl 2
> Some text
>
> ## Another Header lvl 2
>
> Some different text
>
>
> The headings are showing properly when I open the .docx file. I'm using the
> following arguments `-f native -s -o ${outputPath} -t docx`.
>
> When converting to .rtf though, with `-f native -s -o ${outputPath} -t rtf`
>
> , the headings aren't visible in the produced .rtf file; they show as
> normal body style text.
>
> Is there a way to force pandoc to keep the headings in the .rtf, the same
> way it does in .docx?
>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5e172c05-1d61-4382-ad4c-5dfb77a520bdn%40googlegroups.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-08 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 16:04 How to convert Markdown to RTF and keep the headings using Pandoc? bolidesun
[not found] ` <5e172c05-1d61-4382-ad4c-5dfb77a520bdn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-10-08 16:54 ` John MacFarlane
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).