Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asciidoc: how to get page headers & footers?

Tags:

asciidoc

Is there a correct way to get Asciidoc to include headers and footers?

I am trying to work out whether Asciidoc is a serious contender for printed material. I know that it is supposed to be docbook compatible, but I can’t find out how to create chapters, headers and footers.

I am trying to create instructional material. Currently I am using Atom with the asciidoc plugin to create the text, and Marked 2 on the Mac to get a better look and to export it to PDF.

like image 926
Manngo Avatar asked Oct 16 '25 04:10

Manngo


1 Answers

Running page headers and footers are not part of the AsciiDoc language but the tool you use for PDF conversion. From my view you have (at least) 2 options:

  1. Follow the instructions in Exporting Print/PDF of your Marked 2 user manual to create page headers and footers (this might turn out difficult using the AsciiDoc processor instead of MultiMarkdown).

"You can specify headers and footers on a per-document basis using MultiMarkdown metadata at the very top of the document"

  1. Since you probably have installed Asciidoctor anyway to support asciidoc in Marked 2 you could use an Asciidoctor PDF theme to generate PDF with headers/footers using Asciidoctor PDF. You would have to find an appropriate theme or create one yourself, though.

The most frequently used way to generate PDF output, however, seems to be generating DocBook output first and convert that to PDF using dblatex with DocBook XSL stylesheets (see AsciiDoc homepage). Maybe someone else can say more about that.

like image 83
Beeblebrox Avatar answered Oct 17 '25 16:10

Beeblebrox