public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Raniere Silva <raniere-Xhq86aZylhRTIXuwt5Zssw@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: ePub with custom CSS that places images
Date: Sun, 8 Feb 2015 21:53:14 -0200	[thread overview]
Message-ID: <20150208235314.GD1053@pupunha.tsa.virtua.com.br> (raw)
In-Reply-To: <e3085f47-4c7d-4eb2-8a00-40eed720befc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

Hi nkalvi,

> Is it possible to include image files (in ePub output), that are referenced 
> form custom.css only (i.e. not included in any of the markdown sources)?

After I think a little about your problem I find one solution.

You can embed your image into CSS using base64,
e.g. https://en.wikipedia.org/wiki/Data_URI_scheme#CSS.
This will solve your problem when using

    $ pandoc -f markdown -t epub -o my-book.epub --epub-stylesheet=style-with-base64.css book.md

The advantage of this approach is that you will avoid
hacking pandoc behavior by adding the figure in the markdown and hide it.

The disadvantage is that you will have a little more work to update the CSS
but since I expected that you don't do it often this will be OK.

Cheers,
Raniere

  parent reply	other threads:[~2015-02-08 23:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-08 14:44 nkalvi
     [not found] ` <e3085f47-4c7d-4eb2-8a00-40eed720befc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-02-08 16:46   ` Pablo Rodríguez
     [not found]     ` <54D792F6.2070800-S0/GAf8tV78@public.gmane.org>
2015-02-08 16:56       ` nkalvi
     [not found]         ` <d78de0c3-b9a2-4f2c-aa88-ac88873c1ccc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-02-08 17:49           ` Pablo Rodríguez
     [not found]             ` <54D7A1A1.6090303-S0/GAf8tV78@public.gmane.org>
2015-02-08 18:04               ` nkalvi
     [not found]                 ` <2be53ac8-9b60-4050-8093-c51a24ff99a3-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2015-02-08 18:13                   ` nkalvi
2015-02-08 18:27                   ` Pablo Rodríguez
     [not found]                     ` <54D7AAA0.7010901-S0/GAf8tV78@public.gmane.org>
2015-02-08 19:04                       ` nkalvi
2015-02-08 23:53   ` Raniere Silva [this message]
     [not found]     ` <20150208235314.GD1053-7SeS7PNgzeEkFIJsFhKmGr2VgLKJQ2blUBSOeVevoDU@public.gmane.org>
2015-02-09  1:13       ` nkalvi

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=20150208235314.GD1053@pupunha.tsa.virtua.com.br \
    --to=raniere-xhq86azylhrtixuwt5zssw@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).