Merge tag 'v7.2' into my-changes-rebased
This commit is contained in:
commit
95400be0e5
|
@ -161,13 +161,22 @@ Specifies a subtitle.}
|
||||||
#f)
|
#f)
|
||||||
#f]
|
#f]
|
||||||
[#:email email
|
[#:email email
|
||||||
(or/c pre-content? (listof pre-content?) #f)
|
(or/c pre-content? email? (listof email?))
|
||||||
#f]
|
'()]
|
||||||
[name pre-content?] ...)
|
[name pre-content?] ...)
|
||||||
block?]{
|
block?]{
|
||||||
|
|
||||||
Specifies an author with an optional email address, affiliation, and/or orcid.
|
Specifies an author with an optional email address, affiliation, and/or orcid.
|
||||||
|
|
||||||
|
@codeblock|{
|
||||||
|
#lang scribble/acmart
|
||||||
|
@title{Title}
|
||||||
|
@author["Unboxed Value"
|
||||||
|
#:email (list (email "user@server.com")
|
||||||
|
(email-string "case--Int#@GHC.Prim.info"))]}
|
||||||
|
|
||||||
|
@abstract{abstracting abstract title}
|
||||||
|
}|
|
||||||
}
|
}
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
|
@ -197,9 +206,18 @@ screen version of the image links to the badge authority.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(email [text pre-content?] ...)
|
@deftogether[(
|
||||||
email?]{
|
@defproc[(email [text pre-content?] ...) email?]
|
||||||
|
@defproc[(email-string [text string?] ...) email?]
|
||||||
|
)]{
|
||||||
Creates an @racket[email?] object for use with @racket[author].
|
Creates an @racket[email?] object for use with @racket[author].
|
||||||
|
|
||||||
|
@racket[email-string] is like @racket[email]
|
||||||
|
except that @racket[email-string] only takes
|
||||||
|
@tech[#:doc '(lib "scribblings/reference/reference.scrbl") #:key "string"]{strings},
|
||||||
|
escapes all @tt{%} and @tt{#} characters
|
||||||
|
in the arguments and typesets the email address with the
|
||||||
|
@racket['exact-chars] style.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(email? [email any/c]) boolean?]{
|
@defproc[(email? [email any/c]) boolean?]{
|
||||||
|
|
|
@ -737,7 +737,7 @@ which is normally defined using @racket[elemtag].}
|
||||||
Creates an index element given a plain-text string---or list of
|
Creates an index element given a plain-text string---or list of
|
||||||
strings for a hierarchy, such as @racket['("strings" "plain")] for a
|
strings for a hierarchy, such as @racket['("strings" "plain")] for a
|
||||||
``plain'' entry below a more general ``strings'' entry. As index keys,
|
``plain'' entry below a more general ``strings'' entry. As index keys,
|
||||||
the strings are ``cleaned'' using @racket[clean-up-index-strings]. The
|
the strings are ``cleaned'' using @racket[clean-up-index-string]. The
|
||||||
strings (without clean-up) also serve as the text to render in the
|
strings (without clean-up) also serve as the text to render in the
|
||||||
index. The @tech{decode}d @racket[pre-content] is the text to appear
|
index. The @tech{decode}d @racket[pre-content] is the text to appear
|
||||||
inline as the index target.
|
inline as the index target.
|
||||||
|
|
|
@ -399,7 +399,7 @@ What if you want to provide arguments in text mode, but you also want
|
||||||
to supply other optional arguments? You can use both
|
to supply other optional arguments? You can use both
|
||||||
@litchar{[}...@litchar{]} and @litchar["{"]...@litchar["}"] for an
|
@litchar{[}...@litchar{]} and @litchar["{"]...@litchar["}"] for an
|
||||||
operation, as long as the @litchar{[}...@litchar{]} is first, and as
|
operation, as long as the @litchar{[}...@litchar{]} is first, and as
|
||||||
long as no character separate the closing @litchar{]} from the
|
long as no characters separate the closing @litchar{]} from the
|
||||||
opening @litchar["{"]. For example, calling @racket[italic] is the
|
opening @litchar["{"]. For example, calling @racket[italic] is the
|
||||||
same as using @racket[elem] with the @racket['italic] style:
|
same as using @racket[elem] with the @racket['italic] style:
|
||||||
|
|
||||||
|
@ -491,7 +491,7 @@ label), then the string is typically provided through
|
||||||
Sometimes, both @litchar{[}...@litchar{]} and
|
Sometimes, both @litchar{[}...@litchar{]} and
|
||||||
@litchar["{"]...@litchar["}"] are used, where the former surround
|
@litchar["{"]...@litchar["}"] are used, where the former surround
|
||||||
Racket arguments that precede text to typeset. Finally, if a form is a
|
Racket arguments that precede text to typeset. Finally, if a form is a
|
||||||
purely Racket-level form with not typeset result, such as a
|
purely Racket-level form with no typeset result, such as a
|
||||||
@racket[require] to import more operations, then typically just
|
@racket[require] to import more operations, then typically just
|
||||||
@litchar["@"] is used.
|
@litchar["@"] is used.
|
||||||
|
|
||||||
|
@ -679,4 +679,4 @@ need more power.
|
||||||
|
|
||||||
If you are interested in text generation and preprocessing, continue
|
If you are interested in text generation and preprocessing, continue
|
||||||
with @secref["reader"], but then switch to
|
with @secref["reader"], but then switch to
|
||||||
@other-doc['(lib "scribblings/scribble/scribble-pp.scrbl")].
|
@other-doc['(lib "scribblings/scribble/scribble-pp.scrbl")].
|
||||||
|
|
|
@ -175,7 +175,7 @@ The following example illustrates section hyperlinks:
|
||||||
|
|
||||||
Since the page is so short, the hyperlinks in the above example are
|
Since the page is so short, the hyperlinks in the above example are
|
||||||
more effective if you change the @filepath{info.rkt} file to add the
|
more effective if you change the @filepath{info.rkt} file to add the
|
||||||
@racket['multi-file] flag:
|
@racket['multi-page] flag:
|
||||||
|
|
||||||
@racketblock[
|
@racketblock[
|
||||||
(define scribblings '(("manual.scrbl" (multi-page))))
|
(define scribblings '(("manual.scrbl" (multi-page))))
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
"utils.rkt"
|
"utils.rkt"
|
||||||
(for-label racket/class
|
(for-label racket/class
|
||||||
scribble/render
|
scribble/render
|
||||||
scribble/xref))
|
scribble/xref
|
||||||
|
setup/dirs))
|
||||||
|
|
||||||
@(define-syntax-rule (defmodule/local lib . content)
|
@(define-syntax-rule (defmodule/local lib . content)
|
||||||
(begin
|
(begin
|
||||||
|
@ -354,6 +355,7 @@ Configures the renderer to redirect links to external documents via
|
||||||
@racket[url], adding a @tt{tag} query element to the end of the
|
@racket[url], adding a @tt{tag} query element to the end of the
|
||||||
URL that contains the Base64-encoded, @racket[print]ed, serialized
|
URL that contains the Base64-encoded, @racket[print]ed, serialized
|
||||||
original tag (in the sense of @racket[link-element]) for the link.
|
original tag (in the sense of @racket[link-element]) for the link.
|
||||||
|
The result of @racket[get-doc-search-url] is intended for use as @racket[url].
|
||||||
|
|
||||||
If the link is based on a cross-reference entry that has a
|
If the link is based on a cross-reference entry that has a
|
||||||
document-identifying string (see @racket[load-xref] and its
|
document-identifying string (see @racket[load-xref] and its
|
||||||
|
|
|
@ -148,7 +148,7 @@ information for all installed documentation, and @PFlag{m} or
|
||||||
setup/xref load-collections-xref}.
|
setup/xref load-collections-xref}.
|
||||||
|
|
||||||
The @DFlag{redirect-main} flag for HTML output redirects links to the local
|
The @DFlag{redirect-main} flag for HTML output redirects links to the local
|
||||||
installation's documentation to a given URL, such as
|
installation's documentation (not user-scope documentation) to a given URL, such as
|
||||||
@tt{http://docs.racket-lang.org/}. Beware that documentation links
|
@tt{http://docs.racket-lang.org/}. Beware that documentation links
|
||||||
sometimes change (although Scribble generates HTML paths and anchors
|
sometimes change (although Scribble generates HTML paths and anchors
|
||||||
in a relatively stable way), so
|
in a relatively stable way), so
|
||||||
|
@ -156,11 +156,13 @@ in a relatively stable way), so
|
||||||
more reliable when building with an installation for @italic{version}.
|
more reliable when building with an installation for @italic{version}.
|
||||||
The @DFlag{redirect-main} flag is ignored for non-HTML output.
|
The @DFlag{redirect-main} flag is ignored for non-HTML output.
|
||||||
|
|
||||||
The @DFlag{redirect} flag is like @DFlag{redirect-main}, except
|
The @DFlag{redirect} flag is like @DFlag{redirect-main}, except that
|
||||||
that it builds on the given URL to indicate a cross-reference tag that
|
it builds on the given URL to indicate a cross-reference tag that is
|
||||||
is more stable than an HTML path and anchor (in case the documentation
|
more stable than an HTML path and anchor (in case the documentation
|
||||||
for a function changes sections, for example). No server currently
|
for a function changes sections, for example), and it can generate
|
||||||
exists to serve such tag requests, however.
|
redirected linked for documentation that is installed in user scope.
|
||||||
|
The URL @tt{https://docs.racket-lang.org/local-redirect/index.html} can
|
||||||
|
work for these redirections.
|
||||||
|
|
||||||
For cross-references among documentation that is not part of the
|
For cross-references among documentation that is not part of the
|
||||||
Racket installation, use @DFlag{info-out} to save information from a
|
Racket installation, use @DFlag{info-out} to save information from a
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
(require setup/collects
|
(require setup/collects
|
||||||
racket/contract/base
|
racket/contract/base
|
||||||
racket/list
|
racket/list
|
||||||
|
racket/string
|
||||||
scribble/core
|
scribble/core
|
||||||
scribble/base
|
scribble/base
|
||||||
scribble/decode
|
scribble/decode
|
||||||
|
@ -43,7 +44,7 @@
|
||||||
affiliation?
|
affiliation?
|
||||||
(listof affiliation?)
|
(listof affiliation?)
|
||||||
#f)
|
#f)
|
||||||
#:email (or/c pre-content? email? (listof email?) #f))
|
#:email (or/c pre-content? email? (listof email?)))
|
||||||
#:rest (listof pre-content?)
|
#:rest (listof pre-content?)
|
||||||
block?)]
|
block?)]
|
||||||
[authorsaddresses (->* ()
|
[authorsaddresses (->* ()
|
||||||
|
@ -62,6 +63,9 @@
|
||||||
[email (->* ()
|
[email (->* ()
|
||||||
#:rest (listof pre-content?)
|
#:rest (listof pre-content?)
|
||||||
email?)]
|
email?)]
|
||||||
|
[email-string (->* ()
|
||||||
|
#:rest (listof string?)
|
||||||
|
email?)]
|
||||||
[email? (-> any/c boolean?)]
|
[email? (-> any/c boolean?)]
|
||||||
[affiliation (->* ()
|
[affiliation (->* ()
|
||||||
(#:position (or/c pre-content? #f)
|
(#:position (or/c pre-content? #f)
|
||||||
|
@ -367,11 +371,29 @@
|
||||||
(define (email . text)
|
(define (email . text)
|
||||||
(author-email text))
|
(author-email text))
|
||||||
|
|
||||||
|
(define (email-string . text)
|
||||||
|
(define text-escaped
|
||||||
|
(for/list ([str (in-list text)])
|
||||||
|
(escape-email-string str)))
|
||||||
|
(author-email
|
||||||
|
(list
|
||||||
|
(make-element
|
||||||
|
(make-style #f '(exact-chars))
|
||||||
|
text-escaped))))
|
||||||
|
|
||||||
(define (convert-email email)
|
(define (convert-email email)
|
||||||
(make-element
|
(make-element
|
||||||
(make-style "SAuthorEmail" command-props)
|
(make-style "SAuthorEmail" command-props)
|
||||||
(decode-content (email-text email))))
|
(decode-content (email-text email))))
|
||||||
|
|
||||||
|
(define escape-email-map
|
||||||
|
#(("#" . "\\#")
|
||||||
|
("%" . "\\%")))
|
||||||
|
(define (escape-email-string str)
|
||||||
|
(for/fold ([str str])
|
||||||
|
([escape-map (in-vector escape-email-map)])
|
||||||
|
(string-replace str (car escape-map) (cdr escape-map))))
|
||||||
|
|
||||||
(define (affiliation #:position [position #f]
|
(define (affiliation #:position [position #f]
|
||||||
#:institution [institution #f]
|
#:institution [institution #f]
|
||||||
#:street-address [street-address #f]
|
#:street-address [street-address #f]
|
||||||
|
|
|
@ -325,8 +325,25 @@
|
||||||
(when expect
|
(when expect
|
||||||
(let ([expect (do-plain-eval ev (car expect) #t)])
|
(let ([expect (do-plain-eval ev (car expect) #t)])
|
||||||
(unless (equal? val expect)
|
(unless (equal? val expect)
|
||||||
(error 'eval "example result check failed: ~.s" s))))
|
(define result " result: ")
|
||||||
|
(define expected " expected: ")
|
||||||
|
(error 'eval "example result check failed: ~.s\n~a\n~a\n"
|
||||||
|
s
|
||||||
|
(string-append result (to-lines val (string-length result)))
|
||||||
|
(string-append expected (to-lines expect (string-length expected)))))))
|
||||||
render+output)
|
render+output)
|
||||||
|
|
||||||
|
(define (to-lines exps blank-space)
|
||||||
|
(define blank (make-string blank-space #\space))
|
||||||
|
(apply
|
||||||
|
string-append
|
||||||
|
(for/list ([exp (in-list exps)]
|
||||||
|
[i (in-naturals)])
|
||||||
|
(define first-line? (= i 0))
|
||||||
|
(if (= i 0)
|
||||||
|
(format "~e" exp)
|
||||||
|
(format "\n~a~e" blank exp)))))
|
||||||
|
|
||||||
(lambda (str)
|
(lambda (str)
|
||||||
(if (eval-results? str)
|
(if (eval-results? str)
|
||||||
(list #f
|
(list #f
|
||||||
|
|
|
@ -1150,6 +1150,11 @@
|
||||||
[(#\↝) "$\\leadsto$"]
|
[(#\↝) "$\\leadsto$"]
|
||||||
[(#\↱) "$\\Lsh$"]
|
[(#\↱) "$\\Lsh$"]
|
||||||
[(#\↰) "$\\Rsh$"]
|
[(#\↰) "$\\Rsh$"]
|
||||||
|
[(#\⇀) "$\\rightharpoonup$"]
|
||||||
|
[(#\↼) "$\\leftharpoonup$"]
|
||||||
|
[(#\⇁) "$\\rightharpoondown$"]
|
||||||
|
[(#\↽) "$\\leftharpoondown$"]
|
||||||
|
[(#\⇌) "$\\rightleftharpoons$"]
|
||||||
[(#\⇕) "$\\Updownarrow$"]
|
[(#\⇕) "$\\Updownarrow$"]
|
||||||
[(#\א) "$\\aleph$"]
|
[(#\א) "$\\aleph$"]
|
||||||
[(#\′) "$\\prime$"]
|
[(#\′) "$\\prime$"]
|
||||||
|
@ -1174,6 +1179,7 @@
|
||||||
[(#\∀) "$\\forall$"]
|
[(#\∀) "$\\forall$"]
|
||||||
[(#\∃) "$\\exists$"]
|
[(#\∃) "$\\exists$"]
|
||||||
[(#\∘) "$\\circ$"]
|
[(#\∘) "$\\circ$"]
|
||||||
|
[(#\∂) "$\\partial$"]
|
||||||
[(#\θ) "$\\theta$"]
|
[(#\θ) "$\\theta$"]
|
||||||
[(#\ϑ) "$\\vartheta$"]
|
[(#\ϑ) "$\\vartheta$"]
|
||||||
[(#\τ) "$\\tau$"]
|
[(#\τ) "$\\tau$"]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user