racket / racket/scribble

Numberers are ignored by the LaTeX renderer

Open
#97 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
250
Forks
102
Avg merge
11d 11h
Merged PRs (30d)
1

Description

When the following file is rendered with raco scribble --pdf file.scrbl, the sections SecA, SecB and SecC are still numbered using Arabic numbers in the PDF.

I think it would be better if the LaTeX/PDF output was consistent with the HTML one. The sections could be typeset as \section*, and have their number hardcoded in the title, or, possibly better, by redefining \thesection to the constant, pre-computed “number” and restoring it immediately after:

\let\oldthesection\thesection
\renewcommand{\thesection}{A}
\section{SecA}
\let\thesection\oldthesection

…

\let\oldthesection\thesection
\renewcommand{\thesection}{B}
\section{SecB}
\let\thesection\oldthesection
#lang scribble/manual
@require[scribble/core]
@(define my-numberer
   (make-numberer (λ (current parents)
                    (values (list-ref '("A" "B" "C" "D" "…")
                                      (sub1 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}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with raco scribble --pdf file.scrbl using the Scribble source shown in the report, then trace the LaTeX/PDF renderer's handling of section numberers. Done means custom numberers produce section labels in PDF consistently with HTML, including the A/B/C example.

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
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.