Numberers affect the nesting of sections with LaTeX renderer
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 250
- Forks
- 102
- Avg merge
- 11d 11h
- Merged PRs (30d)
- 1
Description
If the document below is compiled with raco scribble --pdf file.scrbl, then the subsections of SecA are moved one level up (i.e. they are typeset as sections, not as subsections). When the HTML renderer is used, via raco scribble --html file.scrbl, the sections SubAA, SubAB and their children are correctly typeset in the table of contents as subsections of SecA (resp. subsubsections for their children).
If I remove the [#:style (style #f (list my-numberer))], then the LaTeX output is correct. Unfortunately, parts are not blocks, and there is no cond-part to go with cond-block and cond-element, do I cannot conditionally disable the numberer for LaTeX output.
#lang scribble/manual
@require[scribble/core]
@(define my-numberer
(make-numberer (λ (current parents)
(values (format "~a" current)
(add1 current))) 1))
@title{Foo}
@(table-of-contents)
@section[#:style (style #f (list my-numberer))]{SecA}
@subsection{SubAA}
@subsubsection{SubAAA}
@subsubsection{SubAAB}
@subsection{SubAB}
@subsubsection{SubABA}
@subsubsection{SubABB}
@section[#:style (style #f (list my-numberer))]{SecB}
@section[#:style (style #f (list my-numberer))]{SecC}
Here's the diff between the generated good.tex and bad.tex. It shows that the sections SecA, SecB and SecC are not affected themselves, but the subsections are rendered with \sectionNewpage + \Ssection instead of the correct \Ssubsection.
460c460
< \Ssubsection{SubAA}{SubAA}\label{t:x28part_x22SubAAx22x29}
---
> \sectionNewpage
461a462
> \Ssection{SubAA}{SubAA}\label{t:x28part_x22SubAAx22x29}
464d464
< \Ssubsubsection{SubAAA}{SubAAA}\label{t:x28part_x22SubAAAx22x29}
465a466
> \Ssubsection{SubAAA}{SubAAA}\label{t:x28part_x22SubAAAx22x29}
468d468
< \Ssubsubsection{SubAAB}{SubAAB}\label{t:x28part_x22SubAABx22x29}
469a470
> \Ssubsection{SubAAB}{SubAAB}\label{t:x28part_x22SubAABx22x29}
472d472
< \Ssubsection{SubAB}{SubAB}\label{t:x28part_x22SubABx22x29}
473a474
> \sectionNewpage
474a476
> \Ssection{SubAB}{SubAB}\label{t:x28part_x22SubABx22x29}
476d477
< \Ssubsubsection{SubABA}{SubABA}\label{t:x28part_x22SubABAx22x29}
478a480
> \Ssubsection{SubABA}{SubABA}\label{t:x28part_x22SubABAx22x29}
480c482,484
< \Ssubsubsection{SubABB}{SubABB}\label{t:x28part_x22SubABBx22x29}
---
>
>
> \Ssubsection{SubABB}{SubABB}\label{t:x28part_x22SubABBx22x29}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compile the provided file.scrbl with both raco scribble --pdf and raco scribble --html, then compare the generated good.tex and bad.tex around the SubAA and SubAB entries. Trace the LaTeX renderer's handling of numbered sections and verify that custom numberers preserve subsection and subsubsection nesting in the table of contents.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100