Login  Register

confusions about customization

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

confusions about customization

emonshr
1 post
After a bad experience with LaTeX, I'm testing Asciidoctor. My confusion is, if I have to define a new font size, font, paragraph alignment etc. what is the recommend way to do this- JUST making a stylesheet and passing that with my command line paramater, or follow the custom theme making instructions through using compass, foundation?
And if I customize the styling will Asciidoctor pdf converter support all these styles?
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: confusions about customization

1marc1
66 posts
Hi emonshr,

I do quite a bit with asciidoctor-pdf, which I believe your question is about.

To define your own style (font, size, page margins, header, footer, etc), you should create a custom theme file in YAML. Asciidoctor-pdf comes with a theme file. It probably works best to copy this theme file and update it to your requirements. The excellent theming guide is your go-to document for this task:

https://github.com/asciidoctor/asciidoctor-pdf/blob/master/docs/theming-guide.adoc

Once you updated your custom theme, you run asciidoctor-pdf on the command line and reference the theme. For example:

asciidoctor-pdf -a pdf-stylesdir=~/asciidoctor-pdf/themes -a pdf-style=custom_theme.yml -o ~/asciidoctor-pdf/files/output.pdf input.adoc

I am not sure if this helps.

Marc.