Skip to content

Commit 85f4f3f

Browse files
committed
add 'no-header-controls style property for parts
Also, correct some mistakes in the documentation.
1 parent cd77755 commit 85f4f3f

File tree

4 files changed

+33
-24
lines changed

4 files changed

+33
-24
lines changed

scribble-doc/scribblings/scribble/base.scrbl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,12 @@ removed.}
115115
@def-section-like[subsubsection part-start?]{ Like @racket[section], but
116116
generates a @racket[part-start] of depth @racket[2].}
117117

118-
@def-section-like[subsubsub*section paragraph?]{ Similar to
119-
@racket[section], but merely generates a paragraph that looks like an
120-
unnumbered section heading (for when the nesting gets too deep to
121-
include in a table of contents).}
118+
@defproc[(subsubsub*section [#:tag tag (or/c #f string? (listof string?)) #f]
119+
[pre-content pre-content?] ...+)
120+
paragraph?]{
121+
Similar to @racket[section], but merely generates a paragraph that
122+
looks like an unnumbered section heading (for when the nesting gets
123+
too deep to include in a table of contents).}
122124

123125
@defform[(include-section module-path)]{ Requires @racket[module-path]
124126
and returns its @racket[doc] export (without making any imports

scribble-doc/scribblings/scribble/core.scrbl

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,10 @@ The recognized @tech{style properties} are as follows:
480480
document, causes the HTML output to not include an ``on this
481481
page'' margin box.}
482482

483+
@item{@indexed-racket['no-header-controls] --- Suppresses link and
484+
link-information icons (if any) as part of a section header in
485+
HTML output.}
486+
483487
@item{@indexed-racket['no-index] --- Has no effect as a @tech{style
484488
property} on a @racket[part], but as a style property on a
485489
@racket[title] or @racket[part-start] that provides a
@@ -585,7 +589,8 @@ The @racket[parts] field contains sub-parts.
585589
#:changed "1.26" @elem{Added @racket[link-render-style] support.}
586590
#:changed "1.27" @elem{Added @racket['no-toc+aux] support.}
587591
#:changed "1.54" @elem{Changed @racket[tag-prefix] field to allow a
588-
@tech{part context} hash table.}]}
592+
@tech{part context} hash table.}
593+
#:changed "1.57" @elem{Added @racket['no-header-controls] support.}]}
589594

590595

591596
@defstruct[paragraph ([style style?] [content content?])]{
@@ -1191,7 +1196,7 @@ such as when @racket[element->string] is used before the @tech{collect
11911196
pass}.}
11921197

11931198

1194-
@defstruct[part-relative-element ([resolve (collect-info? . -> . content?)]
1199+
@defstruct[part-relative-element ([collect (collect-info? . -> . content?)]
11951200
[sizer (-> any/c)]
11961201
[plain (-> any/c)])]{
11971202

scribble-lib/info.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
(define pkg-authors '(mflatt eli))
2525

26-
(define version "1.56")
26+
(define version "1.57")
2727

2828
(define license
2929
'((Apache-2.0 OR MIT)

scribble-lib/scribble/html-render.rkt

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,23 +1188,25 @@
11881188
,@(if (part-title-content d)
11891189
(render-content (part-title-content d) d ri)
11901190
null)
1191-
(span ([class "button-group"])
1192-
,@(match (part-tags d)
1193-
['() '()]
1194-
[(cons t _)
1195-
(list `(a ([href ,(format "#~a" (anchor-name
1196-
(add-current-tag-prefix
1197-
(tag-key t ri))))]
1198-
[class "heading-anchor"]
1199-
[title "Link to here"])
1200-
"🔗"))])
1201-
,@(if (and src taglet)
1202-
(list '(a ([class "heading-source"]
1203-
[title "Internal Scribble link and Scribble source"]) ""))
1204-
'())
1205-
;; this is a dummy node so that the line height of heading-anchor
1206-
;; and heading-source are correct (even when their font size is not 100%)
1207-
(span ([style "visibility: hidden"]) " "))))])
1191+
,@(if (part-style? d 'no-header-controls)
1192+
null
1193+
`((span ([class "button-group"])
1194+
,@(match (part-tags d)
1195+
['() '()]
1196+
[(cons t _)
1197+
(list `(a ([href ,(format "#~a" (anchor-name
1198+
(add-current-tag-prefix
1199+
(tag-key t ri))))]
1200+
[class "heading-anchor"]
1201+
[title "Link to here"])
1202+
"🔗"))])
1203+
,@(if (and src taglet)
1204+
(list '(a ([class "heading-source"]
1205+
[title "Internal Scribble link and Scribble source"]) ""))
1206+
'())
1207+
;; this is a dummy node so that the line height of heading-anchor
1208+
;; and heading-source are correct (even when their font size is not 100%)
1209+
(span ([style "visibility: hidden"]) " "))))))])
12081210
,@(let ([auths (extract-authors d)])
12091211
(if (null? auths)
12101212
null

0 commit comments

Comments
 (0)