Merge tag 'v7.4' into my-changes-rebased

This commit is contained in:
Suzanne Soy 2021-07-06 02:42:34 +01:00
commit 9631885dd5
6 changed files with 50 additions and 23 deletions

View File

@ -1,7 +1,7 @@
#lang scribble/doc #lang scribble/doc
@(require scribble/manual scribble/bnf "utils.rkt" @(require scribble/manual scribble/bnf "utils.rkt"
pict pict
(for-label scriblib/figure scribble/base scribble/sigplan (for-label scriblib/figure scribble/base (only-in scribble/acmart abstract)
(except-in pict table))) (except-in pict table)))
@(define-syntax-rule (samplemod . text) (codeblock . text)) @(define-syntax-rule (samplemod . text) (codeblock . text))
@ -176,7 +176,7 @@ probably need a different topic. But you can start making the current
content look right by changing the first line to content look right by changing the first line to
@samplemod|{ @samplemod|{
#lang scribble/sigplan #lang scribble/acmart
}| }|
If you're instead working toward Racket library documentation, If you're instead working toward Racket library documentation,
@ -192,15 +192,15 @@ top-level sections turned into chapters that each start on a new page.
If you have split the document into multiple files, the first line of If you have split the document into multiple files, the first line of
the main document file determines the output format. the main document file determines the output format.
Using @racketmodname[scribble/sigplan] or Using @racketmodname[scribble/acmart] or
@racketmodname[scribble/manual] does not change the rendered HTML for @racketmodname[scribble/manual] does not change the rendered HTML for
a document---aside from @racketmodname[scribble/manual] adding a a document---aside from @racketmodname[scribble/manual] adding a
version number---but it changes the set of bindings available in the version number---but it changes the set of bindings available in the
document body. For example, with @racketmodname[scribble/sigplan], the document body. For example, with @racketmodname[scribble/acmart], the
introductory text can be marked as an abstract: introductory text can be marked as an abstract:
@samplemod|{ @samplemod|{
#lang scribble/sigplan #lang scribble/acmart
@title{On the Cookie-Eating Habits of Mice} @title{On the Cookie-Eating Habits of Mice}
@ -221,7 +221,7 @@ When a document is implemented across multiple files, changing the
language of the main document can set the style for all of the parts, language of the main document can set the style for all of the parts,
but it does not introduce bindings into the other part files. For but it does not introduce bindings into the other part files. For
example, if you change the language of @filepath{mouse.scrbl} to example, if you change the language of @filepath{mouse.scrbl} to
@racketmodname[scribble/sigplan], then @racket[abstract] becomes @racketmodname[scribble/acmart], then @racket[abstract] becomes
available in @filepath{mouse.scrbl} but not in @filepath{milk.scrbl} available in @filepath{mouse.scrbl} but not in @filepath{milk.scrbl}
or @filepath{straw.scrbl}. In other words, operator names are or @filepath{straw.scrbl}. In other words, operator names are
lexically scoped. lexically scoped.
@ -230,7 +230,7 @@ lexically scoped.
@section{More Functions} @section{More Functions}
The @racketmodname[scribble/base] language provides a collection of The @racketmodname[scribble/base] language provides a collection of
basic operations (and The @racketmodname[scribble/sigplan] and basic operations (both @racketmodname[scribble/acmart] and
@racketmodname[scribble/manual] are supersets of @racketmodname[scribble/manual] are supersets of
@racketmodname[scribble/base]). Many of the operations are style @racketmodname[scribble/base]). Many of the operations are style
variations that you can apply to text: variations that you can apply to text:
@ -573,7 +573,7 @@ and @litchar{'} to suitable curly quotes.
The decoding process for document's stream is ultimately determined by The decoding process for document's stream is ultimately determined by
the @hash-lang[] line that starts the document. The the @hash-lang[] line that starts the document. The
@racketmodname[scribble/base], @racketmodname[scribble/manual], and @racketmodname[scribble/base], @racketmodname[scribble/manual], and
@racketmodname[scribble/sigplan] languages all use the same @racketmodname[scribble/acmart] languages all use the same
@racket[decode] operation. The @racketmodname[scribble/text] language, @racket[decode] operation. The @racketmodname[scribble/text] language,
however, acts more like a plain-text generator and preprocessor, and it however, acts more like a plain-text generator and preprocessor, and it
does not perform any such decoding rules. (For more on does not perform any such decoding rules. (For more on

View File

@ -686,7 +686,7 @@ specified explicitly with @racket[#:packages]. Each @racket[pkg-expr]
result is passed on to a function like @racket[tt] for result is passed on to a function like @racket[tt] for
typesetting. Provide an empty sequence after @racket[#:packages] to typesetting. Provide an empty sequence after @racket[#:packages] to
suppress any package name in the output. Each @racket[pkg-expr] suppress any package name in the output. Each @racket[pkg-expr]
expression is are duplicated for a @racket[declare-exporting] form, expression is duplicated for a @racket[declare-exporting] form,
unless @racket[#:no-declare] is specified. unless @racket[#:no-declare] is specified.
Each @racket[option] form can appear at most once, and @racket[#:lang] Each @racket[option] form can appear at most once, and @racket[#:lang]

View File

@ -26,17 +26,10 @@ same way that the module system keeps expansion-time code separate
from run-time code, and documentation information is recorded in a from run-time code, and documentation information is recorded in a
submodule to be separately loadable from the enclosing module. submodule to be separately loadable from the enclosing module.
For an example use, see the @filepath{file} collection's For an example use, see
@filepath{gif.rkt} source file and the corresponding extraction in @hyperlink["https://blog.racket-lang.org/2012/06/submodules.html"]{this post}
@filepath{scribblings/gif.scrbl}. As that example illustrates, at @url{blog.racket-lang.org}.
starting the module declaration with
@racketblock[
@#,hash-lang[] @#,racketmodname[at-exp]
]
enables the @"@"-reader, which is handy for writing documentation
expressions.
@; ---------------------------------------- @; ----------------------------------------

View File

@ -236,6 +236,17 @@ Combines elements to generate an element that is suitable for
describing a dissertation.} describing a dissertation.}
@defproc[(book-chapter-location [title any/c]
[#:pages pages (or (list/c any/c any/c) #f) #f]
[#:section section any/c #f]
[#:volume volume any/c #f]
[#:publisher publisher any/c #f])
element?]{
Combines elements to generate an element that is suitable for
describing a paper's location within a chapter or part of a book.}
@defproc[(author-name [first any/c] @defproc[(author-name [first any/c]
[last any/c] [last any/c]
[#:suffix suffix any/c #f]) [#:suffix suffix any/c #f])

View File

@ -169,10 +169,10 @@ AddOnLoad(function(){
indicator.style.display = "block"; indicator.style.display = "block";
}); });
// Pressing "S" focuses on the "...search manuals..." text field // Pressing "S" or "s" focuses on the "...search manuals..." text field
AddOnLoad(function(){ AddOnLoad(function(){
window.addEventListener("keypress", function(event) { window.addEventListener("keyup", function(event) {
if (event && event.charCode == 115 && event.target == document.body) { if (event && (event.keyCode == 83 || event.keyCode == 115) && event.target == document.body) {
var field = document.getElementsByClassName("searchbox")[0]; var field = document.getElementsByClassName("searchbox")[0];
field.focus(); field.focus();
} }

View File

@ -28,7 +28,9 @@
[techrpt-location [techrpt-location
(-> #:institution any/c #:number any/c element?)] (-> #:institution any/c #:number any/c element?)]
[dissertation-location [dissertation-location
(->* [#:institution any/c] [#:degree any/c] element?)]) (->* [#:institution any/c] [#:degree any/c] element?)]
[book-chapter-location
(->* [any/c] [#:pages (or/c (list/c any/c any/c) #f) #:series any/c #:volume any/c #:publisher any/c] element?)])
other-authors other-authors
editor editor
abbreviate-given-names) abbreviate-given-names)
@ -563,6 +565,27 @@
#:degree [degree "PhD"]) #:degree [degree "PhD"])
@elem{@to-string[degree] dissertation, @to-string[org]}) @elem{@to-string[degree] dissertation, @to-string[org]})
(define (book-chapter-location
location
#:pages [pages #f]
#:series [series #f]
#:volume [volume #f]
#:publisher [publisher #f])
(let* ([s @elem{In @italic{@elem{@to-string[location]}}}]
[s (if series
@elem{@|s|, @to-string[series]}
s)]
[s (if volume
@elem{@|s| volume @to-string[volume]}
s)]
[s (if pages
@elem{@|s|, pp. @(to-string (car pages))--@(to-string (cadr pages))}
s)]
[s (if publisher
@elem{@|s| @to-string[publisher]}
s)])
s))
;; ---------------------------------------- ;; ----------------------------------------
(define (author-name first last #:suffix [suffix #f]) (define (author-name first last #:suffix [suffix #f])