Is :toc: broken in 1.5.0?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Is :toc: broken in 1.5.0?

ysb33r
I found that since 1.5.0 using  ":toc: left" and ":toc: right" does not work. The TOC is always on the top on an HTML document.  I don't have any compatibility mode set.

As context I am using the the Gradle plugin for Asciidoctor to generate the document (just in case something in the chain is broken).
Reply | Threaded
Open this post in threaded view
|

Re: Is :toc: broken in 1.5.0?

LightGuardjp
Administrator
Do you see the same thing when using straight asciidoctorj or the ruby asciidoctor?


On Sun, Aug 31, 2014 at 5:12 AM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I found that since 1.5.0 using  ":toc: left" and ":toc: right" does not work. The TOC is always on the top on an HTML document.  I don't have any compatibility mode set.

As context I am using the the Gradle plugin for Asciidoctor to generate the document (just in case something in the chain is broken).


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Is-toc-broken-in-1-5-0-tp2095.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Is :toc: broken in 1.5.0?

ysb33r
ruby asciidoctor PASS

java asciidoctorj PASS

Must be something in the gradle plugin.
Reply | Threaded
Open this post in threaded view
|

Re: Is :toc: broken in 1.5.0?

ysb33r
I am going to retract on the previous statement as a simple test case actually works correct. I need to find out why my complex document does not.
Reply | Threaded
Open this post in threaded view
|

Re: Is :toc: broken in 1.5.0?

ysb33r
The mystery has been solved and the answer is :toc: is not broken.

There was a 'toc: 1' property in my build.gradle file, which seem to have passed through on previous versions. That has now been corrected to 'toc: right'.

In all of my simple tests above I had the ':toc: right' in the source file, which is why they all worked.

The reason for the 'toc' being in build.gradle is that I want to have control depending on which backend I was writing to.
Reply | Threaded
Open this post in threaded view
|

Re: Is :toc: broken in 1.5.0?

mojavelinux
Administrator

On Wed, Sep 3, 2014 at 3:13 AM, ysb33r [via Asciidoctor :: Discussion] <[hidden email]> wrote:
The reason for the 'toc' being in build.gradle is that I want to have control depending on which backend I was writing to.

The solution here is to add an @ to the end of the attribute value. That tells Asciidoctor to allow the document to override (change the value or unset) a value passed to the API. If the attribute does not have a value, then use @ as the whole value.

Unfortunately, the @ trick doesn't work with unsetting an attribute. We can't fix that until we move to a proper internal model for managing attributes...because we have no way to track it otherwise. Eventually, this syntax will work for all cases.