* image that resizes automatically to screen size in epub
@ 2020-06-14 22:15 Chris Jones
[not found] ` <b49a95c6-772c-43ac-9bc5-0011ed206c38o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Chris Jones @ 2020-06-14 22:15 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 1183 bytes --]
I have an image meant to be fit exactly one page (or should I say
screenful) that I would like the e-reading application to resize
automatically to the size of the e-reader's screen while preserving aspect
ration as is already done with the cover image.
The image can be a png, jpeg, or svg (the png and jpeg are generated from
the svg, itself created initially under latex as a pdf and converted to svg
via inkscape).
The svg file displays correctly under firefox and can be resized with no
visible loss of crispness & resolution.
Is there any way to do this currently in pandoc?
Thanks,
CJ
N.B. I tried to open this via the traditional mailing list
pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org from my mailer and it apparently never got
through.
--
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/b49a95c6-772c-43ac-9bc5-0011ed206c38o%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 1528 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <b49a95c6-772c-43ac-9bc5-0011ed206c38o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-06 19:50 ` Chris Jones
2020-10-06 22:15 ` Charles Richer Saint-Faure
2020-10-26 19:06 ` Chris Jones
2 siblings, 0 replies; 12+ messages in thread
From: Chris Jones @ 2020-10-06 19:50 UTC (permalink / raw)
To: pandoc-discuss
On Sun, Jun 14, 2020 at 06:15:47PM EDT, Chris Jones wrote:
> I have an image meant to be fit exactly one page (or should I say
> screenful) that I would like the e-reading application to resize
> automatically to the size of the e-reader's screen while preserving aspect
> ration as is already done with the cover image.
>
> The image can be a png, jpeg, or svg (the png and jpeg are generated from
> the svg, itself created initially under latex as a pdf and converted to svg
> via inkscape).
>
> The svg file displays correctly under firefox and can be resized with no
> visible loss of crispness & resolution.
>
> Is there any way to do this currently in pandoc?
>
> Thanks,
>
> CJ
>
> N.B. I tried to open this via the traditional mailing list
> pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org from my mailer and it apparently never got
> through.
I thought I'd experiment a little and use some "raw latex":
| # Planche 7
| <div id="cover-image">
| <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 900 1200" preserveAspectRatio="none">
| <image width="900" height="1200" xlink:href="images/planches/pl7.jpg" />
| </svg>
| </div>
This html snippet works as expected when I manaually create the epub:
the pl7.jpg image is automatically sized to the full size of a 4:3
screen (by most ereader software).
But when I run a "pandoc md/snippet.md -o snippet.epub" command or such
the ensuing epubcheck complains about not finding pl7.jpg in the epub.
A quick look inside the epub reveals that the jpeg image is not
referenced in the EPUB/content.opf (the "manifest", I believe they call
it...) and that pandoc did not copy the image file to the EPUB/media/
directory.
In effect it looks as if pandoc silently ignores the contents of the
<image ... /> tag.
Is this the expected behaviour?
If so what would be the recommended workaroundą?
Thanks,
CJ
--
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/20201006195011.GA20694%40turki.local.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <b49a95c6-772c-43ac-9bc5-0011ed206c38o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-06 19:50 ` Chris Jones
@ 2020-10-06 22:15 ` Charles Richer Saint-Faure
[not found] ` <a0514cc8-560e-40b2-802e-aed2b58930a8o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-26 19:06 ` Chris Jones
2 siblings, 1 reply; 12+ messages in thread
From: Charles Richer Saint-Faure @ 2020-10-06 22:15 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 8106 bytes --]
On Sunday, June 14, 2020 at 6:15:47 PM UTC-4, Chris Jones wrote:
>
> I have an image meant to be fit exactly one page (or should I say
> screenful) that I would like the e-reading application to resize
> automatically to the size of the e-reader's screen while preserving aspect
> ration as is already done with the cover image.
>
> The image can be a png, jpeg, or svg (the png and jpeg are generated from
> the svg, itself created initially under latex as a pdf and converted to svg
> via inkscape).
>
> The svg file displays correctly under firefox and can be resized with no
> visible loss of crispness & resolution.
>
> Is there any way to do this currently in pandoc?
>
> Thanks,
>
> CJ
>
**Update**
I thought I'd experiment a little and use some "raw
latex":
| # Planche
7
| <div
id="cover-image">
| <svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%"
height="100%" viewBox="0 0 900 1200"
preserveAspectRatio="none">
| <image width="900" height="1200" xlink:href="images/planches/pl7.jpg"
/>
|
</svg>
|
</div>
This html snippet below the #h1 markdown title works as expected when I
manaually create the epub: the pl7.jpg image is automatically sized to the
full size of a 4:3 screen (by most ereader
software).
But when I run a "pandoc md/snippet.md -o snippet.epub" command or such the
ensuing epubcheck complains about not finding pl7.jpg in the epub. A quick
look inside the epub reveals that the jpeg image is not referenced in the
EPUB/content.opf (the "manifest", I believe they call it...) and that
pandoc did not
In effect it looks as if pandoc silently ignores the contents of the <image
... />
tag.
Is this the expected
behaviour?
If so what would be the recommended
workaround¹?
Thanks,
CJ
--
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/a0514cc8-560e-40b2-802e-aed2b58930a8o%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 14441 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <a0514cc8-560e-40b2-802e-aed2b58930a8o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-07 4:45 ` John MacFarlane
0 siblings, 0 replies; 12+ messages in thread
From: John MacFarlane @ 2020-10-07 4:45 UTC (permalink / raw)
To: Charles Richer Saint-Faure, pandoc-discuss
Pandoc will include images in the EPUB, but it doesn't look
inside svg elements (or other raw HTML content).
Charles Richer Saint-Faure <richer.saint.faure-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> On Sunday, June 14, 2020 at 6:15:47 PM UTC-4, Chris Jones wrote:
>>
>> I have an image meant to be fit exactly one page (or should I say
>> screenful) that I would like the e-reading application to resize
>> automatically to the size of the e-reader's screen while preserving aspect
>> ration as is already done with the cover image.
>>
>> The image can be a png, jpeg, or svg (the png and jpeg are generated from
>> the svg, itself created initially under latex as a pdf and converted to svg
>> via inkscape).
>>
>> The svg file displays correctly under firefox and can be resized with no
>> visible loss of crispness & resolution.
>>
>> Is there any way to do this currently in pandoc?
>>
>> Thanks,
>>
>> CJ
>>
>
> **Update**
>
> I thought I'd experiment a little and use some "raw
> latex":
>
>
>
> | # Planche
> 7
>
> | <div
> id="cover-image">
>
> | <svg xmlns="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%"
> height="100%" viewBox="0 0 900 1200"
> preserveAspectRatio="none">
>
> | <image width="900" height="1200" xlink:href="images/planches/pl7.jpg"
> />
>
> |
> </svg>
>
> |
> </div>
>
>
>
> This html snippet below the #h1 markdown title works as expected when I
> manaually create the epub: the pl7.jpg image is automatically sized to the
> full size of a 4:3 screen (by most ereader
> software).
>
>
>
> But when I run a "pandoc md/snippet.md -o snippet.epub" command or such the
> ensuing epubcheck complains about not finding pl7.jpg in the epub. A quick
> look inside the epub reveals that the jpeg image is not referenced in the
> EPUB/content.opf (the "manifest", I believe they call it...) and that
> pandoc did not
>
>
> In effect it looks as if pandoc silently ignores the contents of the <image
> ... />
> tag.
>
>
>
> Is this the expected
> behaviour?
>
>
>
> If so what would be the recommended
> workaround¹?
>
>
>
> Thanks,
>
>
>
> CJ
>
> --
> 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/a0514cc8-560e-40b2-802e-aed2b58930a8o%40googlegroups.com.
--
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/m2k0w2od8u.fsf%40MacBook-Pro.hsd1.ca.comcast.net.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <b49a95c6-772c-43ac-9bc5-0011ed206c38o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-06 19:50 ` Chris Jones
2020-10-06 22:15 ` Charles Richer Saint-Faure
@ 2020-10-26 19:06 ` Chris Jones
[not found] ` <220286f4-8dab-4a80-9ad6-4794e15f1961o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2 siblings, 1 reply; 12+ messages in thread
From: Chris Jones @ 2020-10-26 19:06 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2029 bytes --]
What I see is the following processing of raw HTML when creating an EPUB:
1. Tags of the form:
<p><img src=menus/jpg/01.jpg style="height:100.0%" /></p>
are processed to some extent insofar as the description of the file is
added to the resulting content.opf manifest and the image is copied to the
EPUB/media/ directory
2. <svg></svg> tabs are also partially processed: their presence in a file
(book chapter) automatically causes pandoc to add "properties=svg"
qualifier to the file's description in the manifest. On the other hand what
lives inside the svg wrapper is ignored.
In case s/o runs into the same issue my best effort to workaround this
difficulty:
1. add <img ... /> raw HTML referencing the images to the md source: causes
pandoc to add them as 'media-type="image/png" (e.g.) to the manifest and
copy the png/jpg files to the resulting epub.
2. add dummy <svg></svg> empty entries to all files/chapters that reference
images so that pandoc marks the output files with the "properties=svg"
attribute in the conten.opf manifest (stops epubcheck complain)
3. run pandoc
4. unzip the epub and batch edit the files in the EPUB/text/ directory... a
lengthy but simple regex will replace all the <img /> by <svg></svg>
wrappers + <images /> and zip the stuff back into place as if nothing
happened.
Questionable... but easier than patching the code.
Not pandoc-related but for those who have a vested interest in epub's there
is a lengthy not too technical article called *Image handling in ePubs
reaches new level of inanity* by one *M. A. Demers* one her site:
(mademers.com)
--
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/220286f4-8dab-4a80-9ad6-4794e15f1961o%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3941 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <220286f4-8dab-4a80-9ad6-4794e15f1961o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-26 21:17 ` John MacFarlane
[not found] ` <m27drcoffg.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: John MacFarlane @ 2020-10-26 21:17 UTC (permalink / raw)
To: Chris Jones, pandoc-discuss
Chris Jones <cjns1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> What I see is the following processing of raw HTML when creating an EPUB:
>
> 1. Tags of the form:
>
> <p><img src=menus/jpg/01.jpg style="height:100.0%" /></p>
>
> are processed to some extent insofar as the description of the file is
> added to the resulting content.opf manifest and the image is copied to the
> EPUB/media/ directory
>
> 2. <svg></svg> tabs are also partially processed: their presence in a file
> (book chapter) automatically causes pandoc to add "properties=svg"
> qualifier to the file's description in the manifest. On the other hand what
> lives inside the svg wrapper is ignored.
I believe this was just fixed a couple days ago:
commit 4bf171e11dd324f5c65e15da17717b701e961b17
Author: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
Date: Fri Oct 23 21:56:12 2020 -0700
HTML reader: parse inline svg as image...
...unless `raw_html` is set in the reader (in which case
the svg is passed through as raw HTML).
Closes #6770.
You can try with a nightly.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <m27drcoffg.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-10-28 18:31 ` cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[not found] ` <04e6652d-6db6-4090-b2f1-db7acc33edd2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-10-28 18:31 UTC (permalink / raw)
To: pandoc-discuss
[-- Attachment #1.1: Type: text/plain, Size: 2491 bytes --]
Here's the code:
<div id="pl01">
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%"
height="100%" viewBox="0 0 900 1200" preserveAspectRatio="none">
<image width="900" height="1200" xlink:href="../media/pl001.jpg" />
</svg>
</div>
The jpg image is invoked via "xlink:href="
Unless I'm getting confused with the relative path the nightly version
still does not pull the referenced file: it's nowhere to be found either in
the EPUB/content.opf manifest nor does it get copied over to EPUB/media/*
On the other hand pandoc does understand the <svg></svg> tag: in the
content.opf manifest of the resulting EPUB the description of the
ch001.xhtml that contains the above code includes the "properties=svg"
attribute.
My guess is that pandoc does not understand the "xlink:ref=" syntax.
CJ
On Monday, October 26, 2020 at 5:17:42 PM UTC-4 John MacFarlane wrote:
> Chris Jones <cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > What I see is the following processing of raw HTML when creating an EPUB:
> >
> > 1. Tags of the form:
> >
> > <p><img src=menus/jpg/01.jpg style="height:100.0%" /></p>
> >
> > are processed to some extent insofar as the description of the file is
> > added to the resulting content.opf manifest and the image is copied to
> the
> > EPUB/media/ directory
> >
> > 2. <svg></svg> tabs are also partially processed: their presence in a
> file
> > (book chapter) automatically causes pandoc to add "properties=svg"
> > qualifier to the file's description in the manifest. On the other hand
> what
> > lives inside the svg wrapper is ignored.
>
> I believe this was just fixed a couple days ago:
>
> commit 4bf171e11dd324f5c65e15da17717b701e961b17
> Author: John MacFarlane <j...-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
> Date: Fri Oct 23 21:56:12 2020 -0700
>
> HTML reader: parse inline svg as image...
>
> ...unless `raw_html` is set in the reader (in which case
> the svg is passed through as raw HTML).
>
> Closes #6770.
>
> You can try with a nightly.
>
>
--
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/04e6652d-6db6-4090-b2f1-db7acc33edd2n%40googlegroups.com.
[-- Attachment #1.2: Type: text/html, Size: 3594 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <04e6652d-6db6-4090-b2f1-db7acc33edd2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2020-10-29 0:09 ` John MacFarlane
[not found] ` <m25z6tuc4a.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: John MacFarlane @ 2020-10-29 0:09 UTC (permalink / raw)
To: cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss
"cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <cjns1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Here's the code:
>
> <div id="pl01">
> <svg xmlns="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%"
> height="100%" viewBox="0 0 900 1200" preserveAspectRatio="none">
> <image width="900" height="1200" xlink:href="../media/pl001.jpg" />
> </svg>
> </div>
>
> The jpg image is invoked via "xlink:href="
>
> Unless I'm getting confused with the relative path the nightly version
> still does not pull the referenced file: it's nowhere to be found either in
> the EPUB/content.opf manifest nor does it get copied over to EPUB/media/*
>
> On the other hand pandoc does understand the <svg></svg> tag: in the
> content.opf manifest of the resulting EPUB the description of the
> ch001.xhtml that contains the above code includes the "properties=svg"
> attribute.
>
> My guess is that pandoc does not understand the "xlink:ref=" syntax.
That's right. It probably wouldn't hurt just to globally allow this as a
fallback if src isn't present.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <m25z6tuc4a.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-10-29 0:21 ` John MacFarlane
[not found] ` <m2zh45swys.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: John MacFarlane @ 2020-10-29 0:21 UTC (permalink / raw)
To: cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss
John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
> "cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <cjns1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
>> Here's the code:
>>
>> <div id="pl01">
>> <svg xmlns="http://www.w3.org/2000/svg"
>> xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%"
>> height="100%" viewBox="0 0 900 1200" preserveAspectRatio="none">
>> <image width="900" height="1200" xlink:href="../media/pl001.jpg" />
>> </svg>
>> </div>
>>
>> The jpg image is invoked via "xlink:href="
>>
>> Unless I'm getting confused with the relative path the nightly version
>> still does not pull the referenced file: it's nowhere to be found either in
>> the EPUB/content.opf manifest nor does it get copied over to EPUB/media/*
>>
>> On the other hand pandoc does understand the <svg></svg> tag: in the
>> content.opf manifest of the resulting EPUB the description of the
>> ch001.xhtml that contains the above code includes the "properties=svg"
>> attribute.
>>
>> My guess is that pandoc does not understand the "xlink:ref=" syntax.
>
> That's right. It probably wouldn't hurt just to globally allow this as a
> fallback if src isn't present.
Hm. The raw HTML is passed through to the EPUB (at least in
current master with the svg fix). The problem is that pandoc
doesn't "see" the jpg and thus doesn't include it in the manifest
or media. That's because the SVG lives in the AST as a raw HTML
element, not an Image, and pandoc only fetches contents for
Images.
The change I referred to earlier causes svg elements in HTML
to be parsed as images (with data: urls encoding the SVG
content). But it only does that if `raw_html` is disabled
in the reader. If `raw_html` is enabled, it just parses
the SVG element as raw HTML. The problem is that your input
source is Markdown, not HTML, and the only thing the Markdown
reader does with HTML is return raw HTML blocks/inlines.
(It does not try to parse this HTML and assign it a meaning.)
You can work around this, actually!
% pandoc -f html -t markdown
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%"
height="100%" viewBox="0 0 900 1200" preserveAspectRatio="none">
<image width="900" height="1200" xlink:href="../media/pl001.jpg" />
</svg>
^D
![](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdib3g9IjAgMCA5MDAgMTIwMCIgcHJlc2VydmVhc3BlY3RyYXRpbz0ibm9uZSI+CjxpbWFnZSB3aWR0aD0iOTAwIiBoZWlnaHQ9IjEyMDAiIGhyZWY9Ii4uL21lZGlhL3BsMDAxLmpwZyI+PC9pbWFnZT4KPC9zdmc+)
Just include that Markdown image tag in your document instead of
the HTML svg element, and everything should work properly (with
the pandoc nightly).
--
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/m2zh45swys.fsf%40MacBook-Pro.hsd1.ca.comcast.net.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <m2zh45swys.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
@ 2020-10-31 20:34 ` cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[not found] ` <20201031203402.gutswizwu477rh3y-611mE6nXTcHDOqzlkpFKJg@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org @ 2020-10-31 20:34 UTC (permalink / raw)
To: pandoc-discuss
On Wed, Oct 28, 2020 at 08:21:47PM EDT, John MacFarlane wrote:
> John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:
>
> > "cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <cjns1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> You can work around this, actually!
>
> % pandoc -f html -t markdown
> <svg xmlns="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%"
> height="100%" viewBox="0 0 900 1200" preserveAspectRatio="none">
> <image width="900" height="1200" xlink:href="../media/pl001.jpg" />
> </svg>
> ^D
> ![](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdib3g9IjAgMCA5MDAgMTIwMCIgcHJlc2VydmVhc3BlY3RyYXRpbz0ibm9uZSI+CjxpbWFnZSB3aWR0aD0iOTAwIiBoZWlnaHQ9IjEyMDAiIGhyZWY9Ii4uL21lZGlhL3BsMDAxLmpwZyI+PC9pbWFnZT4KPC9zdmc+)
>
> Just include that Markdown image tag in your document instead of
> the HTML svg element, and everything should work properly (with
> the pandoc nightly).
Clever bit of thinking outside the box that sounded promising.
I eventually got the html → markdown conversion to create the
base64-encoded HTML ... but when I run pandoc on the file where
I copy-pated '![](data: image... base64)' etc. etc. it creates an OK
epub as per epubcheck but when I look inside it contains
a ../media/file01.svg (correctly referenced by content.opf) instead of
the expected a ../media/file01.jpg. And as to ../media/file01.svg it
contains the <svg> ... <image href= ... pl001.jpg \></svg> HTML.
Not sure if I misread your post and maybe I am not doing it right but as
far as I can tell this not doing what was intended.
Am I missing something?
Thanks,
CJ
--
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/20201031203402.gutswizwu477rh3y%40turki.local.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: image that resizes automatically to screen size in epub
[not found] ` <20201031203402.gutswizwu477rh3y-611mE6nXTcHDOqzlkpFKJg@public.gmane.org>
@ 2020-10-31 22:59 ` John MacFarlane
0 siblings, 0 replies; 12+ messages in thread
From: John MacFarlane @ 2020-10-31 22:59 UTC (permalink / raw)
To: cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, pandoc-discuss
"cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <cjns1989-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Not sure if I misread your post and maybe I am not doing it right but as
> far as I can tell this not doing what was intended.
No, I was wrong in thinking this would help.
The reference to the jpg inside the svg still isn't picked up.
^ permalink raw reply [flat|nested] 12+ messages in thread
* image that resizes automatically to screen size in epub
@ 2020-06-12 20:00 Chris Jones
0 siblings, 0 replies; 12+ messages in thread
From: Chris Jones @ 2020-06-12 20:00 UTC (permalink / raw)
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw
I have an image meant to be fit exactly one page (or should I say
screenful) that I would like the e-reading application to resize
automatically to the size of the e-reader's screen as is already done
with the cover image.
The image can be a png, jpeg, or svg (the png and jpeg are generated
from the svg, itself created initially under latex as a pdf and
converted to svg via inkscape).
The svg file displays correctly under firefox and can be resized with no
visible loss of crispness & resolution.
Is there any way to do this currently in pandoc?
Thanks,
CJ
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-10-31 22:59 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 22:15 image that resizes automatically to screen size in epub Chris Jones
[not found] ` <b49a95c6-772c-43ac-9bc5-0011ed206c38o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-06 19:50 ` Chris Jones
2020-10-06 22:15 ` Charles Richer Saint-Faure
[not found] ` <a0514cc8-560e-40b2-802e-aed2b58930a8o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-07 4:45 ` John MacFarlane
2020-10-26 19:06 ` Chris Jones
[not found] ` <220286f4-8dab-4a80-9ad6-4794e15f1961o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-26 21:17 ` John MacFarlane
[not found] ` <m27drcoffg.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-10-28 18:31 ` cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[not found] ` <04e6652d-6db6-4090-b2f1-db7acc33edd2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-10-29 0:09 ` John MacFarlane
[not found] ` <m25z6tuc4a.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-10-29 0:21 ` John MacFarlane
[not found] ` <m2zh45swys.fsf-jF64zX8BO08an7k8zZ43ob9bIa4KchGshsV+eolpW18@public.gmane.org>
2020-10-31 20:34 ` cjns...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
[not found] ` <20201031203402.gutswizwu477rh3y-611mE6nXTcHDOqzlkpFKJg@public.gmane.org>
2020-10-31 22:59 ` John MacFarlane
-- strict thread matches above, loose matches on Subject: below --
2020-06-12 20:00 Chris Jones
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).