I can't get my personal css file into my epub via asciidoctor-epub3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

I can't get my personal css file into my epub via asciidoctor-epub3

Steve Litt
Hi all,

I have a css file, called css_addition.css, in the same directory as my
asciidoctor file and all its included .ad files. According to
asciidoctor-epub -h, I can use the -a option to include my own
attribute name-value pairs into the outputted epub.

So, as suggested at
https://asciidoctor.org/docs/produce-custom-themes-using-asciidoctor-stylesheet-factory/,
I performed the following command:

asciidoctor-epub3 -a stylesheet=css_addition.css -a stylesdir=. place2b.adoctor

The produced epub looked great, but it had none of my styles in it,
both visibly in ebook-viewer, and on a file by file basis via
file-roller. Then I added -a linkcss, and there was no mention of
css_addition.css when I grep -r in a tree produced by unzipping the
produce epub.

Does asciidoctor-epub3 not allow -a stylesheet=whatever.css, as appears
to be documented? Or am I missing some key point?

If worst comes to very worst I can get my custom CSS in by unzipping
the file, appending my stylesheet's contents to the epub's epub3.css,
and zipping it back up again. I've done it and it worked. But I'm
trying to convince some people to move to Asciidoctor, and telling them
they must shellscript a kludge like that isn't good advertising.

So tell me: Is there a better way to get my custom CSS into an epub
using asciidoctor-epub?

Thanks,

SteveT

Steve Litt
August 2019 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28


Reply | Threaded
Open this post in threaded view
|

Re: I can't get my personal css file into my epub via asciidoctor-epub3

heckj
Hey Steve,

I'm just starting down this road myself. I have a few styles I need to tweak as well that appear to be either missing or not quite working as I'd expected, so looking around at comments and options, and noticed this post.

I noticed that the docs for asciidoctor-epub had a different style directory parameter, and no options for a specific style sheet - so I'm assuming it may not support custom css files being included.

The option I did spot was -epub3-stylesdir and the associated docs:

The path to a directory that contains alternate epub3.css and epub3-css3-only.css files to customize the look and feel.

I'm not entirely sure where those are sourced, but I'd suspect that you might be able to copy and update them to include your specific tweaks. Not as ideal a workflow, but perhaps an option.

- joe
Reply | Threaded
Open this post in threaded view
|

Re: I can't get my personal css file into my epub via asciidoctor-epub3

Steve Litt
On Tue, 27 Aug 2019 08:50:17 -0700 (MST)
"heckj [via Asciidoctor :: Discussion]"
<[hidden email]> wrote:

> Hey Steve,
>
> I'm just starting down this road myself. I have a few styles I need
> to tweak as well that appear to be either missing or not quite
> working as I'd expected, so looking around at comments and options,
> and noticed this post.
>
> I noticed that the  docs for asciidoctor-epub
> <https://asciidoctor.org/docs/asciidoctor-epub3/>   had a different
> style directory parameter, and no options for a specific style sheet
> - so I'm assuming it may not support custom css files being included.
>
> The option I did spot was -epub3-stylesdir and the associated docs:
>
> The path to a directory that contains alternate epub3.css and
> epub3-css3-only.css files to customize the look and feel.
>
> I'm not entirely sure where those are sourced, but I'd suspect that
> you might be able to copy and update them to include your specific
> tweaks. Not as ideal a workflow, but perhaps an option.
>
> - joe


Thanks Joe.

As I remember, I already tried putting my own CSS files in a declared
data/style directory and it didn't work. We've got a forcast 115 MPH
hurricane coming right over our house Sunday, so let's continue this
discussion late next week, like 9 days from now.

Thanks,
 
Steve

Steve Litt
August 2019 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28