Search code examples
latexracketscribble

Remove numbers in section in scribble (latex backend)


In scribble, I have a document like:

#lang scribble/lncs

@section{First Section}
@section{Second Section}
@subsection{A subsection}
@section{Third Section}

And this will get compiled to a document that looks something like:

1. First Section

2. Second Section

2.1 A subsection

3. Third Section

How can I remove these numbers so that it looks something more like:

First Section

Second Section

A subsection

Third Section


Solution

  • You can use 'unnumbered or hidden-number style as documented in the para documentation.

    These two styles have similar, but slightly different uses:

    • 'unnumbered is when there is no number associated with this section. Use this when you do not want to reference a section and want the next section to have the next incremental number.

    • 'hidden-number is when the section does have a number, but it is not shown. This causes the next section to jump up a number, but you can still reference it.

    The following code will cause the document to look like you want:

    #lang scribble/lncs
    
    @section[#:style 'unnumbered]{First Section}
    @section[#:style 'unnumbered]{Second Section}
    @subsection[#:style 'unnumbered]{A subsection}
    @section[#:style 'unnumbered]{Third Section}
    

    The document will look something like:

    First Section

    Second Section

    A subsection

    Third Section