On 3 août, 02:51, Stuart Rackham <[email protected]> wrote:
> Hi Lionel
>
> On 26/07/10 21:56, Lionel wrote:
>
> > Hi everyone,
>
> > I'd like to know what's the best way to get the preface section un-
> > numbered using xhtml backend. I tried to add ":numbered!:" before it
> > and ":numbered:" back after the section, but the numbered sections
> > still start at 2., where I'd like them to start at '1.'. Is there any
> > solution ? Make the preface as [float] when xhtml backend is used ?
>
> Yes, using [float] is going to be the easiest way. Sections like preface and
> abstract shouldn't be numbered though and the problem with the 'numbered'
> attribute is that it suppresses the numbers from being displayed but does not
> stop them from incrementing.
>
> I've just committed a patch to the trunk that inhibits section numbers
> incrementing when the 'numbered' attribute is not defined, this is better than
> [float] because it does no affect the DocBook outputs:
>
> http://code.google.com/p/asciidoc/source/detail?r=75fc6db5716a737ed7b...

Great! This is exactly the functionality I was looking for. In the
meantime, here is what I did so that, indeed, docbook was not
affected:

:numbered!:

ifdef::basebackend-docbook[]
[preface]
endif::basebackend-docbook[]
ifdef::basebackend-html[]
[float]
endif::basebackend-html[]
== Introduction

// ... Some text...

ifdef::basebackend-html[]
[float]
endif::basebackend-html[]
=== A word on build systems

// ... This section content...

:numbered:

// And here go the numbered chapters

----------------

I will try out this asap.

Thanks,
Lionel

>
> Cheers, Stuart
>
>
>
> > Thanks for suggestions,
> > Lionel
>
>

-- 
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