Default Awestruct style -- TOC support

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Default Awestruct style -- TOC support

vdanilchenko@vistaprint.com

I have been using the ASCIIDoctor style, and it has worked OK, but it’s kinda clunky looking. I really like the clean look of the default Awestruct style, but when I use it, the ToC only appears inline, and not on the right, as I specify in my site.yml:

 

asciidoctor:

  :safe: safe

  :interpolate: true

  :attributes:

    toc: right@

    toc-title: Sections@

 

Am I doing something wrong, or does the default Awestruct style simply not support positioned ToC?

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Default Awestruct style -- TOC support

LightGuard
Administrator
The default awestruct stylesheet doesn't know anything about the toc class. You could certainly add it and move around the toc, take a look at the style (probably easiest in a chrome inspection)


On Wed, Mar 26, 2014 at 12:17 PM, Victor Danilchenko <[hidden email]> wrote:

I have been using the ASCIIDoctor style, and it has worked OK, but it’s kinda clunky looking. I really like the clean look of the default Awestruct style, but when I use it, the ToC only appears inline, and not on the right, as I specify in my site.yml:

 

asciidoctor:

  :safe: safe

  :interpolate: true

  :attributes:

    toc: right@

    toc-title: Sections@

 

Am I doing something wrong, or does the default Awestruct style simply not support positioned ToC?

 




--
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Default Awestruct style -- TOC support

mojavelinux
It's more than just the stylesheet. When you set the page-layout, Awestruct renders the AsciiDoc document to embeddable HTML. The embeddable HTML output (equivalent of setting the :header_footer option to false) does not include the sidebar toc.

You can, however, include the toc in other places. Your options with embeddable HTML are either in the preamble or at the location of the toc::[] macro. The downside of the preamble setting is that it only appears *if* your document has a preamble. If you are consistent about how you create your documents, no problem. Otherwise, I recommend the toc::[] macro.

You can see examples in the Asciidoctor site.


Note that you don't have to set page-layout. If you don't, then Awestruct will render the AsciiDoc as a standalone page. We do this in various places on the Asciidoctor site.


Cheers,

-Dan

On Wed, Mar 26, 2014 at 12:20 PM, Jason Porter <[hidden email]> wrote:
The default awestruct stylesheet doesn't know anything about the toc class. You could certainly add it and move around the toc, take a look at the style (probably easiest in a chrome inspection)


On Wed, Mar 26, 2014 at 12:17 PM, Victor Danilchenko <[hidden email]> wrote:

I have been using the ASCIIDoctor style, and it has worked OK, but it’s kinda clunky looking. I really like the clean look of the default Awestruct style, but when I use it, the ToC only appears inline, and not on the right, as I specify in my site.yml:

 

asciidoctor:

  :safe: safe

  :interpolate: true

  :attributes:

    toc: right@

    toc-title: Sections@

 

Am I doing something wrong, or does the default Awestruct style simply not support positioned ToC?

 




--



--
Loading...