From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: Sal Migondis <salmig99-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
pandoc-discuss
<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: pandoc markdown to epub conversion - customize EPUB/text/cover.xhtml
Date: Wed, 03 Jul 2019 09:59:51 -0700 [thread overview]
Message-ID: <871rz7m4u0.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <a69adf22-5bde-4df3-9d43-fba2c67f4faa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
The cover page uses the default.epub3 (or .epub2)
template, but with the coverpage variable set to
true. So you can use a custom template that
changes what is inserted when that variable is set.
The template variable epub-cover-image should
contain the image file name.
Sal Migondis <salmig99-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> Is there any way I can customize the generated EPUB/text/cover.xhtml file
> created by pandoc?
>
> Basically I would need to replace the default:
>
> <div id="cover-image">
>> <img src="../media/cover.png" alt="cover image" />
>> </div>
>>
>>
> By something like this:
>
> <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="../media/cover.png"/>
>> </svg>
>> </div>
>>
>>
> The idea is to wrap the cover image in an <svg> </svg> tag so that it
> scales to the dimensions of the e-reader.
>
> Note that 900x1200 just happens to be the dimensions of the default covers
> I generate on my system.
>
> I am having a problem where my covers are not correctly displayed on the
> e-reader I use (ancient Kobo glo' with 758x1024 screen).
>
> Thanks,
>
> SM
>
> --
> 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/a69adf22-5bde-4df3-9d43-fba2c67f4faa%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2019-07-03 16:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 16:24 Sal Migondis
[not found] ` <a69adf22-5bde-4df3-9d43-fba2c67f4faa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-07-03 16:59 ` John MacFarlane [this message]
[not found] ` <871rz7m4u0.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-07-03 17:00 ` John MacFarlane
2019-07-03 19:50 ` Sal Migondis
[not found] ` <37457961-7b29-4490-a5b0-70063b901ed2-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-07-05 10:57 ` John MacFarlane
2019-07-05 22:46 ` Sal Migondis
[not found] ` <0da36f70-8fc2-4571-abc7-69fe3a24ee35-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-07-07 15:55 ` John MacFarlane
[not found] ` <87imsdg7qa.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-07-09 18:43 ` Sal Migondis
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=871rz7m4u0.fsf@johnmacfarlane.net \
--to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=salmig99-Re5JQEeQqe8AvxtiuMwx3w@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).