Skip to content

mojavelinux/asciidoc-packt

 
 

Repository files navigation

"If Markdown is a 1st-grader, then AsciiDoc is a PhD student."

— Dan Allen - project lead for Asciidoctor

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.

Why?

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.

How to use

The project is not yet in a downloadable, installable zip file (yet). For now:

  1. Download or clone this project.

  2. Go to ~/.asciidoc

  3. mkdir -p backends/packt

  4. mkdir -p themes/packt

  5. cd backends/packt

  6. ln -s /path/to/asciidoc-packt/packt.conf

  7. ln -s /path/to/asciidoc-packt/packt.odt.styles

  8. cd ../themes/packt

  9. 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.

Outstanding issues

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.

About

Backend and theme to convert AsciiDoc file into Packt Publishing OpenOffice doc

Resources

Stars

Watchers

Forks

Packages

No packages published