Login  Register

Re: Ongoing effort for LibreOffice/Packt backend

Posted by mojavelinux on Jun 19, 2014; 5:43am
URL: https://discuss.asciidoctor.org/Ongoing-effort-for-LibreOffice-Packt-backend-tp1823p1841.html

...I'll admit these points can seem rather picky. I'm describing an ideal world. We often have to make concessions, but we want to gravitate towards portable content whenever possible.

-Dan


On Thu, Jun 19, 2014 at 12:42 AM, Dan Allen <[hidden email]> wrote:
Although it may not be your focus right now, ideally you want to maintain the integrity of the AsciiDoc document independent of the PACKT backend. That means using a proper document title, author line, etc. You should be able to tweak the backend so it only emits what the PACKT publishing toolchain expects. We don't want to encourage writers to use specialized document structures for different publishing houses. (Of course, there will be some constraints, but they should be minimally invasive).

I'll cite two examples:

Quotes in block quotes::
The double quotes around the text in a block quote is technically a formatting concern. The content in the block quote is already assumed to be quoted, so the quotes shouldn't be necessary. They can be added by the backend.

Document header::
We should encourage the use of a standard document header. The chapter title should be the document title. The chapter number should be calculated automatically. When combining chapters into a book, the :leveloffset: attribute can be used to push the headings down a level.

The document header is a bit of a tricky requirement because we are still missing support in Asciidoctor (and AsciiDoc Python) for proper combining of subdocuments. The only way to combine documents atm is to use the preprocessor include directive, which works, but lacks the context to parse the document headers in each subdocument. A properly subdocument block macro is planned. Until then, the recommended way to do individual chapters as standalone documents is to leave off the implicit author line or define the author using an explicit attribute:

```asciidoc

:author: Greg Turnquist
:firstname: Greg
:lastname: Turquist
= Chapter Title

content

```

Obviously, we want to get that cleaned up in Asciidoctor asap. For now, it just is.

-Dan


On Wed, Jun 18, 2014 at 4:15 PM, gregturn [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Dan

I partially fixed the image.fodt.slim so that it embeds the image. The hangup I'm having is mixing the @target attribute with some hard coded text in a "Layout" message placed afterwards.

You can see my edit at https://github.com/gregturn/asciidoc-packt/pull/10.

P.S. I created https://github.com/gregturn/asciidoc-packt/blob/master/example.adoc based on your example, to provide a nice showcase of what this backend does, and to also help test outcomes.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Ongoing-effort-for-LibreOffice-Packt-backend-tp1823p1836.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML






--
Dan Allen | http://google.com/profiles/dan.j.allen