public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* include images in tags when converting from gfm to docx
@ 2019-05-16 12:39 'Will Emmerson' via pandoc-discuss
       [not found] ` <5309a3a9-e616-48ab-93a1-742815d1b2dd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: 'Will Emmerson' via pandoc-discuss @ 2019-05-16 12:39 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 895 bytes --]

I have some github-flavoured markdown which includes divs and imgs:

<div align=center>
  <img src="images/schedule.png" width="500">
</div>

When I try to convert this to .docx, it renders everything in the div as 
text.
I realise that I can use ![text](image.png) format but then I lose the 
centre and width attributes.

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/5309a3a9-e616-48ab-93a1-742815d1b2dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 1913 bytes --]

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

* Re: include images in tags when converting from gfm to docx
       [not found] ` <5309a3a9-e616-48ab-93a1-742815d1b2dd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-05-17  7:35   ` mb21
  2019-05-17 18:19   ` John MacFarlane
  1 sibling, 0 replies; 3+ messages in thread
From: mb21 @ 2019-05-17  7:35 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1173 bytes --]

In pandoc markdown you can use:

![text](image.png){width=800}

see the MANUAL.

If you cannot change the input file, convert via html:

pandoc -f gfm -t html | pandoc -f html -t docx


On Thursday, May 16, 2019 at 2:39:41 PM UTC+2, Will Emmerson wrote:
>
> I have some github-flavoured markdown which includes divs and imgs:
>
> <div align=center>
>   <img src="images/schedule.png" width="500">
> </div>
>
> When I try to convert this to .docx, it renders everything in the div as 
> text.
> I realise that I can use ![text](image.png) format but then I lose the 
> centre and width attributes.
>
>

-- 
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/fd0bb525-83b4-4039-9c12-b79b62b121f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2183 bytes --]

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

* Re: include images in tags when converting from gfm to docx
       [not found] ` <5309a3a9-e616-48ab-93a1-742815d1b2dd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2019-05-17  7:35   ` mb21
@ 2019-05-17 18:19   ` John MacFarlane
  1 sibling, 0 replies; 3+ messages in thread
From: John MacFarlane @ 2019-05-17 18:19 UTC (permalink / raw)
  To: 'Will Emmerson' via pandoc-discuss, pandoc-discuss


The issue here is that gfm treats this as a raw HTML
block -- a block that gets passed through verbatim to
HTML.

When I convert this sample to docx using -f gfm, I
get (as I expected) an empty document.  The raw HTML
is simply ignored for docx output.

If you're getting text, it may be because you have a
blank line after the div tag and the inner content
indented 4 spaces -- that would create a code block.


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 12:39 include images in tags when converting from gfm to docx 'Will Emmerson' via pandoc-discuss
     [not found] ` <5309a3a9-e616-48ab-93a1-742815d1b2dd-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-05-17  7:35   ` mb21
2019-05-17 18:19   ` 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).