From: Sal Migondis <salmig99-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: pandoc markdown to epub conversion - customize EPUB/text/cover.xhtml
Date: Wed, 3 Jul 2019 12:50:32 -0700 (PDT) [thread overview]
Message-ID: <37457961-7b29-4490-a5b0-70063b901ed2@googlegroups.com> (raw)
In-Reply-To: <a69adf22-5bde-4df3-9d43-fba2c67f4faa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 2075 bytes --]
Thank you for prompt response.
I copied the default.epub3 template to ~/.pandoc/templates/default.epub3
and added the above <div><svg> ... </svg></div> and ran pandoc.
What happens is that my cover.xhtml custom code does not replace the
default <div><img> ... </div> ... It gets inserted as expected but the
default code is also there below it! Hence epubcheck gives me an error
(duplicate ID 'cover-image' and there is a duplicate cover image in the
resulting epub.
How do I "suppress" the body variable? I tried specifying "-V body=' '"
(body="false" etc.) ... but that caused *all *the xhtml files in the epub
to contain the same code as cover.xhtml and nothing else.
I also tried to unset the 'body' variable directly inside the template in
"$if(coverpage)$ ... $endif$ ... hoping the variable's content would be
restored to its original value after leaving the if(coverpage)'s ... endif
scope ...but this didn't seem to do anything except perhaps give me an
error when running pandoc IIRC...
In any event, here's what I added to my default.epub3:
<body$if(coverpage)$ id="cover"$endif$>
$if(coverpage)$
<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>
$endif$
Obviously I'm not doing it right but I'm not sure how I could fix this.
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/37457961-7b29-4490-a5b0-70063b901ed2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #1.2: Type: text/html, Size: 7900 bytes --]
next prev parent reply other threads:[~2019-07-03 19:50 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
[not found] ` <871rz7m4u0.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-07-03 17:00 ` John MacFarlane
2019-07-03 19:50 ` Sal Migondis [this message]
[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=37457961-7b29-4490-a5b0-70063b901ed2@googlegroups.com \
--to=salmig99-re5jqeeqqe8avxtiumwx3w@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).