From aa5f0b767a2436c51c1a4baa67006dae48621e9a Mon Sep 17 00:00:00 2001 From: Matthew Flatt <mflatt@racket-lang.org> Date: Sun, 8 Dec 2019 09:40:20 -0700 Subject: [PATCH] add 'no-toc+aux style property --- scribble-doc/scribblings/scribble/core.scrbl | 11 ++++++++++- scribble-lib/info.rkt | 2 +- scribble-lib/scribble/html-render.rkt | 4 +++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scribble-doc/scribblings/scribble/core.scrbl b/scribble-doc/scribblings/scribble/core.scrbl index 7da7e963..ba512a4e 100644 --- a/scribble-doc/scribblings/scribble/core.scrbl +++ b/scribble-doc/scribblings/scribble/core.scrbl @@ -441,6 +441,14 @@ The recognized @tech{style properties} are as follows: listing except when those sub-parts are top-level entries in the listing.} + @item{@indexed-racket['no-toc+aux] --- As a @tech{style property} for + the main part of a rendered page, causes the HTML output to not + include a margin box for the main table of contents, ``on this + page'', or tables with the @racket['aux] style property. The + @racket['no-toc+aux] property effectively implies + @racket['no-toc] and @racket['no-sidebar], but also suppresses + @racket['aux] tables.} + @item{@indexed-racket['no-toc] --- As a @tech{style property} for the main part of a rendered page, causes the HTML output to not include a margin box for the main table of contents; the ``on this page'' box that @@ -541,7 +549,8 @@ sub-parts). The @racket[parts] field contains sub-parts. @history[#:changed "1.25" @elem{Added @racket['no-index] support.} - #:changed "1.26" @elem{Added @racket[link-render-style] support.}]} + #:changed "1.26" @elem{Added @racket[link-render-style] support.} + #:changed "1.27" @elem{Added @racket['no-toc+aux] support.}]} @defstruct[paragraph ([style style?] [content content?])]{ diff --git a/scribble-lib/info.rkt b/scribble-lib/info.rkt index d23ca4de..befc200e 100644 --- a/scribble-lib/info.rkt +++ b/scribble-lib/info.rkt @@ -23,4 +23,4 @@ (define pkg-authors '(mflatt eli)) -(define version "1.31") +(define version "1.32") diff --git a/scribble-lib/scribble/html-render.rkt b/scribble-lib/scribble/html-render.rkt index 9c983baa..fb335599 100644 --- a/scribble-lib/scribble/html-render.rkt +++ b/scribble-lib/scribble/html-render.rkt @@ -905,7 +905,9 @@ (head-extra-xexpr p))) (body ([id ,(or (extract-part-body-id d ri) "scribble-racket-lang-org")]) - ,@(render-toc-view d ri) + ,@(if (part-style? d 'no-toc+aux) + null + (render-toc-view d ri)) (div ([class "maincolumn"]) (div ([class "main"]) ,@(parameterize ([current-version (extract-version d)])