"If Markdown is a 1st-grader, then AsciiDoc is a PhD student."
This project is an AsciiDoc backend and theme designed to let you write titles for Packt Publishing.
Warning
|
This is a tool to help write manuscripts. If you use this for writing a title for Packt you assume ALL risk with said process. |
I was starting my third title and felt like a word processor was too clunky to integrate code, images, prose, and code-in-text. Having written technical docs for the past year using AsciiDoc, I rummaged around and found https://github.com/dagwieers/asciidoc-odf. It worked pretty good, except the formatting is different. So I strove to create my own theme, using styles from Packt.
The project is not yet in a downloadable, installable zip file (yet). For now:
-
Download or clone this project.
-
Go to
~/.asciidoc
-
mkdir -p backends/packt
-
mkdir -p themes/packt
-
cd backends/packt
-
ln -s /path/to/asciidoc-packt/packt.conf
-
ln -s /path/to/asciidoc-packt/packt.odt.styles
-
cd ../themes/packt
-
ln -s /path/to/asciidoc-packt/packt.odt.styles
You should be all set. Now you can run asciidoc -b packt --theme packt your.adoc
and it will spit out your.fodt
.
Note
|
These steps have so far, been executed on a mac. I haven’t explored them on any other platform. |
Note
|
FODT stands for Flat ODT, or the human readable, XML-based OpenOffice doc format. You can always open an FODT and Save As to ODT format to submit to Packt. |
The nice side effect is that you can now include images, include source code, and know that things will be properly generated and formatted nicely for submission.
This project is highly experimental . I haven’t completed my manuscript yet.
It can’t find the end of a code listing or a bullet point listing. Packt has a different style for the last line of both and other styles. This means you still have to make some manual edits after-the-fact. See TODO.adoc for follow up edits.
The core of asciidoc-odt, for some reason, only properly formats the first image. Subsequent images are inserted, but shrunk down to where you almost can’t see them. Whereas Packt actually yanks the inline images and inserts the attached images you ship, you still need to see them during proofs and for some hint of the real size of your manuscript.
Note
|
packt-template.fodt and packt-template.ott are owned solely by Packt Publishing Ltd (http://packtpub.com). Their usage in this project
is strictly for non-commercial usage in support of writing manuscripts for them. Any other usage may require contact Packt Publishing directly.
|