Hello all
I have installed the alpha version of asciidoc-pdf. Great program ! $ asciidoctor-pdf -v Asciidoctor PDF 1.5.0.alpha.8 using Asciidoctor 1.5.2 [http://asciidoctor.org] Runtime Environment (ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-cygwin]) (lc:UTF-8 fs:Windows-1252 in:- ex:UTF-8)The only problem I have discovered so far while converting my 200+ pages document is that TOC levels above 2 do not show up in the TOC of the generated pdf, i.e. if you run the following sample program, sub-section 1 won't show up in the pdf TOC. = Test == Chapter 1 === Section 1 ==== Sub-section 1Is there a way to fix that ? Jacques |
Administrator
|
To customize this behavior, you need to set the toclevels attribute in your document header. Cheers, -Dan On Wed, Jul 1, 2015 at 11:08 PM, jnilo [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hello all Dan Allen | http://google.com/profiles/dan.j.allen |
Thanks Dan this is working great !
Another related questions: 1/ Is there a way to force skip page at section level while generating pdf ? 2/ Is there a way to force only sub-section page display on html file generated by asciidoctor -b html5 -a theme=flask test.adocCheers Jacques |
Administrator
|
On Thu, Jul 2, 2015 at 2:32 AM, jnilo [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I'm not sure what you mean by "force skip page". Could you clarify?
|
I would like all chapters (toc level 2 in my previous example) to be printed at the beginning of a new page In fact I would like to render, in html output, only the lowest level content. For example if my code is: = Test John Dow :toc: :toclevels: 4 == Chapter 1 === Section 1 ==== Sub-section 1 ==== Sub-section 2 ==== Sub-section 3I would like only Sub-section 1 being displayed while accessing it through TOC which probably implies some form of "chunking" Cheers Jacques |
Administrator
|
On Thu, Jul 2, 2015 at 2:46 AM, jnilo [via Asciidoctor :: Discussion] <[hidden email]> wrote: I would like all chapters (toc level 2 in my previous example) to be printed at the beginning of a new page Thanks for clarifying the question. One way to accomplish this is by setting the doctype to book instead of the default, article. -d book or :doctype: book Another option is to add a conditional page break above each section you want to have start on a new page: ifdef::backend-pdf[<<<] Cheers, -Dan Dan Allen | http://google.com/profiles/dan.j.allen |
Administrator
|
In reply to this post by jnilo
On Thu, Jul 2, 2015 at 2:46 AM, jnilo [via Asciidoctor :: Discussion] <[hidden email]> wrote: In fact I would like to render, in html output, only the lowest level content. This is not yet supported out of the box. However, if you are willing to write an extension or use the Asciidoctor API directly, you can manipulate the document tree (AST) and then render on the parts you want. For instance, a TreeProcessor can return a new document tree, which could be just a section of the document. If you are using the API, you can call render on any node in the tree. Cheers, |
In reply to this post by jnilo
Is this related to the typical 'keep-with' operator that most DTP tools support in para style definitions? Normally section styles have keep-with-next set to True meaning that if the next para (typically some kind of Body text) is sucked on to the next page, the header will be pulled through with it.
This effect can be chained, causing a number of paras to be pulled onto a new page. |
Free forum by Nabble | Edit this page |