[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: toc for <h1> only?

On Wed, 29 Dec 1999, Werner Heuser wrote:

> Hi,
> I have just started to build my Linux with Laptop Computers
> page with WML 1.7.4 (06-Oct-1999). Should have done it earlier ;-)
> I would like to use a TOC which contains <h1> headers
> only. Though I tried different approaches I don't get this to work.
> The standard as in the man page:
> #use wml::std::toc
> <toc>
> works well. 
> But the remaining part of the man page I probably don't understand
> exactly. 
>        Alternatively you can use the <toc_hN> tags to insert its
>        body (can be empty!) at the current location and into the
>        Table Of Contents. If specified, the alt attribute is
>        included into the ToC instead of the body.
> #use wml::std::toc
> <toc_h1>
> doesn't work as desired.

Hi Werner,

the <toc_hN> tags behave like <hN>, except that body text is not
surrounded by <hN> HTML tags in output file.

  #use wml::std::toc style=pre

  <h1>Chapter 1</h1>
  <h2>Section 1</h2>
  <h2>Section 2</h2>
  <toc_h1>Chapter 2</toc_h1>
  <h2>Section 1</h2>
  <h2>Section 2</h2>

  <H1><a name="ToC1">Chapter 1</a></H1>
  <H2><a name="ToC2">Section 1</a></H2>
  <H2><a name="ToC3">Section 2</a></H2>
  <a name="ToC4">Chapter 2</a>
  <H2><a name="ToC5">Section 1</a></H2>
  <H2><a name="ToC6">Section 2</a></H2>
  <a href="#ToC1"><strong>Chapter 1</strong></a>
      <a href="#ToC2"><strong>Section 1</strong></a>
      <a href="#ToC3"><strong>Section 2</strong></a>
  <a href="#ToC4"><strong>Chapter 2</strong></a>
      <a href="#ToC5"><strong>Section 1</strong></a>
      <a href="#ToC6"><strong>Section 2</strong></a>

With the ALT attribute, you may specify which entry will be inserted
into the ToC, for instance,
  <toc_h1 alt="List of Appendices"></toc_h1>
  <h2>Appendix A</h2>
  <h2>Appendix B</h2>

Denis Barbier
WML Maintainer

Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com