On 27/08/12 13:55, ping wrote:
On 8/26/2012 7:33 PM, Lex Trotman wrote:
On 27 August 2012 00:20, ping <[email protected]> wrote:
hi experts:
I tried FAQ 60 to reposition my toc but it doesn't look work for me...

.faq60
----
60. Is it possible to reposition the Table of Contents in HTML outputs?

By default the xhtml11 and html5 backends auto-position the TOC after the
header. You can manually position the TOC by setting the toc-placement
attribute value to manual and then inserting the toc::[] block macro where
you want the TOC to appear. For example, put this in the document header:

:toc:
:toc-placement: manual

The put this where you want the TOC to appear:

toc::[]
----

.what I tried
----

//put these on header

= my header

  :numbered:
  :toc:
  :toc-placement: manual

== section1

== section2
toc::[]



The attached works for me in asciidoc 8.6.8?  More information needed.

Cheers
Lex

----


I tried quite a few more times to put toc::[] in different other places, no
luck...
am I missing anything here?

thanks!

--

Lex,
thanks for your test, I reviewed back and did more test, it looks I put an empty
line between doc header and this cause the reposition not working, so:

//this doesn't work:
= my header

    :numbered:
    :toc:
    :toc-placement: manual

//but this works fine!
= my header
    :numbered:
    :toc:
    :toc-placement: manual

I'm not sure this is designed behavior or still and small issue.

This is not an issue, the problem was caused by assigning the attributes outside the header.

The FAQ says "in the header" and the User Guide says "The document header must be separated from the remainder of the document by one or more blank lines and cannot contain blank lines." (http://www.methods.co.nz/asciidoc/userguide.html#X95).

Cheers, Stuart


and just one "side" question here...
looking at your HTML file:

1. section1

blah
2. section2

Table of Contents
1. section1
2. section2

my question is:
since TOC got repositioned to 2nd section, is it possible to also make the 1st
section can be skipped from the TOC?


regards
ping


--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to