Merge tag 'v7.9' into my-changes-rebased
This commit is contained in:
commit
6c8253609f
|
@ -1,4 +1,4 @@
|
||||||
# scribble-text-lib
|
# Scribble
|
||||||
|
|
||||||
This the source for the Racket packages: "scribble", "scribble-doc", "scribble-html-lib", "scribble-lib", "scribble-test", "scribble-text-lib".
|
This the source for the Racket packages: "scribble", "scribble-doc", "scribble-html-lib", "scribble-lib", "scribble-test", "scribble-text-lib".
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ is licensed under the [Apache 2.0] license and the [MIT] license.
|
||||||
|
|
||||||
[MIT]: https://github.com/racket/racket/blob/master/racket/src/LICENSE-MIT.txt
|
[MIT]: https://github.com/racket/racket/blob/master/racket/src/LICENSE-MIT.txt
|
||||||
[Apache 2.0]: https://www.apache.org/licenses/LICENSE-2.0.txt
|
[Apache 2.0]: https://www.apache.org/licenses/LICENSE-2.0.txt
|
||||||
[pull request]: https://github.com/racket/scribble-text-lib/pulls
|
[pull request]: https://github.com/racket/scribble/pulls
|
||||||
[issue]: https://github.com/racket/scribble-text-lib/issues
|
[issue]: https://github.com/racket/scribble/issues
|
||||||
[development mailing list]: https://lists.racket-lang.org
|
[development mailing list]: https://lists.racket-lang.org
|
||||||
[LICENSE]: LICENSE
|
[LICENSE]: LICENSE
|
||||||
|
|
|
@ -519,6 +519,32 @@ style:
|
||||||
@item{@ltxd[0]{postDoc} --- called after the document content; the
|
@item{@ltxd[0]{postDoc} --- called after the document content; the
|
||||||
default does nothing.}
|
default does nothing.}
|
||||||
|
|
||||||
|
@item{A set of commands that control the basic set of Latex packages that are loaded:
|
||||||
|
@itemlist[@item{@ltxd[0]{packageGraphicx}, defaults to @tt{\usepackage{graphicx}}}
|
||||||
|
@item{@ltxd[0]{packageHyperref}, defaults to @tt{\usepackage{hyperref}}}
|
||||||
|
@item{@ltxd[0]{renewrmdefault}, defaults to @tt{\renewcommand{\rmdefault}{ptm}}}
|
||||||
|
@item{@ltxd[0]{packageRelsize}, defaults to @tt{\usepackage{relsize}}}
|
||||||
|
@item{@ltxd[0]{packageAmsmath}, defaults to @tt{\usepackage{amsmath}}}
|
||||||
|
@item{@ltxd[0]{packageMathabx}, defaults to @tt{\usepackage{mathabx}}}
|
||||||
|
@item{@ltxd[0]{packageWasysym}, defaults to @tt{\let\leftmoon\relax \let\rightmoon\relax \let\fullmoon\relax \let\newmoon\relax \let\diameter\relax \usepackage[nointegrals]{wasysym}}}
|
||||||
|
@item{@ltxd[0]{packageTxfonts}, defaults to @tt{\let\widering\relax \usepackage{newtxmath}}}
|
||||||
|
@item{@ltxd[0]{packageTextcomp}, defaults to @tt{\usepackage{textcomp}}}
|
||||||
|
@item{@ltxd[0]{packageFramed}, defaults to @tt{\usepackage{framed}}}
|
||||||
|
@item{@ltxd[0]{packageHyphenat}, defaults to @tt{\usepackage[htt]{hyphenat}}}
|
||||||
|
@item{@ltxd[0]{packageColor}, defaults to @tt{\usepackage[usenames,dvipsnames]{color}}}
|
||||||
|
@item{@ltxd[0]{doHypersetup}, defaults to @tt{\hypersetup{bookmarks=true,bookmarksopen=true,bookmarksnumbered=true}}}
|
||||||
|
@item{@ltxd[0]{packageTocstyle}, defaults to @tt{\IfFileExists{tocstyle.sty}{\usepackage{tocstyle}\usetocstyle{standard}}{}}}
|
||||||
|
@item{@ltxd[0]{packageCJK}, defaults to @tt{\IfFileExists{CJK.sty}{\usepackage{CJK}}{}}}]
|
||||||
|
@history[#:changed "1.36" @list{Added @ltx{packageTxfonts}}]
|
||||||
|
@history[#:changed "1.37" @list{
|
||||||
|
Added @ltx{packageAmsmath};
|
||||||
|
changed @ltx{packageWasysym} to use @tt{nointegrals} option;
|
||||||
|
changed @ltx{packageTxfonts} to load @tt{newtxmath}.
|
||||||
|
Note that documents could look different due to
|
||||||
|
the new @tt{wasysym} option and the inclusion of @tt{newtxmath}.
|
||||||
|
See @hyperlink["https://github.com/racket/scribble/pull/274"]{
|
||||||
|
racket/scribble#274} for examples.}]}
|
||||||
|
|
||||||
@item{@ltxd[0]{sectionNewpage} --- called before each top-level
|
@item{@ltxd[0]{sectionNewpage} --- called before each top-level
|
||||||
section starts; the default does nothing, while the
|
section starts; the default does nothing, while the
|
||||||
@racketmodname[scribble/manual] configuration uses
|
@racketmodname[scribble/manual] configuration uses
|
||||||
|
|
|
@ -417,7 +417,7 @@ The recognized @tech{style properties} are as follows:
|
||||||
|
|
||||||
@item{@tech{numberer} --- A @tech{numberer} created with
|
@item{@tech{numberer} --- A @tech{numberer} created with
|
||||||
@racket[make-numberer] determines a representation of the
|
@racket[make-numberer] determines a representation of the
|
||||||
part's section number as an extension of it's patent's number.
|
part's section number as an extension of it's parent's number.
|
||||||
A @tech{numberer} overrides the default representation, which
|
A @tech{numberer} overrides the default representation, which
|
||||||
is a natural number or (in the case of an accompanying
|
is a natural number or (in the case of an accompanying
|
||||||
@racket['grouper] property) a Roman numeral. If a
|
@racket['grouper] property) a Roman numeral. If a
|
||||||
|
@ -706,7 +706,7 @@ The following @tech{style properties} are currently recognized:
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
|
||||||
@defstruct[nested-flow ([style any/c]
|
@defstruct[nested-flow ([style style?]
|
||||||
[blocks (listof block?)])]{
|
[blocks (listof block?)])]{
|
||||||
|
|
||||||
A @techlink{nested flow} has a style and a @tech{flow}.
|
A @techlink{nested flow} has a style and a @tech{flow}.
|
||||||
|
@ -1712,7 +1712,7 @@ tag.}
|
||||||
|
|
||||||
Use as a @tech{style property} for an @racket[element],
|
Use as a @tech{style property} for an @racket[element],
|
||||||
@racket[paragraph], or @racket[compound-paragraph] to substitute an
|
@racket[paragraph], or @racket[compound-paragraph] to substitute an
|
||||||
alternate HTML tag (instead of @tt{<span>}, @tt{<p>}, @tt{div},
|
alternate HTML tag (instead of @tt{<span>}, @tt{<p>}, @tt{<div>},
|
||||||
@|etc|).}
|
@|etc|).}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1848,13 +1848,15 @@ For a @racket[part] that corresponds to an HTML page, adds content to
|
||||||
the @tt{<head>} tag.}
|
the @tt{<head>} tag.}
|
||||||
|
|
||||||
|
|
||||||
@defstruct[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes))])]{
|
@defstruct[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])]{
|
||||||
For a @racket[part] that corresponds to an HTML page,
|
For a @racket[part] that corresponds to an HTML page,
|
||||||
controls how objects that subscribe to the @racketmodname[file/convertible]
|
controls how objects that subscribe to the @racketmodname[file/convertible]
|
||||||
protocol are rendered.
|
protocol are rendered.
|
||||||
|
|
||||||
The alternatives in the @racket[types] field are tried in order
|
The alternatives in the @racket[types] field are tried in order
|
||||||
and the first one that succeeds is used in the html output.
|
and the first one that succeeds is used in the html output.
|
||||||
|
|
||||||
|
@history[#:changed "1.34" @elem{Added support for @racket['gif-bytes].}]
|
||||||
}
|
}
|
||||||
|
|
||||||
@defstruct[part-link-redirect ([url url?])]{
|
@defstruct[part-link-redirect ([url url?])]{
|
||||||
|
|
|
@ -8,10 +8,6 @@
|
||||||
|
|
||||||
@(define css tt)
|
@(define css tt)
|
||||||
|
|
||||||
@(define-syntax (opt-example stx)
|
|
||||||
;; A #\? 'paren-shape value triggers RktOpt:
|
|
||||||
#`@racket[#,(syntax-property #'(in-example) 'paren-shape '#\?)])
|
|
||||||
|
|
||||||
@title{Manual All-Styles Document}
|
@title{Manual All-Styles Document}
|
||||||
|
|
||||||
@table-of-contents[]
|
@table-of-contents[]
|
||||||
|
@ -76,7 +72,9 @@
|
||||||
|
|
||||||
@item{@css{RktModLink} (a linked module reference): @racketmodname[racket/base]}
|
@item{@css{RktModLink} (a linked module reference): @racketmodname[racket/base]}
|
||||||
|
|
||||||
@item{@css{RktOpt} (option-argument brackets): brackets in @opt-example[]}
|
@item{@css{RktOpt} (option-argument brackets): brackets in
|
||||||
|
|
||||||
|
@defproc[#:link-target? #f (f [x any/c 1]) any]}
|
||||||
|
|
||||||
@item{@css{RktKw} (not normally used): @racketkeywordfont{example}}
|
@item{@css{RktKw} (not normally used): @racketkeywordfont{example}}
|
||||||
|
|
||||||
|
|
|
@ -322,7 +322,7 @@ which renders as
|
||||||
|
|
||||||
The @racket[tabular] function takes a list of lists to organize into a
|
The @racket[tabular] function takes a list of lists to organize into a
|
||||||
two-dimensional table. By default, no spacing is added between columns,
|
two-dimensional table. By default, no spacing is added between columns,
|
||||||
so supply a @racket[#:sep] argument to acts as a column separator.
|
so supply a @racket[#:sep] argument to act as a column separator.
|
||||||
For example,
|
For example,
|
||||||
|
|
||||||
@sample|{
|
@sample|{
|
||||||
|
|
|
@ -555,6 +555,11 @@ sub-form in a procedure being documented).}
|
||||||
@defproc[(racketparenfont [pre-content pre-content?] ...) element?]{Like
|
@defproc[(racketparenfont [pre-content pre-content?] ...) element?]{Like
|
||||||
@racket[racketplainfont], but colored like parentheses.}
|
@racket[racketplainfont], but colored like parentheses.}
|
||||||
|
|
||||||
|
@defproc[(racketoptionalfont [pre-content pre-content?] ...) element?]{Like
|
||||||
|
@racket[racketplainfont], but colored as optional.
|
||||||
|
@history[#:added "1.36"]
|
||||||
|
}
|
||||||
|
|
||||||
@defproc[(racketmetafont [pre-content pre-content?] ...) element?]{Like
|
@defproc[(racketmetafont [pre-content pre-content?] ...) element?]{Like
|
||||||
@racket[racketplainfont], but colored as meta-syntax, such as backquote or
|
@racket[racketplainfont], but colored as meta-syntax, such as backquote or
|
||||||
unquote.}
|
unquote.}
|
||||||
|
@ -596,6 +601,7 @@ in a form definition.}
|
||||||
@defproc[(schemevarfont [pre-content pre-content?] ...) element?]
|
@defproc[(schemevarfont [pre-content pre-content?] ...) element?]
|
||||||
@defproc[(schemekeywordfont [pre-content pre-content?] ...) element?]
|
@defproc[(schemekeywordfont [pre-content pre-content?] ...) element?]
|
||||||
@defproc[(schemeparenfont [pre-content pre-content?] ...) element?]
|
@defproc[(schemeparenfont [pre-content pre-content?] ...) element?]
|
||||||
|
@defproc[(schemeoptionalfont [pre-content pre-content?] ...) element?]
|
||||||
@defproc[(schememetafont [pre-content pre-content?] ...) element?]
|
@defproc[(schememetafont [pre-content pre-content?] ...) element?]
|
||||||
@defproc[(schemeerror [pre-content pre-content?] ...) element?]
|
@defproc[(schemeerror [pre-content pre-content?] ...) element?]
|
||||||
@defproc[(schememodfont [pre-content pre-content?] ...) element?]
|
@defproc[(schememodfont [pre-content pre-content?] ...) element?]
|
||||||
|
@ -830,7 +836,7 @@ Equivalent to @racket[defmodule] variants @racket[#:no-declare].}
|
||||||
ellipses+]
|
ellipses+]
|
||||||
[options (code:line maybe-kind maybe-link maybe-id)]
|
[options (code:line maybe-kind maybe-link maybe-id)]
|
||||||
[maybe-kind code:blank
|
[maybe-kind code:blank
|
||||||
(code:line #:kind kind-string-expr)]
|
(code:line #:kind kind-content-expr)]
|
||||||
[maybe-link code:blank
|
[maybe-link code:blank
|
||||||
(code:line #:link-target? link-target?-expr)]
|
(code:line #:link-target? link-target?-expr)]
|
||||||
[maybe-id code:blank
|
[maybe-id code:blank
|
||||||
|
@ -939,8 +945,8 @@ by the @racket[current-display-width] parameter.
|
||||||
|
|
||||||
An optional @racket[#:kind] specification chooses the decorative
|
An optional @racket[#:kind] specification chooses the decorative
|
||||||
label, which defaults to @racket["procedure"]. A @racket[#f]
|
label, which defaults to @racket["procedure"]. A @racket[#f]
|
||||||
result for @racket[kind-string-expr] uses the default, otherwise
|
result for @racket[kind-content-expr] uses the default, otherwise
|
||||||
@racket[kind-string-expr] should produce a string. An alternate
|
@racket[kind-content-expr] should produce content in the sense of @racket[content?]. An alternate
|
||||||
label should be all lowercase.
|
label should be all lowercase.
|
||||||
|
|
||||||
If @racket[#:id [src-id dest-id-expr]] is supplied, then
|
If @racket[#:id [src-id dest-id-expr]] is supplied, then
|
||||||
|
@ -1001,7 +1007,7 @@ Examples:
|
||||||
pre-flow ...)
|
pre-flow ...)
|
||||||
([options (code:line maybe-kind maybe-link maybe-id maybe-literals)]
|
([options (code:line maybe-kind maybe-link maybe-id maybe-literals)]
|
||||||
[maybe-kind code:blank
|
[maybe-kind code:blank
|
||||||
(code:line #:kind kind-string-expr)]
|
(code:line #:kind kind-content-expr)]
|
||||||
[maybe-link code:blank
|
[maybe-link code:blank
|
||||||
(code:line #:link-target? link-target?-expr)]
|
(code:line #:link-target? link-target?-expr)]
|
||||||
[maybe-id code:blank
|
[maybe-id code:blank
|
||||||
|
@ -1022,7 +1028,7 @@ result of @racket[id-expr]) whose syntax is described by
|
||||||
@racket[id], then @racket[form-datum] must have the form @racket[(id
|
@racket[id], then @racket[form-datum] must have the form @racket[(id
|
||||||
. _datum)].
|
. _datum)].
|
||||||
|
|
||||||
If @racket[#:kind kind-string-expr] is supplied, it is used in the
|
If @racket[#:kind kind-content-expr] is supplied, it is used in the
|
||||||
same way as for @racket[defproc], but the default kind is
|
same way as for @racket[defproc], but the default kind is
|
||||||
@racket["syntax"].
|
@racket["syntax"].
|
||||||
|
|
||||||
|
@ -1332,7 +1338,7 @@ Like @racket[defparam], but the contract on a parameter argument is
|
||||||
pre-flow ...)
|
pre-flow ...)
|
||||||
([options (code:line maybe-kind maybe-link maybe-id)]
|
([options (code:line maybe-kind maybe-link maybe-id)]
|
||||||
[maybe-kind code:blank
|
[maybe-kind code:blank
|
||||||
(code:line #:kind kind-string-expr)]
|
(code:line #:kind kind-content-expr)]
|
||||||
[maybe-link code:blank
|
[maybe-link code:blank
|
||||||
(code:line #:link-target? link-target?-expr)]
|
(code:line #:link-target? link-target?-expr)]
|
||||||
[maybe-id code:blank
|
[maybe-id code:blank
|
||||||
|
@ -1342,7 +1348,7 @@ Like @racket[defparam], but the contract on a parameter argument is
|
||||||
|
|
||||||
Like @racket[defproc], but for a non-procedure binding.
|
Like @racket[defproc], but for a non-procedure binding.
|
||||||
|
|
||||||
If @racket[#:kind kind-string-expr] is supplied,
|
If @racket[#:kind kind-content-expr] is supplied,
|
||||||
it is used in the same way as for
|
it is used in the same way as for
|
||||||
@racket[defproc], but the default kind is @racket["value"].
|
@racket[defproc], but the default kind is @racket["value"].
|
||||||
|
|
||||||
|
@ -1609,14 +1615,15 @@ accepted and propagated to the superclass.}
|
||||||
([maybe-link code:blank
|
([maybe-link code:blank
|
||||||
(code:line #:link-target? link-target?-expr)]
|
(code:line #:link-target? link-target?-expr)]
|
||||||
[maybe-mode code:blank
|
[maybe-mode code:blank
|
||||||
|
(code:line #:mode public)
|
||||||
|
(code:line #:mode public-final)
|
||||||
(code:line #:mode override)
|
(code:line #:mode override)
|
||||||
(code:line #:mode override-final)
|
(code:line #:mode override-final)
|
||||||
(code:line #:mode public-final)
|
|
||||||
(code:line #:mode augment)
|
(code:line #:mode augment)
|
||||||
(code:line #:mode augment-final)
|
(code:line #:mode augment-final)
|
||||||
(code:line #:mode pubment)
|
|
||||||
(code:line #:mode extend)
|
(code:line #:mode extend)
|
||||||
(code:line #:mode extend-final)])]{
|
(code:line #:mode extend-final)
|
||||||
|
(code:line #:mode pubment)])]{
|
||||||
|
|
||||||
Like @racket[defproc], but for a method within a @racket[defclass] or
|
Like @racket[defproc], but for a method within a @racket[defclass] or
|
||||||
@racket[definterface] body.
|
@racket[definterface] body.
|
||||||
|
@ -1626,7 +1633,10 @@ method from a superclass, and so on. (For these purposes, use
|
||||||
@racket[#:mode override] when refining a method of an implemented
|
@racket[#:mode override] when refining a method of an implemented
|
||||||
interface.) The @racket[extend] mode is like @racket[override], but
|
interface.) The @racket[extend] mode is like @racket[override], but
|
||||||
the description of the method should describe only extensions to the
|
the description of the method should describe only extensions to the
|
||||||
superclass implementation.}
|
superclass implementation. When @racket[maybe-mode] is not supplied,
|
||||||
|
it defaults to @racket[public].
|
||||||
|
|
||||||
|
@history[#:changed "1.35" @elem{Added a check against invalid @racket[maybe-mode].}]}
|
||||||
|
|
||||||
@defform[(defmethod* maybe-mode maybe-link
|
@defform[(defmethod* maybe-mode maybe-link
|
||||||
([(id arg-spec ...)
|
([(id arg-spec ...)
|
||||||
|
@ -1820,7 +1830,7 @@ For example:
|
||||||
@racketblock[@tech[#:doc '(lib "scribblings/reference/reference.scrbl")]{blame object}]
|
@racketblock[@tech[#:doc '(lib "scribblings/reference/reference.scrbl")]{blame object}]
|
||||||
|
|
||||||
creates a link to @tech[#:doc '(lib "scribblings/reference/reference.scrbl")]{blame object} in
|
creates a link to @tech[#:doc '(lib "scribblings/reference/reference.scrbl")]{blame object} in
|
||||||
@other-doc['(lib "scribblings/guide/guide.scrbl")].
|
@other-doc['(lib "scribblings/reference/reference.scrbl")].
|
||||||
|
|
||||||
With the default style files, the hyperlink created by @racket[tech]
|
With the default style files, the hyperlink created by @racket[tech]
|
||||||
is somewhat quieter than most hyperlinks: the underline in HTML output
|
is somewhat quieter than most hyperlinks: the underline in HTML output
|
||||||
|
|
|
@ -215,7 +215,7 @@
|
||||||
(define (ltx s) (tt "\\" s)) ; command
|
(define (ltx s) (tt "\\" s)) ; command
|
||||||
(define (ltxe s) (tt s)) ; enviornment
|
(define (ltxe s) (tt s)) ; enviornment
|
||||||
(define (ltxd n s)
|
(define (ltxd n s)
|
||||||
(make-element #f (cons (index (list s) (ltx s))
|
(make-element #f (cons (index (list (format "\\~a" s)) (ltx s))
|
||||||
(for/list ([i (in-range n)]) (tt "{}")))))
|
(for/list ([i (in-range n)]) (tt "{}")))))
|
||||||
|
|
||||||
;; Utility to render examples of scribble documentation forms
|
;; Utility to render examples of scribble documentation forms
|
||||||
|
|
|
@ -20,6 +20,10 @@ by @racket[load-xref], @racket[#f] otherwise.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(load-xref [sources (listof (-> (or/c any/c (-> list?))))]
|
@defproc[(load-xref [sources (listof (-> (or/c any/c (-> list?))))]
|
||||||
|
[#:demand-source-for-use
|
||||||
|
demand-source-for-use
|
||||||
|
(tag? symbol? -> (or/c (-> any/c) #f))
|
||||||
|
(lambda (_tag _use-id) (demand-source _tag))]
|
||||||
[#:demand-source demand-source
|
[#:demand-source demand-source
|
||||||
(tag? -> (or/c (-> any/c) #f))
|
(tag? -> (or/c (-> any/c) #f))
|
||||||
(lambda (_tag) #f)]
|
(lambda (_tag) #f)]
|
||||||
|
@ -45,10 +49,22 @@ information, a @racket[#f] to be ignored, or a value produced by
|
||||||
and the @racket[_doc-id] part (if any) overrides
|
and the @racket[_doc-id] part (if any) overrides
|
||||||
@racket[doc-id-string] to identify the source document.
|
@racket[doc-id-string] to identify the source document.
|
||||||
|
|
||||||
The @racket[demand-source] function can effectively add a new source
|
The @racket[demand-source-for-use] function can effectively add a new
|
||||||
to @racket[sources] in response to a search for information on the
|
source to @racket[sources] in response to a search for information on
|
||||||
given tag. The @racket[demand-source] function returns @racket[#f]
|
the given tag in the given rendering, where @racket[_use-id] is unique
|
||||||
to indicate that no new sources satisfy the given tag.
|
to a particular rendering request, a particular transfer (in the sense
|
||||||
|
of @racket[xref-transfer-info]), or all direct queries of the
|
||||||
|
cross-reference information (such as through
|
||||||
|
@racket[xref-binding->definition-tag]). The
|
||||||
|
@racket[demand-source-for-use] function should return @racket[#f] to
|
||||||
|
indicate that no new sources satisfy the given tag for the given
|
||||||
|
@racket[_use-id].
|
||||||
|
|
||||||
|
The default @racket[demand-source-for-use] function uses
|
||||||
|
@racket[demand-source], which is provided only for backward
|
||||||
|
compatibility. Since the @racket[demand-source] function accepts only
|
||||||
|
a tag, it is suitable only when the result of @racket[load-xref] will
|
||||||
|
only have a single use context, such as a single rendering.
|
||||||
|
|
||||||
Since the format of serialized information is specific to a rendering
|
Since the format of serialized information is specific to a rendering
|
||||||
class, the optional @racket[using-render%] argument accepts the
|
class, the optional @racket[using-render%] argument accepts the
|
||||||
|
@ -72,7 +88,8 @@ method of @racket[render-mixin].
|
||||||
Use @racket[load-collections-xref] from @racketmodname[setup/xref] to
|
Use @racket[load-collections-xref] from @racketmodname[setup/xref] to
|
||||||
get all cross-reference information for installed documentation.
|
get all cross-reference information for installed documentation.
|
||||||
|
|
||||||
@history[#:changed "1.1" @elem{Added the @racket[#:doc-id] argument.}]}
|
@history[#:changed "1.1" @elem{Added the @racket[#:doc-id] argument.}
|
||||||
|
#:changed "1.34" @elem{Added the @racket[#:demand-source-for-use] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(xref-binding->definition-tag [xref xref?]
|
@defproc[(xref-binding->definition-tag [xref xref?]
|
||||||
|
|
|
@ -23,4 +23,4 @@
|
||||||
|
|
||||||
(define pkg-authors '(mflatt eli))
|
(define pkg-authors '(mflatt eli))
|
||||||
|
|
||||||
(define version "1.33")
|
(define version "1.37")
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
\renewcommand\packageTocstyle\relax
|
\renewcommand\packageTocstyle\relax
|
||||||
\renewcommand\packageMathabx{\ifx\bigtimes\undefined \usepackage{mathabx} \else \relax \fi}
|
\renewcommand\packageMathabx{\ifx\bigtimes\undefined \usepackage{mathabx} \else \relax \fi}
|
||||||
% Both 'mathabx' and 'newtxmath' (required by the 'acmart' class) define a '\bigtimes' command.
|
% Both 'mathabx' and 'newtxmath' (required by the 'acmart' class) define a '\bigtimes' command.
|
||||||
|
\renewcommand\packageTxfonts\relax
|
||||||
\let\Footnote\undefined
|
\let\Footnote\undefined
|
||||||
\let\captionwidth\undefined
|
\let\captionwidth\undefined
|
||||||
\renewcommand{\renewrmdefault}{}
|
\renewcommand{\renewrmdefault}{}
|
||||||
|
|
|
@ -30,4 +30,4 @@
|
||||||
[link-resource ([path path-string?])]
|
[link-resource ([path path-string?])]
|
||||||
|
|
||||||
[head-extra ([xexpr xexpr/c])]
|
[head-extra ([xexpr xexpr/c])]
|
||||||
[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes))])])
|
[render-convertible-as ([types (listof (or/c 'png-bytes 'svg-bytes 'gif-bytes))])])
|
||||||
|
|
|
@ -27,6 +27,9 @@
|
||||||
(provide render-mixin
|
(provide render-mixin
|
||||||
render-multi-mixin)
|
render-multi-mixin)
|
||||||
|
|
||||||
|
(define (number->decimal-string s)
|
||||||
|
(number->string (if (integer? s) s (exact->inexact s))))
|
||||||
|
|
||||||
(define as-literal
|
(define as-literal
|
||||||
(let ([loc (xml:make-location 0 0 0)])
|
(let ([loc (xml:make-location 0 0 0)])
|
||||||
(lambda strings (xml:make-cdata loc loc (string-append* strings)))))
|
(lambda strings (xml:make-cdata loc loc (string-append* strings)))))
|
||||||
|
@ -107,7 +110,7 @@
|
||||||
(define extra-breaking? (make-parameter #f))
|
(define extra-breaking? (make-parameter #f))
|
||||||
(define current-version (make-parameter (version)))
|
(define current-version (make-parameter (version)))
|
||||||
(define current-part-files (make-parameter #f))
|
(define current-part-files (make-parameter #f))
|
||||||
(define current-render-convertible-requests (make-parameter '(png@2x-bytes png-bytes svg-bytes)))
|
(define current-render-convertible-requests (make-parameter '(png@2x-bytes png-bytes svg-bytes gif-bytes)))
|
||||||
|
|
||||||
(define (url->string* u)
|
(define (url->string* u)
|
||||||
(parameterize ([current-url-encode-mode 'unreserved])
|
(parameterize ([current-url-encode-mode 'unreserved])
|
||||||
|
@ -1470,12 +1473,7 @@
|
||||||
(if (and (not (list? cvt))
|
(if (and (not (list? cvt))
|
||||||
(equal? request 'png@2x-bytes))
|
(equal? request 'png@2x-bytes))
|
||||||
(/ v 2.0)
|
(/ v 2.0)
|
||||||
v))]
|
v))])
|
||||||
[number->decimal-string (lambda (s)
|
|
||||||
(number->string
|
|
||||||
(if (integer? s)
|
|
||||||
s
|
|
||||||
(exact->inexact s))))])
|
|
||||||
(list
|
(list
|
||||||
(add-padding
|
(add-padding
|
||||||
cvt
|
cvt
|
||||||
|
@ -1496,6 +1494,23 @@
|
||||||
`(img
|
`(img
|
||||||
([src ,(install-file "pict.svg" bstr)]
|
([src ,(install-file "pict.svg" bstr)]
|
||||||
[type "image/svg+xml"]))))))]
|
[type "image/svg+xml"]))))))]
|
||||||
|
[(and (equal? request 'gif-bytes) (convert e 'gif-bytes))
|
||||||
|
=>
|
||||||
|
(lambda (gif-bytes)
|
||||||
|
(define gif-src (install-file "pict.gif" gif-bytes))
|
||||||
|
|
||||||
|
;; GIFs store their width and height in the first 4 bytes of the logical screen
|
||||||
|
;; descriptor, which comes after the 6-byte long header block. The width and height are
|
||||||
|
;; each represented by 2-byte wide little-endian unsigned fields.
|
||||||
|
(define width (+ (bytes-ref gif-bytes 6) (* (bytes-ref gif-bytes 7) 256)))
|
||||||
|
(define height (+ (bytes-ref gif-bytes 8) (* (bytes-ref gif-bytes 9) 256)))
|
||||||
|
|
||||||
|
(define image-tag
|
||||||
|
`(img ([src ,gif-src]
|
||||||
|
[type "image/gif"]
|
||||||
|
[width ,(number->decimal-string width)]
|
||||||
|
[height ,(number->decimal-string height)])))
|
||||||
|
(list image-tag))]
|
||||||
[else #f])))
|
[else #f])))
|
||||||
|
|
||||||
;; Add padding for a bounding-box conversion reply:
|
;; Add padding for a bounding-box conversion reply:
|
||||||
|
|
|
@ -1317,6 +1317,10 @@
|
||||||
[(#\⋱) "$\\ddots$"]
|
[(#\⋱) "$\\ddots$"]
|
||||||
[(#\⋯) "$\\cdots$"]
|
[(#\⋯) "$\\cdots$"]
|
||||||
[(#\⋯) "\\hdots"]
|
[(#\⋯) "\\hdots"]
|
||||||
|
[(#\⊸) "$\\multimap$"]
|
||||||
|
[(#\⟜) "$\\multimapinv$"]
|
||||||
|
[(#\⅋) "$\\invamp$"]
|
||||||
|
[(#\□) "$\\square$"]
|
||||||
[else
|
[else
|
||||||
(cond
|
(cond
|
||||||
[(char<=? #\uAC00 c #\uD7AF) ; Korean Hangul
|
[(char<=? #\uAC00 c #\uD7AF) ; Korean Hangul
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
(define-syntax (tangle stx)
|
(define-syntax (tangle stx)
|
||||||
(define chunk-mentions '())
|
(define chunk-mentions '())
|
||||||
(unless first-id
|
(unless first-id
|
||||||
(raise-syntax-error 'scribble/lp "no chunks"))
|
(raise-no-chunks-error))
|
||||||
(define orig-stx (syntax-case stx () [(_ orig) #'orig]))
|
(define orig-stx (syntax-case stx () [(_ orig) #'orig]))
|
||||||
(define (restore nstx d) (datum->syntax orig-stx d nstx nstx))
|
(define (restore nstx d) (datum->syntax orig-stx d nstx nstx))
|
||||||
(define (shift nstx) (replace-context orig-stx nstx))
|
(define (shift nstx) (replace-context orig-stx nstx))
|
||||||
|
@ -121,6 +121,7 @@
|
||||||
|
|
||||||
(define-for-syntax ((make-module-begin submod?) stx)
|
(define-for-syntax ((make-module-begin submod?) stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
|
[(_) (raise-no-chunks-error)]
|
||||||
[(_ body0 . body)
|
[(_ body0 . body)
|
||||||
(let ([expanded
|
(let ([expanded
|
||||||
(expand `(,#'module scribble-lp-tmp-name scribble/private/lp
|
(expand `(,#'module scribble-lp-tmp-name scribble/private/lp
|
||||||
|
@ -147,3 +148,6 @@
|
||||||
|
|
||||||
(define-syntax module-begin/plain (make-module-begin #f))
|
(define-syntax module-begin/plain (make-module-begin #f))
|
||||||
(define-syntax module-begin/doc (make-module-begin #t))
|
(define-syntax module-begin/doc (make-module-begin #t))
|
||||||
|
|
||||||
|
(define-for-syntax (raise-no-chunks-error)
|
||||||
|
(raise-syntax-error 'scribble/lp "no chunks"))
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -88,6 +88,7 @@ span.RktValDef, span.RktStxDef, span.RktSymDef
|
||||||
|
|
||||||
.RktOpt {
|
.RktOpt {
|
||||||
color: black;
|
color: black;
|
||||||
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.RktKw {
|
.RktKw {
|
||||||
|
|
|
@ -15,14 +15,170 @@ AddOnLoad(function() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// cache of source urls
|
||||||
|
var cache = {};
|
||||||
|
|
||||||
|
function ParseSource(source, mod_path, single_collection) {
|
||||||
|
|
||||||
|
var source_url = new URL(source);
|
||||||
|
|
||||||
|
if (source_url.protocol == "github:") {
|
||||||
|
// browser URL parser only works with http(s) URLs
|
||||||
|
source_url = new URL("https" + source.substring(6));
|
||||||
|
var host = source_url.host;
|
||||||
|
var url_path = source_url.pathname.substring(1).split("/");
|
||||||
|
if (!(url_path.length >= 2)) return null;
|
||||||
|
var user = url_path.shift();
|
||||||
|
var repo = url_path.shift();
|
||||||
|
var branch = url_path.shift();
|
||||||
|
var source_path = url_path.join("/");
|
||||||
|
}
|
||||||
|
else if (("https:" == source_url.protocol) || ("git:" == source_url.protocol)) {
|
||||||
|
// browser URL parser only works with http(s) URLs
|
||||||
|
if ("git:" == source_url.protocol)
|
||||||
|
source_url = new URL("https" + source.substring(3));
|
||||||
|
|
||||||
|
var host = source_url.host;
|
||||||
|
var source_path = source_url.searchParams.get("path");
|
||||||
|
var branch = (source_url.hash || "#master").substring(1);
|
||||||
|
var url_path = source_url.pathname.substring(1).split("/");
|
||||||
|
if (url_path.length < 2) throw [source_url.pathname, url_path];
|
||||||
|
var user = url_path.shift();
|
||||||
|
var repo = url_path.shift();
|
||||||
|
var mtch = repo.match(/(.*)\.git$/);
|
||||||
|
if (mtch) repo = mtch[1];
|
||||||
|
|
||||||
|
}
|
||||||
|
else return null;
|
||||||
|
|
||||||
|
var mod_path_re = /^\(lib "(.+)"\)$/;
|
||||||
|
|
||||||
|
var mod_path_elems = mod_path && mod_path.match(mod_path_re)[1].split("/");
|
||||||
|
|
||||||
|
if (!user || !repo || !mod_path_elems)
|
||||||
|
return null;
|
||||||
|
if (single_collection)
|
||||||
|
mod_path_elems.shift();
|
||||||
|
|
||||||
|
var file_path = mod_path_elems.join("/");
|
||||||
|
|
||||||
|
|
||||||
|
if (source_path) {
|
||||||
|
file_path = source_path + "/" + file_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
return { user: user,
|
||||||
|
repo: repo,
|
||||||
|
file_path: file_path,
|
||||||
|
branch: branch,
|
||||||
|
host: host };
|
||||||
|
}
|
||||||
|
|
||||||
|
function AddSourceElement(pkg_url, info) {
|
||||||
|
info.appendChild(document.createTextNode("Document source "));
|
||||||
|
var url_line = document.createElement("div");
|
||||||
|
var a = document.createElement("a");
|
||||||
|
a.href = pkg_url;
|
||||||
|
a.style.whiteSpace = "nowrap";
|
||||||
|
a.appendChild(document.createTextNode(pkg_url));
|
||||||
|
addSpan(url_line, "\xA0", "RktRdr");
|
||||||
|
url_line.appendChild(a);
|
||||||
|
info.appendChild(url_line);
|
||||||
|
}
|
||||||
|
|
||||||
|
var prefixes = { "github.com": "tree",
|
||||||
|
"gitlab.com": "-/blob" };
|
||||||
|
|
||||||
|
|
||||||
|
function AddSourceUrl(source, mod_path, collection, info) {
|
||||||
|
// multi is encoded as an array, empty as false
|
||||||
|
single_collection = (typeof collection === "string");
|
||||||
|
|
||||||
|
var parsed = source && mod_path && ParseSource(source, mod_path, single_collection);
|
||||||
|
|
||||||
|
if (!parsed) return;
|
||||||
|
|
||||||
|
prefix = prefixes.hasOwnProperty(parsed.host) && prefixes[parsed.host];
|
||||||
|
if (!prefix) return;
|
||||||
|
|
||||||
|
var correct_url = "https://" + [parsed.host, parsed.user, parsed.repo, prefix, parsed.branch, parsed.file_path].join("/");
|
||||||
|
|
||||||
|
if (info) AddSourceElement(correct_url, info);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addSpan(dest, str, cn) {
|
||||||
|
var s = document.createElement("span");
|
||||||
|
s.className = cn;
|
||||||
|
s.style.whiteSpace = "nowrap";
|
||||||
|
s.appendChild(document.createTextNode(str));
|
||||||
|
dest.appendChild(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// test cases
|
||||||
|
if (false) {
|
||||||
|
console.log(ParseSource("git://gitlab.com/benn/foo?path=xxx",
|
||||||
|
'(lib "asn1/scribblings/asn1.scrbl")',
|
||||||
|
false))
|
||||||
|
console.log(ParseSource("github://github.com/carl-eastlund/mischief/master",
|
||||||
|
'(lib "asn1/scribblings/asn1.scrbl")',
|
||||||
|
false))
|
||||||
|
console.log(ParseSource("github://github.com/carl-eastlund/mischief/stable/dir",
|
||||||
|
'(lib "asn1/scribblings/asn1.scrbl")',
|
||||||
|
false))
|
||||||
|
|
||||||
|
console.log(ParseSource("git://github.com/racket/racket/?path=pkgs/racket-doc",
|
||||||
|
'(lib "asn1/scribblings/asn1.scrbl")',
|
||||||
|
false));
|
||||||
|
|
||||||
|
console.log(ParseSource("git://github.com/rmculpepper/asn1.git?path=asn1-doc",
|
||||||
|
'(lib "asn1/scribblings/asn1.scrbl")',
|
||||||
|
true));
|
||||||
|
console.log(ParseSource("git://github.com/rmculpepper/asn1",
|
||||||
|
'(lib "asn1/scribblings/asn1.scrbl")',
|
||||||
|
true));
|
||||||
|
console.log(ParseSource("git://github.com/rmculpepper/asn1",
|
||||||
|
'(lib "asn1/scribblings/asn1.scrbl")',
|
||||||
|
false));
|
||||||
|
}
|
||||||
|
|
||||||
function AddPartTitleOnClick(elem) {
|
function AddPartTitleOnClick(elem) {
|
||||||
var mod_path = elem.getAttribute("x-source-module");
|
var mod_path = elem.getAttribute("x-source-module");
|
||||||
var tag = elem.getAttribute("x-part-tag");
|
var tag = elem.getAttribute("x-part-tag");
|
||||||
|
var source_pkg = elem.getAttribute("x-source-pkg");
|
||||||
|
|
||||||
|
// create here to share
|
||||||
|
var info = document.createElement("div");
|
||||||
|
|
||||||
|
|
||||||
|
// tag is not needed, but this way we can add the element in only one place
|
||||||
|
// avoid failing on browser that don't have `fetch`
|
||||||
|
if (mod_path && source_pkg && tag && window.fetch) {
|
||||||
|
|
||||||
|
var cached = cache[mod_path]
|
||||||
|
if (cached) {
|
||||||
|
AddSourceElement(cached[0], mod_path, cached[1], info);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fetch("https://pkgs.racket-lang.org/pkg/" + source_pkg + ".json")
|
||||||
|
.then(function (response) { return response.json(); })
|
||||||
|
.then(function (data) {
|
||||||
|
var vers = data["versions"] || {};
|
||||||
|
var def = vers["default"] || {};
|
||||||
|
var source = def["source"] || undefined;
|
||||||
|
var collection = data["collection"];
|
||||||
|
if (source) {
|
||||||
|
cache[mod_path] = [source, collection];
|
||||||
|
AddSourceUrl(source, mod_path, collection, info);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mod_path && tag) {
|
if (mod_path && tag) {
|
||||||
// Might not be present:
|
// Might not be present:
|
||||||
var prefixes = elem.getAttribute("x-part-prefixes");
|
var prefixes = elem.getAttribute("x-part-prefixes");
|
||||||
|
|
||||||
var info = document.createElement("div");
|
|
||||||
info.className = "RPartExplain";
|
info.className = "RPartExplain";
|
||||||
|
|
||||||
/* The "top" tag refers to a whole document: */
|
/* The "top" tag refers to a whole document: */
|
||||||
|
@ -42,35 +198,28 @@ function AddPartTitleOnClick(elem) {
|
||||||
var line1x = ((is_long && prefixes) ? document.createElement("div") : line1);
|
var line1x = ((is_long && prefixes) ? document.createElement("div") : line1);
|
||||||
var line2 = (is_long ? document.createElement("div") : line1);
|
var line2 = (is_long ? document.createElement("div") : line1);
|
||||||
|
|
||||||
function add(dest, str, cn) {
|
|
||||||
var s = document.createElement("span");
|
|
||||||
s.className = cn;
|
|
||||||
s.style.whiteSpace = "nowrap";
|
|
||||||
s.appendChild(document.createTextNode(str));
|
|
||||||
dest.appendChild(s);
|
|
||||||
}
|
|
||||||
/* Construct a `secref` call with suitable syntax coloring: */
|
/* Construct a `secref` call with suitable syntax coloring: */
|
||||||
add(line1, "\xA0@", "RktRdr");
|
addSpan(line1, "\xA0@", "RktRdr");
|
||||||
add(line1, (is_top ? "other-doc" : "secref"), "RktSym");
|
addSpan(line1, (is_top ? "other-doc" : "secref"), "RktSym");
|
||||||
add(line1, "[", "RktPn");
|
addSpan(line1, "[", "RktPn");
|
||||||
if (!is_top)
|
if (!is_top)
|
||||||
add(line1, tag, "RktVal");
|
addSpan(line1, tag, "RktVal");
|
||||||
if (is_long) {
|
if (is_long) {
|
||||||
/* indent additional lines: */
|
/* indent additional lines: */
|
||||||
if (prefixes)
|
if (prefixes)
|
||||||
add(line1x, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0", "RktPn");
|
addSpan(line1x, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0", "RktPn");
|
||||||
add(line2, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0", "RktPn");
|
addSpan(line2, "\xA0\xA0\xA0\xA0\xA0\xA0\xA0\xA0", "RktPn");
|
||||||
}
|
}
|
||||||
if (prefixes) {
|
if (prefixes) {
|
||||||
add(line1x, " #:tag-prefixes ", "RktPn");
|
addSpan(line1x, " #:tag-prefixes ", "RktPn");
|
||||||
add(line1x, "'", "RktVal");
|
addSpan(line1x, "'", "RktVal");
|
||||||
add(line1x, prefixes, "RktVal");
|
addSpan(line1x, prefixes, "RktVal");
|
||||||
}
|
}
|
||||||
if (!is_top)
|
if (!is_top)
|
||||||
add(line2, " #:doc ", "RktPn");
|
addSpan(line2, " #:doc ", "RktPn");
|
||||||
add(line2, "'", "RktVal");
|
addSpan(line2, "'", "RktVal");
|
||||||
add(line2, mod_path, "RktVal");
|
addSpan(line2, mod_path, "RktVal");
|
||||||
add(line2, "]", "RktPn");
|
addSpan(line2, "]", "RktPn");
|
||||||
|
|
||||||
info.appendChild(line1);
|
info.appendChild(line1);
|
||||||
if (is_long)
|
if (is_long)
|
||||||
|
|
|
@ -395,6 +395,14 @@ a:hover {
|
||||||
margin: 0em 0em 0em -13em;
|
margin: 0em 0em 0em -13em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media all and (max-width:1340px) {
|
||||||
|
/* avoid disappearing left note if display area is narrow */
|
||||||
|
.refparaleft, .refelemleft {
|
||||||
|
margin: 0em 0em 0em 0em;
|
||||||
|
right: 0em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.refcolumnleft {
|
.refcolumnleft {
|
||||||
background-color: hsl(60, 29%, 94%);
|
background-color: hsl(60, 29%, 94%);
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
@ -425,26 +425,32 @@
|
||||||
[name1 (car (syntax->list #'(name ...)))])
|
[name1 (car (syntax->list #'(name ...)))])
|
||||||
(with-syntax ([(extra ...)
|
(with-syntax ([(extra ...)
|
||||||
(let ([finality
|
(let ([finality
|
||||||
(lambda ()
|
(lambda (prefix)
|
||||||
(case (syntax-e #'mode)
|
(case (syntax-e #'mode)
|
||||||
[(override-final public-final extend-final)
|
[(override-final public-final extend-final)
|
||||||
#'(" This method is final, so it cannot be overiddden.")]
|
#`(#,prefix "This method is final, so it cannot be overridden.")]
|
||||||
[(augment-final)
|
[(augment-final)
|
||||||
#'(" This method is final, so it cannot be augmented.")]
|
#`(#,prefix "This method is final, so it cannot be augmented.")]
|
||||||
[else null]))])
|
[else null]))])
|
||||||
(case (syntax-e #'mode)
|
(case (syntax-e #'mode)
|
||||||
[(pubment)
|
[(pubment)
|
||||||
#'((t "Refine this method with "
|
#'((t "Refine this method with "
|
||||||
(racket augment) "."))]
|
(racket augment) "."))]
|
||||||
[(override override-final extend augment)
|
[(override
|
||||||
#`((t (case (syntax-e #'mode)
|
override-final
|
||||||
[(override override-final) "Overrides "]
|
extend
|
||||||
[(extend extend-final) "Extends "]
|
extend-final
|
||||||
[(augment augment-final) "Augments "])
|
augment
|
||||||
|
augment-final)
|
||||||
|
#`((t #,(case (syntax-e #'mode)
|
||||||
|
[(override override-final) "Overrides "]
|
||||||
|
[(extend extend-final) "Extends "]
|
||||||
|
[(augment augment-final) "Augments "])
|
||||||
(*xmethod/super (quote-syntax/loc cname) 'name1)
|
(*xmethod/super (quote-syntax/loc cname) 'name1)
|
||||||
"."
|
"."
|
||||||
#,@(finality)))]
|
#,@(finality " ")))]
|
||||||
[else null]))])
|
[(public public-final) #`((t #,@(finality "")))]
|
||||||
|
[else (raise-syntax-error #f "unrecognized mode" #'mode)]))])
|
||||||
#'(make-meth '(name ...)
|
#'(make-meth '(name ...)
|
||||||
'mode
|
'mode
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
|
|
@ -124,7 +124,9 @@
|
||||||
(loop (if (dont-stop? mode)
|
(loop (if (dont-stop? mode)
|
||||||
(dont-stop-val mode)
|
(dont-stop-val mode)
|
||||||
mode))))))]
|
mode))))))]
|
||||||
[program-source 'prog]
|
;; use a source that both identifies the original code
|
||||||
|
;; and is unique wrt eq? as used below
|
||||||
|
[program-source (or context bstr)]
|
||||||
[e (parameterize ([read-accept-reader #t])
|
[e (parameterize ([read-accept-reader #t])
|
||||||
((or expand
|
((or expand
|
||||||
(lambda (stx)
|
(lambda (stx)
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
"../basic.rkt"
|
"../basic.rkt"
|
||||||
"../manual-struct.rkt"
|
"../manual-struct.rkt"
|
||||||
(only-in "../core.rkt"
|
(only-in "../core.rkt"
|
||||||
make-style make-table-columns)
|
make-style
|
||||||
|
make-table-columns
|
||||||
|
content?)
|
||||||
"../html-properties.rkt"
|
"../html-properties.rkt"
|
||||||
"qsloc.rkt"
|
"qsloc.rkt"
|
||||||
"manual-utils.rkt"
|
"manual-utils.rkt"
|
||||||
|
@ -17,6 +19,7 @@
|
||||||
"on-demand.rkt"
|
"on-demand.rkt"
|
||||||
scheme/string
|
scheme/string
|
||||||
scheme/list
|
scheme/list
|
||||||
|
racket/contract
|
||||||
(for-syntax racket/base
|
(for-syntax racket/base
|
||||||
syntax/parse)
|
syntax/parse)
|
||||||
(for-label racket/base
|
(for-label racket/base
|
||||||
|
@ -126,10 +129,12 @@
|
||||||
[(_ v) #'(racketblock0 v)]))
|
[(_ v) #'(racketblock0 v)]))
|
||||||
|
|
||||||
(begin-for-syntax
|
(begin-for-syntax
|
||||||
(define-splicing-syntax-class kind-kw
|
(define-splicing-syntax-class kind-kw
|
||||||
#:description "#:kind keyword"
|
#:attributes (kind) ;; Expr[String/#f]
|
||||||
(pattern (~optional (~seq #:kind kind)
|
#:description "#:kind keyword"
|
||||||
#:defaults ([kind #'#f]))))
|
(pattern (~optional (~seq #:kind k))
|
||||||
|
#:declare k (expr/c #'(or/c content? #f) #:name "#:kind argument")
|
||||||
|
#:with kind #'(~? k.c #f)))
|
||||||
|
|
||||||
(define-splicing-syntax-class value-kw
|
(define-splicing-syntax-class value-kw
|
||||||
#:description "#:value keyword"
|
#:description "#:value keyword"
|
||||||
|
@ -233,7 +238,7 @@
|
||||||
[(eq? (arg-id arg) '_...superclass-args...) (to-element (arg-id arg))]
|
[(eq? (arg-id arg) '_...superclass-args...) (to-element (arg-id arg))]
|
||||||
[else (to-element (make-var-id (arg-id arg)))])]
|
[else (to-element (make-var-id (arg-id arg)))])]
|
||||||
[e (if (arg-ends-optional? arg)
|
[e (if (arg-ends-optional? arg)
|
||||||
(make-element #f (list e "]"))
|
(make-element #f (list e (racketoptionalfont "]")))
|
||||||
e)]
|
e)]
|
||||||
[num-closers (- (arg-depth arg) next-depth)]
|
[num-closers (- (arg-depth arg) next-depth)]
|
||||||
[e (if (zero? num-closers)
|
[e (if (zero? num-closers)
|
||||||
|
@ -241,7 +246,7 @@
|
||||||
(make-element
|
(make-element
|
||||||
#f (list e (make-closers num-closers))))])
|
#f (list e (make-closers num-closers))))])
|
||||||
(if (and show-opt-start? (arg-starts-optional? arg))
|
(if (and show-opt-start? (arg-starts-optional? arg))
|
||||||
(make-element #f (list "[" e))
|
(make-element #f (list (racketoptionalfont "[") e))
|
||||||
e)))
|
e)))
|
||||||
(define (prototype-depth p)
|
(define (prototype-depth p)
|
||||||
(let loop ([p (car p)])
|
(let loop ([p (car p)])
|
||||||
|
@ -511,7 +516,7 @@
|
||||||
(if one-ok?
|
(if one-ok?
|
||||||
(list*
|
(list*
|
||||||
(if (arg-starts-optional? (car args))
|
(if (arg-starts-optional? (car args))
|
||||||
(to-flow (make-element #f (list spacer "[")))
|
(to-flow (make-element #f (list spacer (racketoptionalfont "["))))
|
||||||
flow-spacer)
|
flow-spacer)
|
||||||
(to-flow ((arg->elem #f) (car args) (next-args-depth (cdr args))))
|
(to-flow ((arg->elem #f) (car args) (next-args-depth (cdr args))))
|
||||||
not-end)
|
not-end)
|
||||||
|
@ -530,7 +535,7 @@
|
||||||
(flow-spacer/n 3)
|
(flow-spacer/n 3)
|
||||||
flow-spacer)
|
flow-spacer)
|
||||||
(if (arg-starts-optional? (car args))
|
(if (arg-starts-optional? (car args))
|
||||||
(to-flow (make-element #f (list spacer "[")))
|
(to-flow (make-element #f (list spacer (racketoptionalfont "["))))
|
||||||
flow-spacer)
|
flow-spacer)
|
||||||
(let ([a ((arg->elem #f) (car args) (next-args-depth (cdr args)))]
|
(let ([a ((arg->elem #f) (car args) (next-args-depth (cdr args)))]
|
||||||
[next (if dots-next?
|
[next (if dots-next?
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
(provide/contract [id styling-f/c] ...))
|
(provide/contract [id styling-f/c] ...))
|
||||||
(provide-styling racketmodfont racketoutput
|
(provide-styling racketmodfont racketoutput
|
||||||
racketerror racketfont racketplainfont racketvalfont racketidfont racketvarfont
|
racketerror racketfont racketplainfont racketvalfont racketidfont racketvarfont
|
||||||
racketcommentfont racketparenfont racketkeywordfont racketmetafont
|
racketcommentfont racketparenfont racketoptionalfont racketkeywordfont racketmetafont
|
||||||
onscreen defterm filepath envvar Flag DFlag PFlag DPFlag math
|
onscreen defterm filepath envvar Flag DFlag PFlag DPFlag math
|
||||||
procedure
|
procedure
|
||||||
indexed-file indexed-envvar idefterm pidefterm)
|
indexed-file indexed-envvar idefterm pidefterm)
|
||||||
|
@ -47,6 +47,7 @@
|
||||||
[racketidfont schemeidfont]
|
[racketidfont schemeidfont]
|
||||||
[racketvarfont schemevarfont]
|
[racketvarfont schemevarfont]
|
||||||
[racketparenfont schemeparenfont]
|
[racketparenfont schemeparenfont]
|
||||||
|
[racketoptionalfont schemeoptionalfont]
|
||||||
[racketkeywordfont schemekeywordfont]
|
[racketkeywordfont schemekeywordfont]
|
||||||
[racketmetafont schememetafont])
|
[racketmetafont schememetafont])
|
||||||
|
|
||||||
|
@ -104,6 +105,8 @@
|
||||||
(make-element variable-color (decode-content str)))
|
(make-element variable-color (decode-content str)))
|
||||||
(define (racketparenfont . str)
|
(define (racketparenfont . str)
|
||||||
(make-element paren-color (decode-content str)))
|
(make-element paren-color (decode-content str)))
|
||||||
|
(define (racketoptionalfont . str)
|
||||||
|
(make-element opt-color (decode-content str)))
|
||||||
(define (racketmetafont . str)
|
(define (racketmetafont . str)
|
||||||
(make-element meta-color (decode-content str)))
|
(make-element meta-color (decode-content str)))
|
||||||
(define (racketcommentfont . str)
|
(define (racketcommentfont . str)
|
||||||
|
|
|
@ -70,6 +70,7 @@
|
||||||
|
|
||||||
.RktOpt {
|
.RktOpt {
|
||||||
color: black;
|
color: black;
|
||||||
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.RktKw {
|
.RktKw {
|
||||||
|
|
|
@ -677,9 +677,7 @@
|
||||||
quote-depth)]
|
quote-depth)]
|
||||||
[p-color (if (positive? quote-depth)
|
[p-color (if (positive? quote-depth)
|
||||||
value-color
|
value-color
|
||||||
(if (eq? sh #\?)
|
paren-color)])
|
||||||
opt-color
|
|
||||||
paren-color))])
|
|
||||||
(advance c init-line! srcless-step)
|
(advance c init-line! srcless-step)
|
||||||
(let ([quote-depth (if (struct-proxy? (syntax-e c))
|
(let ([quote-depth (if (struct-proxy? (syntax-e c))
|
||||||
quote-depth
|
quote-depth
|
||||||
|
@ -726,7 +724,7 @@
|
||||||
(set! src-col (+ src-col 2))))
|
(set! src-col (+ src-col 2))))
|
||||||
(unless (and expr? (zero? quote-depth))
|
(unless (and expr? (zero? quote-depth))
|
||||||
(out (case sh
|
(out (case sh
|
||||||
[(#\[ #\?) "["]
|
[(#\[) "["]
|
||||||
[(#\{) "{"]
|
[(#\{) "{"]
|
||||||
[else "("])
|
[else "("])
|
||||||
p-color))
|
p-color))
|
||||||
|
@ -765,9 +763,9 @@
|
||||||
(syntax-e c)]
|
(syntax-e c)]
|
||||||
[(mpair? (syntax-e c))
|
[(mpair? (syntax-e c))
|
||||||
(syntax-e c)]
|
(syntax-e c)]
|
||||||
[else c]))
|
[else c]))
|
||||||
(out (case sh
|
(out (case sh
|
||||||
[(#\[ #\?) "]"]
|
[(#\[) "]"]
|
||||||
[(#\{) "}"]
|
[(#\{) "}"]
|
||||||
[else ")"])
|
[else ")"])
|
||||||
p-color)
|
p-color)
|
||||||
|
@ -805,7 +803,7 @@
|
||||||
[orig-col src-col])
|
[orig-col src-col])
|
||||||
(set! src-col (+ src-col delta))
|
(set! src-col (+ src-col delta))
|
||||||
(hash-set! next-col-map src-col dest-col)
|
(hash-set! next-col-map src-col dest-col)
|
||||||
((loop init-line! (if expr? quote-depth +inf.0) expr? (and expr? (zero? quote-depth)))
|
((loop init-line! quote-depth expr? (and expr? (zero? quote-depth)))
|
||||||
(let*-values ([(l) (sort (hash-map (syntax-e c) cons)
|
(let*-values ([(l) (sort (hash-map (syntax-e c) cons)
|
||||||
(lambda (a b)
|
(lambda (a b)
|
||||||
(< (or (syntax-position (cdr a)) -inf.0)
|
(< (or (syntax-position (cdr a)) -inf.0)
|
||||||
|
|
|
@ -3,11 +3,23 @@
|
||||||
\newcommand{\packageHyperref}{\usepackage{hyperref}}
|
\newcommand{\packageHyperref}{\usepackage{hyperref}}
|
||||||
\newcommand{\renewrmdefault}{\renewcommand{\rmdefault}{ptm}}
|
\newcommand{\renewrmdefault}{\renewcommand{\rmdefault}{ptm}}
|
||||||
\newcommand{\packageRelsize}{\usepackage{relsize}}
|
\newcommand{\packageRelsize}{\usepackage{relsize}}
|
||||||
|
% amsmath is required for the combination of {mathabx,
|
||||||
|
% wasysym, newtxmath} to work. Otherwise, newtxmath
|
||||||
|
% would load amsmath *after* mathabx and wasysym,
|
||||||
|
% causing command redefinition issues.
|
||||||
|
\newcommand{\packageAmsmath}{\usepackage{amsmath}}
|
||||||
\newcommand{\packageMathabx}{\usepackage{mathabx}}
|
\newcommand{\packageMathabx}{\usepackage{mathabx}}
|
||||||
% Avoid conflicts between "mathabx" and "wasysym":
|
% Avoid conflicts between "mathabx" and "wasysym",
|
||||||
|
% and between "wasysym" integrals and "amsmath" integrals (iint).
|
||||||
\newcommand{\packageWasysym}{
|
\newcommand{\packageWasysym}{
|
||||||
\let\leftmoon\relax \let\rightmoon\relax \let\fullmoon\relax \let\newmoon\relax \let\diameter\relax
|
\let\leftmoon\relax \let\rightmoon\relax \let\fullmoon\relax \let\newmoon\relax \let\diameter\relax
|
||||||
\usepackage{wasysym}}
|
\usepackage[nointegrals]{wasysym}}
|
||||||
|
% Both newtxmath and mathabx define the \widering command.
|
||||||
|
% The only reason we choose the newtxmath version is that
|
||||||
|
% acmart.cls is also using the one from newtxmath.
|
||||||
|
\newcommand{\packageTxfonts}{
|
||||||
|
\let\widering\relax
|
||||||
|
\usepackage{newtxmath}}
|
||||||
\newcommand{\packageTextcomp}{\usepackage{textcomp}}
|
\newcommand{\packageTextcomp}{\usepackage{textcomp}}
|
||||||
\newcommand{\packageFramed}{\usepackage{framed}}
|
\newcommand{\packageFramed}{\usepackage{framed}}
|
||||||
\newcommand{\packageHyphenat}{\usepackage[htt]{hyphenat}}
|
\newcommand{\packageHyphenat}{\usepackage[htt]{hyphenat}}
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
\packageHyperref
|
\packageHyperref
|
||||||
\renewrmdefault
|
\renewrmdefault
|
||||||
\packageRelsize
|
\packageRelsize
|
||||||
|
\packageAmsmath
|
||||||
\packageMathabx
|
\packageMathabx
|
||||||
\packageWasysym
|
\packageWasysym
|
||||||
|
\packageTxfonts
|
||||||
\packageTextcomp
|
\packageTextcomp
|
||||||
\packageFramed
|
\packageFramed
|
||||||
\packageHyphenat
|
\packageHyphenat
|
||||||
|
|
|
@ -43,6 +43,8 @@
|
||||||
|
|
||||||
(define (load-xref sources
|
(define (load-xref sources
|
||||||
#:demand-source [demand-source (lambda (key) #f)]
|
#:demand-source [demand-source (lambda (key) #f)]
|
||||||
|
#:demand-source-for-use [demand-source-for-use
|
||||||
|
(lambda (key use-id) (demand-source key))]
|
||||||
#:render% [render% (html:render-mixin render%)]
|
#:render% [render% (html:render-mixin render%)]
|
||||||
#:root [root-path #f]
|
#:root [root-path #f]
|
||||||
#:doc-id [doc-id-str #f])
|
#:doc-id [doc-id-str #f])
|
||||||
|
@ -61,9 +63,15 @@
|
||||||
(send renderer deserialize-info data ci
|
(send renderer deserialize-info data ci
|
||||||
#:root root
|
#:root root
|
||||||
#:doc-id doc-id))))))]
|
#:doc-id doc-id))))))]
|
||||||
|
[use-ids (make-weak-hasheq)]
|
||||||
[ci (send renderer collect null null fp
|
[ci (send renderer collect null null fp
|
||||||
(lambda (key ci)
|
(lambda (key ci)
|
||||||
(define src (demand-source key))
|
(define use-obj (collect-info-ext-ht ci))
|
||||||
|
(define use-id (or (hash-ref use-ids use-obj #f)
|
||||||
|
(let ([s (gensym 'render)])
|
||||||
|
(hash-set! use-ids use-obj s)
|
||||||
|
s)))
|
||||||
|
(define src (demand-source-for-use key use-id))
|
||||||
(and src
|
(and src
|
||||||
(load-source src ci))))])
|
(load-source src ci))))])
|
||||||
(for ([src sources])
|
(for ([src sources])
|
||||||
|
|
|
@ -159,7 +159,7 @@
|
||||||
(values (hash-update h k (lambda (cur) (cons b cur)) null)
|
(values (hash-update h k (lambda (cur) (cons b cur)) null)
|
||||||
(cons k (remove k ks))))))
|
(cons k (remove k ks))))))
|
||||||
(make-element
|
(make-element
|
||||||
(make-style "Autobibref" '())
|
(make-style "Autobibref" autobib-style-extras)
|
||||||
(append
|
(append
|
||||||
(list 'nbsp (send style get-cite-open))
|
(list 'nbsp (send style get-cite-open))
|
||||||
(add-between
|
(add-between
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
(match (read-until (λ (c) (or (char=? c #\{)
|
(match (read-until (λ (c) (or (char=? c #\{)
|
||||||
(char=? c #\()))
|
(char=? c #\()))
|
||||||
ip)
|
ip)
|
||||||
[(app string-downcase "string")
|
[(app string-foldcase "string")
|
||||||
(slurp-whitespace ip)
|
(slurp-whitespace ip)
|
||||||
(match (read-char ip)
|
(match (read-char ip)
|
||||||
[#\{
|
[#\{
|
||||||
|
@ -70,8 +70,8 @@
|
||||||
(perror ip 'read-entry "Parsing string, expected }, got ~v; tag is ~v; string is ~v" c tag string)])]
|
(perror ip 'read-entry "Parsing string, expected }, got ~v; tag is ~v; string is ~v" c tag string)])]
|
||||||
[c
|
[c
|
||||||
(perror ip 'read-entry "Parsing string, expected =, got ~v; tag is ~v" c tag)])]
|
(perror ip 'read-entry "Parsing string, expected =, got ~v; tag is ~v" c tag)])]
|
||||||
[(or (app string-downcase "comment")
|
[(or (app string-foldcase "comment")
|
||||||
(app string-downcase "preamble"))
|
(app string-foldcase "preamble"))
|
||||||
(read-char ip)
|
(read-char ip)
|
||||||
(let loop ()
|
(let loop ()
|
||||||
(read-until (λ (c) (or (char=? c #\{) (char=? c #\}))) ip)
|
(read-until (λ (c) (or (char=? c #\{) (char=? c #\}))) ip)
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
[typ
|
[typ
|
||||||
(read-char ip)
|
(read-char ip)
|
||||||
(slurp-whitespace ip)
|
(slurp-whitespace ip)
|
||||||
(define label (read-until (λ (c) (char=? c #\,)) ip))
|
(define label (string-foldcase (read-until (λ (c) (char=? c #\,)) ip)))
|
||||||
(read-char ip)
|
(read-char ip)
|
||||||
(define alist
|
(define alist
|
||||||
(let loop ()
|
(let loop ()
|
||||||
|
@ -110,11 +110,11 @@
|
||||||
[c
|
[c
|
||||||
(perror ip 'read-entry "Parsing entry tag, expected =, got ~v; label is ~v; atag is ~v" c label atag)])])))
|
(perror ip 'read-entry "Parsing entry tag, expected =, got ~v; label is ~v; atag is ~v" c label atag)])])))
|
||||||
(hash-set! ENTRY-DB label
|
(hash-set! ENTRY-DB label
|
||||||
(hash-set alist 'type typ))]))
|
(hash-set alist 'type (string-foldcase typ)))]))
|
||||||
|
|
||||||
(define (read-tag ip)
|
(define (read-tag ip)
|
||||||
(slurp-whitespace ip)
|
(slurp-whitespace ip)
|
||||||
(string-downcase
|
(string-foldcase
|
||||||
(read-until
|
(read-until
|
||||||
(λ (c) (or (char-whitespace? c)
|
(λ (c) (or (char-whitespace? c)
|
||||||
(char=? c #\=)
|
(char=? c #\=)
|
||||||
|
@ -197,22 +197,45 @@
|
||||||
autobib-cite autobib-citet
|
autobib-cite autobib-citet
|
||||||
~cite-id citet-id)))
|
~cite-id citet-id)))
|
||||||
|
|
||||||
|
(define ((make-citer bibtex-db citer) f . r)
|
||||||
|
(apply citer
|
||||||
|
(filter-map
|
||||||
|
(λ (key)
|
||||||
|
(and (not (string=? "\n" key))
|
||||||
|
(generate-bib bibtex-db key)))
|
||||||
|
(append-map (curry regexp-split #px"\\s+")
|
||||||
|
(cons f r)))))
|
||||||
|
|
||||||
(define-syntax-rule
|
(define-syntax-rule
|
||||||
(define-bibtex-cite* bib-pth
|
(define-bibtex-cite* bib-pth
|
||||||
autobib-cite autobib-citet
|
autobib-cite autobib-citet
|
||||||
~cite-id citet-id)
|
~cite-id citet-id)
|
||||||
(begin
|
(begin
|
||||||
(define bibtex-db (path->bibdb bib-pth))
|
(define bibtex-db (path->bibdb bib-pth))
|
||||||
(define ((make-citer citer) f . r)
|
(define ~cite-id (make-citer bibtex-db autobib-cite))
|
||||||
(apply citer
|
(define citet-id (make-citer bibtex-db autobib-citet))))
|
||||||
(filter-map
|
|
||||||
(λ (key)
|
;; Seems a little redundant to convert latex escapes into unicode only to
|
||||||
(and (not (string=? "\n" key))
|
;; convert them back into latex, but we need to sort authors so we can't
|
||||||
(generate-bib bibtex-db key)))
|
;; leave them as literal-chars.
|
||||||
(append-map (curry regexp-split #px"\\s+")
|
(define (latex-to-unicode str)
|
||||||
(cons f r)))))
|
; This is probably defined somewhere...
|
||||||
(define ~cite-id (make-citer autobib-cite))
|
; NOTE: Incomplete. Please file PR if you need more.
|
||||||
(define citet-id (make-citer autobib-citet))))
|
(define converts
|
||||||
|
'(("\\'\\i" . "ı́")
|
||||||
|
("\\\"u" . "ü")
|
||||||
|
("\\\"o" . "ö")
|
||||||
|
("\\\"i" . "ï")
|
||||||
|
("\\'i" . "í")
|
||||||
|
("\\i" . "ı")
|
||||||
|
("\\'a" . "á")
|
||||||
|
("\\'A" . "Á")
|
||||||
|
("\\~a" . "ã")
|
||||||
|
("\\`a" . "À")
|
||||||
|
("\\~A" . "Ã")))
|
||||||
|
(for/fold ([str str])
|
||||||
|
([p converts])
|
||||||
|
(string-replace str (car p) (cdr p))))
|
||||||
|
|
||||||
(define (parse-author as)
|
(define (parse-author as)
|
||||||
(and as
|
(and as
|
||||||
|
@ -220,7 +243,7 @@
|
||||||
(for/list ([a (in-list (regexp-split #px"\\s+and\\s+" as))])
|
(for/list ([a (in-list (regexp-split #px"\\s+and\\s+" as))])
|
||||||
(define (trim s)
|
(define (trim s)
|
||||||
(string-trim (regexp-replace #px"\\s+" s " ")))
|
(string-trim (regexp-replace #px"\\s+" s " ")))
|
||||||
(match a
|
(match (latex-to-unicode a)
|
||||||
[(pregexp #px"^(.*),(.*),(.*)$" (list _ two suffix one))
|
[(pregexp #px"^(.*),(.*),(.*)$" (list _ two suffix one))
|
||||||
(author-name (trim one) (trim two) #:suffix (trim suffix))]
|
(author-name (trim one) (trim two) #:suffix (trim suffix))]
|
||||||
[(pregexp #px"^(.*),(.*)$" (list _ two one))
|
[(pregexp #px"^(.*),(.*)$" (list _ two one))
|
||||||
|
@ -422,11 +445,15 @@
|
||||||
[_
|
[_
|
||||||
(error 'parse-pages "Invalid page format ~e" ps)]))
|
(error 'parse-pages "Invalid page format ~e" ps)]))
|
||||||
|
|
||||||
|
(require scribble/core)
|
||||||
|
(define (support-escapes s)
|
||||||
|
(elem #:style (make-style #f '(exact-chars)) s))
|
||||||
|
|
||||||
(define (generate-bib db key)
|
(define (generate-bib db key)
|
||||||
(match-define (bibdb raw bibs) db)
|
(match-define (bibdb raw bibs) db)
|
||||||
(hash-ref! bibs key
|
(hash-ref! bibs (string-foldcase key)
|
||||||
(λ ()
|
(λ ()
|
||||||
(define the-raw (hash-ref raw key (λ () (error 'bibtex "Unknown citation ~e" key))))
|
(define the-raw (hash-ref raw (string-foldcase key) (λ () (error 'bibtex "Unknown citation ~e" key))))
|
||||||
(define (raw-attr a [def #f])
|
(define (raw-attr a [def #f])
|
||||||
(hash-ref the-raw a def))
|
(hash-ref the-raw a def))
|
||||||
(define (raw-attr* a)
|
(define (raw-attr* a)
|
||||||
|
@ -435,18 +462,18 @@
|
||||||
key a the-raw))))
|
key a the-raw))))
|
||||||
(match (raw-attr 'type)
|
(match (raw-attr 'type)
|
||||||
["misc"
|
["misc"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (support-escapes (raw-attr "title"))
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
#:date (raw-attr "year")
|
#:date (raw-attr "year")
|
||||||
#:url (raw-attr "url"))]
|
#:url (raw-attr "url"))]
|
||||||
["book"
|
["book"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (support-escapes (raw-attr "title"))
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
#:date (raw-attr "year")
|
#:date (raw-attr "year")
|
||||||
#:is-book? #t
|
#:is-book? #t
|
||||||
#:url (raw-attr "url"))]
|
#:url (raw-attr "url"))]
|
||||||
["article"
|
["article"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (support-escapes (raw-attr "title"))
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
#:date (raw-attr "year")
|
#:date (raw-attr "year")
|
||||||
#:location (journal-location (raw-attr* "journal")
|
#:location (journal-location (raw-attr* "journal")
|
||||||
|
@ -455,31 +482,31 @@
|
||||||
#:volume (raw-attr "volume"))
|
#:volume (raw-attr "volume"))
|
||||||
#:url (raw-attr "url"))]
|
#:url (raw-attr "url"))]
|
||||||
["inproceedings"
|
["inproceedings"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (support-escapes (raw-attr "title"))
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
#:date (raw-attr "year")
|
#:date (raw-attr "year")
|
||||||
#:location (proceedings-location (raw-attr "booktitle"))
|
#:location (proceedings-location (raw-attr "booktitle"))
|
||||||
#:url (raw-attr "url"))]
|
#:url (raw-attr "url"))]
|
||||||
["webpage"
|
["webpage"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (support-escapes (raw-attr "title"))
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
#:date (raw-attr "year")
|
#:date (raw-attr "year")
|
||||||
#:url (raw-attr "url"))]
|
#:url (raw-attr "url"))]
|
||||||
["mastersthesis"
|
["mastersthesis"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (support-escapes (raw-attr "title"))
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
#:date (raw-attr "year")
|
#:date (raw-attr "year")
|
||||||
#:location (raw-attr "school")
|
#:location (raw-attr "school")
|
||||||
#:url (raw-attr "url"))]
|
#:url (raw-attr "url"))]
|
||||||
["phdthesis"
|
["phdthesis"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (support-escapes (raw-attr "title"))
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
#:date (raw-attr "year")
|
#:date (raw-attr "year")
|
||||||
#:location (dissertation-location #:institution (raw-attr "school")
|
#:location (dissertation-location #:institution (raw-attr "school")
|
||||||
#:degree "PhD")
|
#:degree "PhD")
|
||||||
#:url (raw-attr "url"))]
|
#:url (raw-attr "url"))]
|
||||||
["techreport"
|
["techreport"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (support-escapes (raw-attr "title"))
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
#:date (raw-attr "year")
|
#:date (raw-attr "year")
|
||||||
#:location
|
#:location
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
|
|
||||||
(provide docs-tests)
|
(provide docs-tests)
|
||||||
(module+ main (docs-tests))
|
(module+ main (docs-tests))
|
||||||
|
(module+ test (docs-tests))
|
||||||
(define (docs-tests)
|
(define (docs-tests)
|
||||||
(when (or (file-exists? work-dir) (directory-exists? work-dir))
|
(when (or (file-exists? work-dir) (directory-exists? work-dir))
|
||||||
(delete-directory/files work-dir))
|
(delete-directory/files work-dir))
|
||||||
|
|
197
scribble-test/tests/scribble/docs/gif.scrbl
Normal file
197
scribble-test/tests/scribble/docs/gif.scrbl
Normal file
|
@ -0,0 +1,197 @@
|
||||||
|
#lang scribble/manual
|
||||||
|
|
||||||
|
@(define bytes
|
||||||
|
(bytes-append
|
||||||
|
#"GIF89a\330\0<\0\367\0\0\0\0\0\0\0\0\1"
|
||||||
|
#"\1\1\2\2\2\3\3\3\4\4\4\5\5\5\6\6\6\a\a\a"
|
||||||
|
#"\b\b\b\t\t\t\n\n\n\v\v\v\f\f\f\r\r\r\16\16"
|
||||||
|
#"\16\17\17\17\20\20\20\21\21\21\22\22\22\23\23\23\24\24\24\25"
|
||||||
|
#"\25\25\26\26\26\27\27\27\30\30\30\31\31\31\32\32\32\e\e\e"
|
||||||
|
#"\34\34\34\35\35\35\36\36\36\37\37\37 !!!\"\""
|
||||||
|
#"\"###$$$%%%&&&'''((()"
|
||||||
|
#"))***+++,,,---...///"
|
||||||
|
#"00011122233344455566"
|
||||||
|
#"6777888999:::;;;<<<="
|
||||||
|
#"==>>>???@@@AAABBBCCC"
|
||||||
|
#"DDDEEEFFFGGGHHHIIIJJ"
|
||||||
|
#"JKKKLLLMMMNNNOOOPPPQ"
|
||||||
|
#"QQRRRSSSTTTUUUVVVXXX"
|
||||||
|
#"YYYZZZ[[[\\\\\\]]]^^^__"
|
||||||
|
#"_```aaabbbcccdddeeef"
|
||||||
|
#"ffggghhhiiijjjkkklll"
|
||||||
|
#"mmmnnnpppqqqrrrssstt"
|
||||||
|
#"tuuuvvvwwwxxxyyyzzz{"
|
||||||
|
#"{{|||}}}~~~\177\177\177\200\200\200\201\201\201"
|
||||||
|
#"\202\202\202\203\203\203\204\204\204\205\205\205\206\206\206\207\207\207\210\210"
|
||||||
|
#"\210\211\211\211\212\212\212\213\213\213\214\214\214\215\215\215\216\216\216\217"
|
||||||
|
#"\217\217\220\220\220\221\221\221\222\222\222\223\223\223\224\224\224\225\225\225"
|
||||||
|
#"\226\226\226\227\227\227\230\230\230\231\231\231\232\232\232\233\233\233\234\234"
|
||||||
|
#"\234\235\235\235\236\236\236\237\237\237\240\240\240\241\241\241\242\242\242\243"
|
||||||
|
#"\243\243\244\244\244\245\245\245\246\246\246\247\247\247\250\250\250\251\251\251"
|
||||||
|
#"\252\252\252\253\253\253\254\254\254\255\255\255\256\256\256\257\257\257\260\260"
|
||||||
|
#"\260\261\261\261\262\262\262\263\263\263\264\264\264\265\265\265\266\266\266\267"
|
||||||
|
#"\267\267\270\270\270\271\271\271\272\272\272\273\273\273\274\274\274\275\275\275"
|
||||||
|
#"\276\276\276\277\277\277\300\300\300\301\301\301\302\302\302\303\303\303\304\304"
|
||||||
|
#"\304\305\305\305\306\306\306\307\307\307\310\310\310\311\311\311\312\312\312\313"
|
||||||
|
#"\313\313\314\314\314\315\315\315\316\316\316\317\317\317\320\320\320\321\321\321"
|
||||||
|
#"\322\322\322\323\323\323\324\324\324\325\325\325\326\326\326\327\327\327\330\330"
|
||||||
|
#"\330\331\331\331\332\332\332\333\333\333\334\334\334\335\335\335\336\336\336\337"
|
||||||
|
#"\337\337\340\340\340\341\341\341\342\342\342\343\343\343\344\344\344\345\345\345"
|
||||||
|
#"\346\346\346\347\347\347\350\350\350\351\351\351\352\352\352\353\353\353\354\354"
|
||||||
|
#"\354\355\355\355\356\356\356\357\357\357\360\360\360\361\361\361\362\362\362\363"
|
||||||
|
#"\363\363\364\364\364\365\365\365\366\366\366\367\367\367\370\370\370\371\371\371"
|
||||||
|
#"\372\372\372\373\373\373\374\374\374\375\375\375\376\376\376\377\377\377\0\0"
|
||||||
|
#"\0!\371\4\5\n\0\0\0,\0\0\0\0\330\0<\0\0\b"
|
||||||
|
#"\377\0\375\t\34H\260\240\301\203\b\23*\\\310\260\241\303\207\20"
|
||||||
|
#"#J\234H\261\242\305\213\0303j\334\310\261\243\307\217 C\212"
|
||||||
|
#"\34I\262\244\311\223(S\252\\\311\262\245\313\2270c\312\234I"
|
||||||
|
#"\263\246\315\2338s\352\334\311\263\247\317\237@\203\n\35J\264\250"
|
||||||
|
#"\321\243H\223*]\312\264\251\323\247P\243J\235J\265\252\325\253"
|
||||||
|
#"X\263j\305\bO\35=~\r\371\321[7o\253\331\205\364\372"
|
||||||
|
#"\204\20Q\202\205\f\34=~\4\231\v\244G\16\32-L\260\335"
|
||||||
|
#"t\266\357AoZ\2\4\0\321\244L\e+ \f(\316\340\344"
|
||||||
|
#"\f\26\30\v\2\b\30\224\317/Ku\260\214\351\v\253\314\24,"
|
||||||
|
#"]\274d\215\252dHO\257~\30\213\31\211\20\a\332\271u\354"
|
||||||
|
#"\316\1\252\20\200\200\34o\353\322\201#\205#\200\35w\226Sb"
|
||||||
|
#"\363C\243G)z\r\335\311\261p!C\6\f\25&D\30\1"
|
||||||
|
#"*c\253\32l\276\355#\b\213F\0\16\236P\v\377\2547\352"
|
||||||
|
#"\205\232q\301M\306\273D#F\237f\361\304/\354\246\245\301\5"
|
||||||
|
#"\6\2\4\a8\0DW\306JG\250\2\26A\300\4\21@\n"
|
||||||
|
#"\253\24d\216\30^`\223\36I\350\374\341A\20\257\274\263\235C"
|
||||||
|
#"\3150\321D.\334T\303\3142\324lSN=\31y\263\214:"
|
||||||
|
#"\6\21SD\0/\300R\20?\336x\203\317\203\"q\323\206\5"
|
||||||
|
#"L\364bOD\274\370P\3067\376\364\303\317>\362e\264\217>"
|
||||||
|
#"\3\22\244\32\213.\276\b\2268\274\314bK.\271\330\"\3130"
|
||||||
|
#"(\2563\214,S\352\222K-\273\210\343\3178\275H\231\213."
|
||||||
|
#"\273\244\251&-\275\230sP?\352\24\323I \215\310\242\315\216"
|
||||||
|
#"\5\221i\246-\257\230\2\312)\270L#\217Azv\251\346\232"
|
||||||
|
#"m\16\324\315-\260H\371\314\240\a\2253L-\262\274\242L<"
|
||||||
|
#"\16y\223\306\3>\3242cD\253\300@G;*-\331bB"
|
||||||
|
#"\267<\361\201s\317\211\20\3062\3768\377S\306\b\30\260\372\1"
|
||||||
|
#"\22\270\370\263\313\24 \260\312\301\n7\3100\202\6\30\370@\213"
|
||||||
|
#"A\341\4\22\303\vU\210QD\t!p1\314f\3\355\332\353"
|
||||||
|
#"s\e\314\220\4\20'L\270\t\212\325\362\352+\260\302\22k\354"
|
||||||
|
#"@\255\30\361A\255G\354r\320>\212\320\212\1\txt\323\20"
|
||||||
|
#"=\205X\220\201$$J\264\311\b\204P\213\222\251M\0364\317"
|
||||||
|
#"8\242\324 X\22\264\230\263\343=\347\354\242\204`1x\22\16"
|
||||||
|
#"r\364\220cJo\3\254!\r8\337d\223\312\20\34pBP"
|
||||||
|
#">\263 \201\201\27\301\224\203\3168\274L\21\1\n\204\240'P"
|
||||||
|
#"\306\e\v&F3\343\210\23\214\24\tx\360\b\244\376\340\314\261"
|
||||||
|
#"\307 \213L\262\311\2\311#N\37\26\4\320@#\225\25\24\215"
|
||||||
|
#"\24\371\0311\213:U/\4K\r\3\224\341\rE\212\204@\311"
|
||||||
|
#"J\4/\264N\31\1\24@\310=\5\345\363\207\3\1\240\21N"
|
||||||
|
#"A\360\244\21\0\3\220\f\377\330\217=\262\0\241H\222\270\b\261"
|
||||||
|
#"@\32\332t\235\0176f8\200\1#\230\16\224w\0\b,r"
|
||||||
|
#"\241>\237\2400\300\24\315\340\2557\337~\3.x\222\376X2"
|
||||||
|
#"B\1\0024h\20&8D\35\0067\16\265\343\306\1\36xr"
|
||||||
|
#"\241Dzd\360E\36Z@1\6#\312\340)R\332\n\355#"
|
||||||
|
#"\207\324\223\34\364\310\5\1\334\361NA\375\3301@\3\311\23\24"
|
||||||
|
#"\217\34\202@\352\315\30\b\344`\v\351\376\354\3\314\20\2\264\260"
|
||||||
|
#"J\222\321O/\tA\271\360\20@\r\265@/=\365\5]\237"
|
||||||
|
#"=A\212,\21C\0-\270\222\347\31`hB\0\270p\r\207"
|
||||||
|
#"\330\"\a\1\270\201\34\3120\4\"x!\20\303\20\236B\344\301"
|
||||||
|
#"\6\0024@\2\22h\300\2$p\202@\210ixF`\22C"
|
||||||
|
#"\354 \0\t\\\342 \223\330@\0\370P\226\202\354\301\0\364\273"
|
||||||
|
#"\31;\354\1\e\260\364\343\21\31(\300\36\236g\20{\20\202\2"
|
||||||
|
#"\5\370B\1\377\a\362\302\30\n\344\26\b\344\201\273\\\b\303\352"
|
||||||
|
#"\25m\2065$\210\36\304\340\206\r\34 \20-\24\b+\302\240"
|
||||||
|
#"\t0\4`\n\316p\210\"(\20\200\fh\241\21\207\350B\n"
|
||||||
|
#"$@\202:h\203!\353\310D pa\rn4c\21,\30"
|
||||||
|
#"@\4\346\360A\220\20O!$4\341A(\301\201\0\364\19"
|
||||||
|
#"\5\341\303\1\214h\213D\204q \353@\303\0000\260\211\"\21"
|
||||||
|
#"\204\26\275\331\201\177\6\242H#\372\203\24)\b@\27\34\224\310"
|
||||||
|
#"E:\261\221\217$\310<\330\360\206W\204P\n\235k\332\34\346"
|
||||||
|
#"@\2153\4\0\t\305h\b;$)\1C\234\3\36\360H\a"
|
||||||
|
#".\214@\200\a\354!\35\v\331G<\340\201\17\324\360#\36\246"
|
||||||
|
#"\230A\0>`\273\220\3741!\201<\241A\biHD\22D"
|
||||||
|
#"\221\f(\2049\304\341\f6|\1V\3\221F\24\2\300\202V"
|
||||||
|
#"$$C\1\360@(\276i\312\201\214\243\f\aHA)\272\306"
|
||||||
|
#"\377\311\3\204s\234\345<'\241\276\360\207u\310\341\0 \30\305"
|
||||||
|
#"@\200!\206Q\304\243\r\1\350\1/\32\242\215+\4@\4\245"
|
||||||
|
#" \b>P!\203\0\254\200\25\23yG\34\22@\0000\220\362"
|
||||||
|
#"#\327D\b\t\t\360\201\31\270\364\2453\360\200\1\272i\20E"
|
||||||
|
#"\n`\2 \370\0\a\34\3009\202\334B\a\1\370\201/\22\""
|
||||||
|
#"\216.\4\300\0\203\353g\2\270\300\tH\320\341\a\0210\2-"
|
||||||
|
#"\262H\317\233\346t\247=-\3104\260\320\b~\224b\5\4\250"
|
||||||
|
#"\303:\302W\2105T\303x\1\220\201,\32\302\f&\4 \6"
|
||||||
|
#"k%H9\302p\324D\334\356!\375\310D\b\2 \4`X"
|
||||||
|
#"3\204\247Z\b\t\31`\6U\30\366\260\252\30\303\4hZ\312"
|
||||||
|
#"\5\360\301\32\320\270\5\26\262\300\f\202\270B\2329\310\25B\326"
|
||||||
|
#"\26\200\5D\202\236\6\0B\e\262\200\2\3D\300\20\360@\210"
|
||||||
|
#"\"\35\vY\311R\326 \303\310\2_*\32\200\"\377\b\303\37"
|
||||||
|
#"\322 \3%*\203\a\2\234 \25\ri\206\0\341\367\"@0"
|
||||||
|
#" \0t`\307DZ\321\321v\376U\204\202-\241$\354A\335"
|
||||||
|
#"\352\332\343\21*<dMM)$|\214\242\16\310PR\bM"
|
||||||
|
#"\200\212\204p#\v\27%\5=\31p\210t\230\303\23/ \0"
|
||||||
|
#"\22\206\241Z\356\362\303\273\3405\310,\270\0\\}\24B\2\24"
|
||||||
|
#"\300D^\317`\f\201\374A\1\34\250\16C\254Q\205\0\300\240"
|
||||||
|
#"`\3q\4\363~3\21\\\0\225\270~\4,\204UZBm"
|
||||||
|
#"\26\204\233\332-\245\21\335A\16\252\202\203\v\1\200@%\22\242"
|
||||||
|
#"\214\211i\222\2361\\\307\32`\250\b\270mw\304%6\310("
|
||||||
|
#"\274p\v\201\344b\a\3H\3031\324@\bH\31\2\2\202d"
|
||||||
|
#"\b:\304\20\200\20\250\267 G.\0\"\356\372\220U\274 \0"
|
||||||
|
#"MPFHT\4]@v\30\205\331\365&\21\353)\220~\230"
|
||||||
|
#"\371\34\212H\20>\370\260\200\1\210a\377\e\b1\5X\335P"
|
||||||
|
#"\16\202\354\201\314\375\370\252\0\254\0\215\203\334\331\210f\356\a\232"
|
||||||
|
#"\23$\220I\200\201\30\2\211\344\0pp\0063\330B<\215\260"
|
||||||
|
#"\200\1\32\321\220}\0\242\1\fx\4\370\362P\200\204R\244\22"
|
||||||
|
#"\35\b\300\31\356\6\222^\374 \0\277]\210>\216\327\200\365\31"
|
||||||
|
#"D\302\315\343!A\346\347\304\201\314\"\v\246\20\b3\4\370\1"
|
||||||
|
#"P\200\317\37\350H\303\1x\200\213\273J/\1\217\30H6,"
|
||||||
|
#"\372\1Q\34\204\326\372\305\365@\376\320\205h\b\204\37ze\0"
|
||||||
|
#"\5\360\200\216\201HB\3\2\20\304\247\26\342\n\31\b\0\fo"
|
||||||
|
#"\34\2108\274\20\200-\fQ \345\230\306X\ab\16X\364\""
|
||||||
|
#"\265\3I\307\31\b@\2Q\b\314#\250hA\0*p\211_"
|
||||||
|
#"\23\204\35f\250M!\306}\355?D&\r}\24\b<\324@"
|
||||||
|
#"9F\220\216\e` \302D\375\221\217Q\260\200\0?\270\305\277"
|
||||||
|
#"\353a\t\22X\300\21T\377\235\270d\bQ5} \242\2\4"
|
||||||
|
#"X\3\251%Gq\4X\234 \30\327\270@\330q\6\2\16D"
|
||||||
|
#"\270\28\201)\222\4\211\f\4\0\16\310\204c\e\20`\202S"
|
||||||
|
#"\310'T\34\330\204\300\2061\205\16\200\341\31\3y\304Z\22\241"
|
||||||
|
#"\334 \231\202\5\a\230\3039>\362\16l\270\202\t\a\b\300\0"
|
||||||
|
#"\200\360\211i\264\3|\365\310\6#T \230\36\210B\0343\302"
|
||||||
|
#"G8F\301\203\374\244\200\21\331@N=\266\1\t\201\v\340\n"
|
||||||
|
#"\3030\a9\234\301\t%4\300\347\2\211\307)t\260\0\0300"
|
||||||
|
#"\202\e\371\300\a6\360 \202\34\204\202T\343!\274\300k\v\v"
|
||||||
|
#"\340\370C\270\1\350@ \272Q\231\301\27^2\210W<\343\35"
|
||||||
|
#"\357suT\202\5/\270\3049\300b\217<,\340\v\351\226\307"
|
||||||
|
#"2\262\220v\32t\"\35\2264H?\234A\205\4\330\200\24\362"
|
||||||
|
#"\320\307/\224\20\202D\314[ \337\16\0\tr-\20Q\240@"
|
||||||
|
#"\0!8\304\377/E\201\3\n\224a\32\6\277\310>\b\361\201"
|
||||||
|
#"\v$@?\b\250@\a\356`\263\201\260\302\a\22(\200`\342"
|
||||||
|
#"/\5\372\26\243\n\25\200\0\202Q\0\22\200\3\356\4\vB0"
|
||||||
|
#"\0013\2657\e\0\2 \300\1\24\200\0\3\320\aTU\17\324"
|
||||||
|
#"\340\a/\240\1-\25\3,\300\3y\300\f\364 \37\b\250\200"
|
||||||
|
#"\202\221\0\30\360\b3\222\17\266 \4\b\20\0012P^#\270"
|
||||||
|
#"\200\f\320\200\17\30\201\238\17\365\300\a\24\240\30\24@\a\244"
|
||||||
|
#"\306\nG`\t\324B\n6p\\\373Q\1\201\0z\n\221\17"
|
||||||
|
#"\334\200\b-`\1*\340\2\37p\3\234\320\16E\362S\1\240"
|
||||||
|
#"\4\5\26y\255\260\4\21 \1(\200\2\35\320\3\233`\16\377"
|
||||||
|
#"\306\21\344\20\r\324p\r\331\240\r\331\200\r\324\20\r\342\300O"
|
||||||
|
#"\376\320\16p\210\r\332\240\r\3270\r\3330(\362\260\r\321P"
|
||||||
|
#"\rm\b\207\326@*\356p\207\332\260\r\212\270\210\330P\r\322"
|
||||||
|
#"\361\200\16\226\264\17\357 \16\321\20\v\244\260\v\326 \16\356p"
|
||||||
|
#"\206\207\270\206oH\r\256!\36\366\360\r\275\360\nX\342\17\235"
|
||||||
|
#"\210\207\213\310\210\216\b\211\375@\16\324\220\r\331@\r\343\360)"
|
||||||
|
#"\353\260\f\340\0I\327 \210\331`\r\321P\16T\206\20\317\204"
|
||||||
|
#"\r\267\260\t\230`\v\3320\17\226T\17\321\240\v\327`c\2"
|
||||||
|
#"a\17\347\220\f\245\200\t\256\0\r\344\20\202!!$f6\20"
|
||||||
|
#"f\306\17\311\27h\342!\216e\6\216\336h\216\344\370&\346("
|
||||||
|
#"\214\367P\17\315\204\20\351\310\215\4\321\17\371p\17\372\200\32\351"
|
||||||
|
#"\250|\353\330\215A\"\37\375\240\17\267\23h\345\230|\nq_"
|
||||||
|
#"\3640\17\357\370.\371`p\373P\17\363p\17\351G#\229"
|
||||||
|
#"\221\24Y\221\26y\221\30\231\221\32\271\221\34\331\221\36\371\221 "
|
||||||
|
#"\31\222\"9\222$Y\222&y\222(\231\222*\271\222,i\24"
|
||||||
|
#"\1\1\0;"))
|
||||||
|
|
||||||
|
@(require pict file/convertible)
|
||||||
|
@(struct gf ()
|
||||||
|
#:property prop:convertible
|
||||||
|
(λ (v request default)
|
||||||
|
(cond
|
||||||
|
[(equal? request 'gif-bytes)
|
||||||
|
bytes]
|
||||||
|
[else default])))
|
||||||
|
|
||||||
|
|
||||||
|
@(gf)
|
1
scribble-test/tests/scribble/docs/gif.txt
Normal file
1
scribble-test/tests/scribble/docs/gif.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#<gf>
|
6
scribble-test/tests/scriblib/bibtex.latex-escapes.txt
Normal file
6
scribble-test/tests/scriblib/bibtex.latex-escapes.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Bibliography
|
||||||
|
|
||||||
|
[1]Vı́ctor Braberman, Federico Fernández, Diego Garbervetsky, and Sergio
|
||||||
|
Yovine. Parametric prediction of heap memory requirements. In Proc.
|
||||||
|
Proceedings of the 7th international symposium on Memory management,
|
||||||
|
2008. http://doi.acm.org/10.1145/1375634.1375655
|
|
@ -6,3 +6,4 @@ Bibliography
|
||||||
Python. Massachusetts Institute of Technology, 2004.
|
Python. Massachusetts Institute of Technology, 2004.
|
||||||
[3]Sam Tobin-Hochstadt, Vincent St-Amour, Ryan Culpepper, Matthew Flatt,
|
[3]Sam Tobin-Hochstadt, Vincent St-Amour, Ryan Culpepper, Matthew Flatt,
|
||||||
and Matthias Felleisen. Languages as Libraries. In Proc. PLDI, 2011.
|
and Matthias Felleisen. Languages as Libraries. In Proc. PLDI, 2011.
|
||||||
|
[4]ZA ZAuThOr. StrIngS ArE TerriblE. 2000.
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
(define-runtime-path normal-expected-path "bibtex.normal.txt")
|
(define-runtime-path normal-expected-path "bibtex.normal.txt")
|
||||||
(define-runtime-path number-expected-path "bibtex.number.txt")
|
(define-runtime-path number-expected-path "bibtex.number.txt")
|
||||||
|
(define-runtime-path latex-escapes-path "bibtex.latex-escapes.txt")
|
||||||
|
|
||||||
(define-syntax-rule (test-render* definer expected-path body generate-bibliography-id)
|
(define-syntax-rule (test-render* definer expected-path body generate-bibliography-id)
|
||||||
(let ()
|
(let ()
|
||||||
|
@ -73,4 +74,8 @@
|
||||||
(λ (~cite-id citet-id)
|
(λ (~cite-id citet-id)
|
||||||
(citet-id "salib:starkiller")
|
(citet-id "salib:starkiller")
|
||||||
(citet-id "cryptoeprint:2000:067")
|
(citet-id "cryptoeprint:2000:067")
|
||||||
(citet-id "Tobin-Hochstadt:2011fk"))))
|
(citet-id "Tobin-Hochstadt:2011fk")
|
||||||
|
(citet-id "anannoyingkey")))
|
||||||
|
(test-render latex-escapes-path (#:style number-style)
|
||||||
|
(λ (~cite-id citet-id)
|
||||||
|
(citet-id "Braberman:2008:PPH:1375634.1375655"))))
|
||||||
|
|
|
@ -405,3 +405,8 @@ Book{landru21,
|
||||||
month = "May",
|
month = "May",
|
||||||
year = 2004
|
year = 2004
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MiSc{AnAnnoyingKeY,
|
||||||
|
Author = {ZA ZAuThOr},
|
||||||
|
Title = {StrIngS ArE TerriblE},
|
||||||
|
Year = {2000}}
|
Loading…
Reference in New Issue
Block a user