Merge tag 'v6.11' into my-changes-rebased
This commit is contained in:
commit
126f7b7212
|
@ -239,28 +239,28 @@ defaults to @racket{Received} for the first occurrence and
|
||||||
@received[#:stage "accepted"]{June 2009}
|
@received[#:stage "accepted"]{June 2009}
|
||||||
}|}
|
}|}
|
||||||
|
|
||||||
@defproc[(teaserfigure [content pre-content?] ...) block?]{
|
@defproc[(teaserfigure [content pre-flow?] ...) block?]{
|
||||||
|
|
||||||
Creates a teaser figure to appear before main text.}
|
Creates a teaser figure to appear before main text.}
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
@defproc[(sidebar [content pre-content?] ...) block?]
|
@defproc[(sidebar [content pre-flow?] ...) block?]
|
||||||
@defproc[(marginfigure [content pre-content?] ...) block?]
|
@defproc[(marginfigure [content pre-flow?] ...) block?]
|
||||||
@defproc[(margintable [content pre-content?] ...) block?]
|
@defproc[(margintable [content pre-flow?] ...) block?]
|
||||||
)]{
|
)]{
|
||||||
|
|
||||||
In the @racket[sigchi-a] format, special sidebars,
|
In the @racket[sigchi-a] format, special sidebars,
|
||||||
tables and figures on the margin.}
|
tables and figures on the margin.}
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
@defproc[(printonly [content pre-content?] ...) block?]
|
@defproc[(printonly [content pre-flow?] ...) block?]
|
||||||
@defproc[(screenonly [content pre-content?] ...) block?]
|
@defproc[(screenonly [content pre-flow?] ...) block?]
|
||||||
@defproc[(anonsuppress [content pre-content?] ...) block?]
|
@defproc[(anonsuppress [content pre-flow?] ...) block?]
|
||||||
)]{
|
)]{
|
||||||
Marks content to be included only for print or screen
|
Marks content to be included only for print or screen
|
||||||
editions, or excluded from anonymous editions.}
|
editions, or excluded from anonymous editions.}
|
||||||
|
|
||||||
@defproc[(acks [content pre-content?] ...) block?]{
|
@defproc[(acks [content pre-flow?] ...) block?]{
|
||||||
|
|
||||||
Creates an unnumbered section ``Acknowledgments'' section, unless the
|
Creates an unnumbered section ``Acknowledgments'' section, unless the
|
||||||
@racket[anonymous] mode is selected.}
|
@racket[anonymous] mode is selected.}
|
||||||
|
|
|
@ -130,7 +130,14 @@ Generates a @racket[paragraph] with style name @racket['author] to
|
||||||
show the author(s) of a document, where each author is represented by
|
show the author(s) of a document, where each author is represented by
|
||||||
@tech{content}. Normally, this function is used after
|
@tech{content}. Normally, this function is used after
|
||||||
@racket[title] for the beginning of a document. See also
|
@racket[title] for the beginning of a document. See also
|
||||||
@racket[author+email].}
|
@racket[author+email].
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
@codeblock[#:keep-lang-line? #f]|{
|
||||||
|
#lang scribble/base
|
||||||
|
@author{Alice P. Racketeer}
|
||||||
|
}|}
|
||||||
|
|
||||||
@defproc[(author+email [author-name content?]
|
@defproc[(author+email [author-name content?]
|
||||||
[email string?]
|
[email string?]
|
||||||
|
@ -143,7 +150,14 @@ address-harvesting robots.
|
||||||
|
|
||||||
Note that @racket[author+email] is not a replacement for
|
Note that @racket[author+email] is not a replacement for
|
||||||
@racket[author]. The @racket[author+email] function is often used in
|
@racket[author]. The @racket[author+email] function is often used in
|
||||||
combination with @racket[author].}
|
combination with @racket[author].
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
@codeblock[#:keep-lang-line? #f]|{
|
||||||
|
#lang scribble/base
|
||||||
|
@author[(author+email "Bob T. Scribbler" "bob@racket-lang.org")]
|
||||||
|
}|}
|
||||||
|
|
||||||
@; ------------------------------------------------------------------------
|
@; ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -599,7 +613,8 @@ Generates a literal hyperlinked URL.}
|
||||||
@defproc[(secref [tag string?]
|
@defproc[(secref [tag string?]
|
||||||
[#:doc module-path (or/c module-path? #f) #f]
|
[#:doc module-path (or/c module-path? #f) #f]
|
||||||
[#:tag-prefixes prefixes (or/c (listof string?) #f) #f]
|
[#:tag-prefixes prefixes (or/c (listof string?) #f) #f]
|
||||||
[#:underline? underline? any/c #t])
|
[#:underline? underline? any/c #t]
|
||||||
|
[#:link-render-style ref-style (or/c link-render-style? #f)])
|
||||||
element?]{
|
element?]{
|
||||||
|
|
||||||
Inserts a reference to the section tagged @racket[tag].
|
Inserts a reference to the section tagged @racket[tag].
|
||||||
|
@ -620,32 +635,35 @@ reach the @racket[tag] section. When @racket[#:doc] is not provided,
|
||||||
the @racket[prefixes] path is relative to any enclosing section (i.e.,
|
the @racket[prefixes] path is relative to any enclosing section (i.e.,
|
||||||
the youngest ancestor that produces a match).
|
the youngest ancestor that produces a match).
|
||||||
|
|
||||||
For HTML output, the generated reference is the hyperlinked title of
|
For the result @racket[link-element], if @racket[ref-style] is not
|
||||||
the elements in the section's title content, except that elements with
|
@racket[#f], then it is attached as a @tech{style property} and
|
||||||
the @racket['aux] @tech{style property} are omitted in the hyperlink
|
affects the rendering of the link. Alternatively, an enclosing
|
||||||
label. If @racket[underline?] is @racket[#f], then the hyperlink is
|
@racket[part] can have a link-render style that adjusts the rendering
|
||||||
rendered in HTML without an underline.
|
style for all links within the @tech{part}. See @racket[link-element]
|
||||||
|
for more information about the rendering of section references.
|
||||||
|
|
||||||
For Latex output, the generated reference's format depends on the
|
If @racket[underline?] is @racket[#f], then a @tech{style} is attached
|
||||||
document style. By default, only the section number is shown in the
|
to the result @racket[link-element] so that the hyperlink is rendered
|
||||||
reference, but the @racketmodname[scribble/manual] style shows the
|
in HTML without an underline
|
||||||
title after the section number. Customize the output (see
|
|
||||||
@secref["config"]) by redefining the @ltx{BookRef}, @|etc|, macros (see
|
|
||||||
@secref["builtin-latex"]).
|
|
||||||
|
|
||||||
In Racket documentation that is rendered to HTML, clicking on a
|
In Racket documentation that is rendered to HTML, clicking on a
|
||||||
section title normally shows the @racket[secref] call that is needed
|
section title normally shows the @racket[secref] call that is needed
|
||||||
to link to the section.}
|
to link to the section.
|
||||||
|
|
||||||
|
@history[#:changed "1.25" @elem{Added the @racket[#:link-render-style] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(Secref [tag string?]
|
@defproc[(Secref [tag string?]
|
||||||
[#:doc module-path (or/c module-path? #f) #f]
|
[#:doc module-path (or/c module-path? #f) #f]
|
||||||
[#:tag-prefixes prefixes (or/c (listof string?) #f) #f]
|
[#:tag-prefixes prefixes (or/c (listof string?) #f) #f]
|
||||||
[#:underline? underline? any/c #t])
|
[#:underline? underline? any/c #t]
|
||||||
|
[#:link-render-style ref-style (or/c link-render-style? #f)])
|
||||||
element?]{
|
element?]{
|
||||||
|
|
||||||
Like @racket[secref], but if the rendered form of the reference starts
|
Like @racket[secref], but if the rendered form of the reference starts
|
||||||
with a word (e.g., ``section''), then the word is capitalized.}
|
with a word (e.g., ``section''), then the word is capitalized.
|
||||||
|
|
||||||
|
@history[#:changed "1.25" @elem{Added the @racket[#:link-render-style] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(seclink [tag string?]
|
@defproc[(seclink [tag string?]
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
scriblib/render-cond
|
scriblib/render-cond
|
||||||
xml/xexpr
|
xml/xexpr
|
||||||
net/url-structs
|
net/url-structs
|
||||||
|
scriblib/figure
|
||||||
(only-in scribble/html-render render-mixin)))
|
(only-in scribble/html-render render-mixin)))
|
||||||
|
|
||||||
@title[#:tag "core"]{Structures And Processing}
|
@title[#:tag "core"]{Structures And Processing}
|
||||||
|
@ -119,7 +120,8 @@ A @deftech{block} is either a @techlink{table}, an
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{A @deftech{content} can be a string, one of a few
|
@item{A @deftech{content} can be a string, one of a few
|
||||||
symbols, an instance of @racket[element] (possibly
|
symbols, a convertible value in the sense of @racket[convertible?],
|
||||||
|
an instance of @racket[element] (possibly
|
||||||
@racket[link-element], etc.), a @racket[multiarg-element], a
|
@racket[link-element], etc.), a @racket[multiarg-element], a
|
||||||
@techlink{traverse element}, a @techlink{part-relative element}, a
|
@techlink{traverse element}, a @techlink{part-relative element}, a
|
||||||
@techlink{delayed element}, or a list of content.
|
@techlink{delayed element}, or a list of content.
|
||||||
|
@ -144,6 +146,13 @@ A @deftech{block} is either a @techlink{table}, an
|
||||||
rendered as the corresponding HTML entity
|
rendered as the corresponding HTML entity
|
||||||
(even for Latex output).}
|
(even for Latex output).}
|
||||||
|
|
||||||
|
@item{A convertible value in the sense of @racket[convertible?]
|
||||||
|
is used in a renderer-specific way, but values convertible
|
||||||
|
to @racket['text] renders the same as the resulting
|
||||||
|
string. If a renderer is not able to convert the value
|
||||||
|
to a known format, the value is converted to a string
|
||||||
|
using @racket[write].}
|
||||||
|
|
||||||
@item{An instance of @racket[element] has a
|
@item{An instance of @racket[element] has a
|
||||||
@techlink{content} plus a @tech{style}. The style's
|
@techlink{content} plus a @tech{style}. The style's
|
||||||
interpretation depends on the renderer, but it
|
interpretation depends on the renderer, but it
|
||||||
|
@ -230,6 +239,10 @@ A @deftech{block} is either a @techlink{table}, an
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@history[#:changed "1.23" @elem{Changed the handling of @racket[convertible?]
|
||||||
|
values to recognize a @racket['text] conversion
|
||||||
|
and otherwise use @racket[write].}]
|
||||||
|
|
||||||
@; ------------------------------------------------------------------------
|
@; ------------------------------------------------------------------------
|
||||||
|
|
||||||
@section[#:tag "tags"]{Tags}
|
@section[#:tag "tags"]{Tags}
|
||||||
|
@ -370,7 +383,7 @@ names are as follows:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['index] --- The part represents an index.}
|
@item{@indexed-racket['index] --- The part represents an index.}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -378,24 +391,24 @@ The recognized @tech{style properties} are as follows:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['unnumbered] --- A section number is not computed or
|
@item{@indexed-racket['unnumbered] --- A section number is not computed or
|
||||||
rendered for the section.}
|
rendered for the section.}
|
||||||
|
|
||||||
@item{@racket['hidden-number] --- A section number is computed for
|
@item{@indexed-racket['hidden-number] --- A section number is computed for
|
||||||
the section, but it is not rendered as part of the section name.}
|
the section, but it is not rendered as part of the section name.}
|
||||||
|
|
||||||
@item{@racket['toc-hidden] --- The part title is not shown in tables
|
@item{@indexed-racket['toc-hidden] --- The part title is not shown in tables
|
||||||
of contents, including in ``on this page'' boxes. For Latex
|
of contents, including in ``on this page'' boxes. For Latex
|
||||||
rendering, the part title is omitted only if it is unnumbered
|
rendering, the part title is omitted only if it is unnumbered
|
||||||
or has a hidden number.}
|
or has a hidden number.}
|
||||||
|
|
||||||
@item{@racket['hidden] --- The part title is not shown; for Latex
|
@item{@indexed-racket['hidden] --- The part title is not shown; for Latex
|
||||||
output, the part title is not shown only if its is empty, and
|
output, the part title is not shown only if its is empty, and
|
||||||
in that case, it is also excluded from tables of contents. The
|
in that case, it is also excluded from tables of contents. The
|
||||||
@racket['toc-hidden] @tech{style property} usually should be included with
|
@racket['toc-hidden] @tech{style property} usually should be included with
|
||||||
@racket['hidden] (for consistency in non-Latex output).}
|
@racket['hidden] (for consistency in non-Latex output).}
|
||||||
|
|
||||||
@item{@racket['grouper] --- The part is numbered with a Roman
|
@item{@indexed-racket['grouper] --- The part is numbered with a Roman
|
||||||
numeral, by default, and its subsections continue numbering as
|
numeral, by default, and its subsections continue numbering as
|
||||||
if they appeared in the preceeding part. In other words, the
|
if they appeared in the preceeding part. In other words, the
|
||||||
part acts like a ``part'' in a book where chapter numbering is
|
part acts like a ``part'' in a book where chapter numbering is
|
||||||
|
@ -410,24 +423,24 @@ The recognized @tech{style properties} are as follows:
|
||||||
@racket['unnumbered] property is also present, a
|
@racket['unnumbered] property is also present, a
|
||||||
@tech{numberer} property is ignored.}
|
@tech{numberer} property is ignored.}
|
||||||
|
|
||||||
@item{@racket['toc] --- Sub-parts of the part are rendered on separate
|
@item{@indexed-racket['toc] --- Sub-parts of the part are rendered on separate
|
||||||
pages for multi-page HTML mode.}
|
pages for multi-page HTML mode.}
|
||||||
|
|
||||||
@item{@racket['non-toc] --- Initial sub-parts of the part are
|
@item{@indexed-racket['non-toc] --- Initial sub-parts of the part are
|
||||||
@emph{not} rendered on separate pages for multi-page HTML
|
@emph{not} rendered on separate pages for multi-page HTML
|
||||||
mode; this @tech{style property} applies only to the main part.}
|
mode; this @tech{style property} applies only to the main part.}
|
||||||
|
|
||||||
@item{@racket['reveal] --- Shows sub-parts when this part is
|
@item{@indexed-racket['reveal] --- Shows sub-parts when this part is
|
||||||
displayed in a table-of-contents panel in HTML output (which
|
displayed in a table-of-contents panel in HTML output (which
|
||||||
normally shows only the top-level sections).}
|
normally shows only the top-level sections).}
|
||||||
|
|
||||||
@item{@racket['quiet] --- In HTML output and most other output modes,
|
@item{@indexed-racket['quiet] --- In HTML output and most other output modes,
|
||||||
hides entries for sub-parts of this part in a
|
hides entries for sub-parts of this part in a
|
||||||
@racket[table-of-contents] or @racket[local-table-of-contents]
|
@racket[table-of-contents] or @racket[local-table-of-contents]
|
||||||
listing except when those sub-parts are top-level entries in
|
listing except when those sub-parts are top-level entries in
|
||||||
the listing.}
|
the listing.}
|
||||||
|
|
||||||
@item{@racket['no-toc] --- As a @tech{style property} for the main part of a
|
@item{@indexed-racket['no-toc] --- As a @tech{style property} for the main part of a
|
||||||
rendered page, causes the HTML output to not include a margin box
|
rendered page, causes the HTML output to not include a margin box
|
||||||
for the main table of contents; the ``on this page'' box that
|
for the main table of contents; the ``on this page'' box that
|
||||||
contains @racket[toc-element] and @racket[toc-target-element]
|
contains @racket[toc-element] and @racket[toc-target-element]
|
||||||
|
@ -435,10 +448,18 @@ The recognized @tech{style properties} are as follows:
|
||||||
multi-page documents) takes on the location and color of the
|
multi-page documents) takes on the location and color of the
|
||||||
main table of contents, instead.}
|
main table of contents, instead.}
|
||||||
|
|
||||||
@item{@racket['no-sidebar] --- As a @tech{style property} for the main part of a
|
@item{@indexed-racket['no-sidebar] --- As a @tech{style property} for the main part of a
|
||||||
document, causes the HTML output to not include an ``on this
|
document, causes the HTML output to not include an ``on this
|
||||||
page'' margin box.}
|
page'' margin box.}
|
||||||
|
|
||||||
|
@item{@indexed-racket['no-index] --- Has no effect as a @tech{style
|
||||||
|
property} on a @racket[part], but as a style property on a
|
||||||
|
@racket[title] or @racket[part-start] that provides a
|
||||||
|
@racket[part]'s style via @racket[decode], the
|
||||||
|
@racket['no-index] @tech{style property} cause @racket[decode]
|
||||||
|
to skip the generation of an entry for the part's title in the
|
||||||
|
document index.}
|
||||||
|
|
||||||
@item{@racket[document-version] structure --- A version number for
|
@item{@racket[document-version] structure --- A version number for
|
||||||
this part and its sub-parts (except as overridden). When it is
|
this part and its sub-parts (except as overridden). When it is
|
||||||
not @racket[""] may be used when rendering a document; at a
|
not @racket[""] may be used when rendering a document; at a
|
||||||
|
@ -494,6 +515,11 @@ The recognized @tech{style properties} are as follows:
|
||||||
module path plus a section-tag string, so that the user can
|
module path plus a section-tag string, so that the user can
|
||||||
create a reference to the section.}
|
create a reference to the section.}
|
||||||
|
|
||||||
|
@item{@racket[link-render-style] structure --- Determines the default
|
||||||
|
rendering of links to sections or other destinations within the
|
||||||
|
section. See also @racket[link-element] and
|
||||||
|
@racket[current-link-render-style].}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
The @racket[to-collect] field contains @techlink{content} that is
|
The @racket[to-collect] field contains @techlink{content} that is
|
||||||
|
@ -505,7 +531,8 @@ sub-parts).
|
||||||
|
|
||||||
The @racket[parts] field contains sub-parts.
|
The @racket[parts] field contains sub-parts.
|
||||||
|
|
||||||
}
|
@history[#:changed "1.25" @elem{Added @racket['no-index] support.}
|
||||||
|
#:changed "1.26" @elem{Added @racket[link-render-style] support.}]}
|
||||||
|
|
||||||
|
|
||||||
@defstruct[paragraph ([style style?] [content content?])]{
|
@defstruct[paragraph ([style style?] [content content?])]{
|
||||||
|
@ -519,16 +546,16 @@ recognized:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['author] --- Typeset as the author of a document. Such
|
@item{@indexed-racket['author] --- Typeset as the author of a document. Such
|
||||||
paragraphs normally should appear only in the initial flow of a
|
paragraphs normally should appear only in the initial flow of a
|
||||||
@racket[part] for a document, where they are treated specially
|
@racket[part] for a document, where they are treated specially
|
||||||
by the Latex renderer by moving the author information to the
|
by the Latex renderer by moving the author information to the
|
||||||
title.}
|
title.}
|
||||||
|
|
||||||
@item{@racket['pretitle] --- Typeset before the title of the
|
@item{@indexed-racket['pretitle] --- Typeset before the title of the
|
||||||
enclosing part.}
|
enclosing part.}
|
||||||
|
|
||||||
@item{@racket['wraps] --- Like a @racket[#f] @tech{style name}, but not
|
@item{@indexed-racket['wraps] --- Like a @racket[#f] @tech{style name}, but not
|
||||||
@tech{boxable} in the sense of @racket[box-mode] for Latex output.}
|
@tech{boxable} in the sense of @racket[box-mode] for Latex output.}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -540,12 +567,12 @@ The currently recognized @tech{style properties} are as follows:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['omitable] --- When a table cell contains a single
|
@item{@indexed-racket['omitable] --- When a table cell contains a single
|
||||||
@racket[paragraph] with the @racket['omitable] @tech{style property},
|
@racket[paragraph] with the @racket['omitable] @tech{style property},
|
||||||
then when rendering to HTML, no @tt{<p>} tag wraps the cell
|
then when rendering to HTML, no @tt{<p>} tag wraps the cell
|
||||||
content.}
|
content.}
|
||||||
|
|
||||||
@item{@racket['div] --- Generates @tt{<div>} HTML output instead of
|
@item{@indexed-racket['div] --- Generates @tt{<div>} HTML output instead of
|
||||||
@tt{<p>} (unless a @racket[alt-tag] property is provided).}
|
@tt{<p>} (unless a @racket[alt-tag] property is provided).}
|
||||||
|
|
||||||
@item{@racket[alt-tag] structure --- Generates the indicated HTML tag
|
@item{@racket[alt-tag] structure --- Generates the indicated HTML tag
|
||||||
|
@ -558,7 +585,7 @@ The currently recognized @tech{style properties} are as follows:
|
||||||
as an @tt{id} attribute of the @tt{<p>}, @tt{<div>}, or
|
as an @tt{id} attribute of the @tt{<p>}, @tt{<div>}, or
|
||||||
alternate tag.}
|
alternate tag.}
|
||||||
|
|
||||||
@item{@racket['never-indents] --- For Latex and @tech{compound
|
@item{@indexed-racket['never-indents] --- For Latex and @tech{compound
|
||||||
paragraphs}; see @racket[compound-paragraph].}
|
paragraphs}; see @racket[compound-paragraph].}
|
||||||
|
|
||||||
@item{@racket[box-mode] structure --- For Latex output, uses an alternate
|
@item{@racket[box-mode] structure --- For Latex output, uses an alternate
|
||||||
|
@ -585,14 +612,14 @@ recognized:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['boxed] --- Renders as a definition.
|
@item{@indexed-racket['boxed] --- Renders as a definition.
|
||||||
This style name is not intended for use on a table that is
|
This style name is not intended for use on a table that is
|
||||||
nested within a @racket['boxed] table; nested uses may look
|
nested within a @racket['boxed] table; nested uses may look
|
||||||
right for some renders of the style but not others.}
|
right for some renders of the style but not others.}
|
||||||
|
|
||||||
@item{@racket['centered] --- Centers HTML output horizontally.}
|
@item{@indexed-racket['centered] --- Centers HTML output horizontally.}
|
||||||
|
|
||||||
@item{@racket['block] --- Prevents pages breaks in Latex output.}
|
@item{@indexed-racket['block] --- Prevents pages breaks in Latex output.}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -616,10 +643,10 @@ The following @tech{style properties} are currently recognized:
|
||||||
@item{@racket[body-id] structure --- For HTML, uses the given string
|
@item{@racket[body-id] structure --- For HTML, uses the given string
|
||||||
as an @tt{id} attribute of the @tt{<table>} tag.}
|
as an @tt{id} attribute of the @tt{<table>} tag.}
|
||||||
|
|
||||||
@item{@racket['aux] --- For HTML, include the table in the
|
@item{@indexed-racket['aux] --- For HTML, include the table in the
|
||||||
table-of-contents display for the enclosing part.}
|
table-of-contents display for the enclosing part.}
|
||||||
|
|
||||||
@item{@racket['never-indents] --- For Latex and @tech{compound
|
@item{@indexed-racket['never-indents] --- For Latex and @tech{compound
|
||||||
paragraphs}; see @racket[compound-paragraph].}
|
paragraphs}; see @racket[compound-paragraph].}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -648,9 +675,9 @@ names are recognized:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['compact] --- Reduces space between items.}
|
@item{@indexed-racket['compact] --- Reduces space between items.}
|
||||||
|
|
||||||
@item{@racket['ordered] --- Generates @tt{<ol>} HTML output instead
|
@item{@indexed-racket['ordered] --- Generates @tt{<ol>} HTML output instead
|
||||||
of @tt{<ul>} or an Latex enumeration instead of an
|
of @tt{<ul>} or an Latex enumeration instead of an
|
||||||
itemization.}
|
itemization.}
|
||||||
]
|
]
|
||||||
|
@ -665,7 +692,7 @@ The following @tech{style properties} are currently recognized:
|
||||||
@item{@racket[body-id] structure --- For HTML, uses the given string
|
@item{@racket[body-id] structure --- For HTML, uses the given string
|
||||||
as an @tt{id} attribute of the @tt{<ul>} or @tt{<ol>} tag.}
|
as an @tt{id} attribute of the @tt{<ul>} or @tt{<ol>} tag.}
|
||||||
|
|
||||||
@item{@racket['never-indents] --- For Latex and @tech{compound
|
@item{@indexed-racket['never-indents] --- For Latex and @tech{compound
|
||||||
paragraphs}; see @racket[compound-paragraph].}
|
paragraphs}; see @racket[compound-paragraph].}
|
||||||
|
|
||||||
]}
|
]}
|
||||||
|
@ -683,15 +710,15 @@ names are recognized:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['inset] --- Insets the nested flow relative to
|
@item{@indexed-racket['inset] --- Insets the nested flow relative to
|
||||||
surrounding text.}
|
surrounding text.}
|
||||||
|
|
||||||
@item{@racket['code-inset] --- Insets the nested flow relative to
|
@item{@indexed-racket['code-inset] --- Insets the nested flow relative to
|
||||||
surrounding text in a way suitable for code. If the nested flow
|
surrounding text in a way suitable for code. If the nested flow
|
||||||
has a single block, then it is @tech{boxable} in the sense of
|
has a single block, then it is @tech{boxable} in the sense of
|
||||||
@racket[box-mode] for Latex output.}
|
@racket[box-mode] for Latex output.}
|
||||||
|
|
||||||
@item{@racket['vertical-inset] --- Insets the nested flow vertically
|
@item{@indexed-racket['vertical-inset] --- Insets the nested flow vertically
|
||||||
relative to surrounding text, but not horizontally. If the
|
relative to surrounding text, but not horizontally. If the
|
||||||
nested flow has a single block, then it is @tech{boxable} in the sense
|
nested flow has a single block, then it is @tech{boxable} in the sense
|
||||||
of @racket[box-mode] for Latex output.}
|
of @racket[box-mode] for Latex output.}
|
||||||
|
@ -702,11 +729,11 @@ The following @tech{style properties} are currently recognized:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['command] --- For Latex output, a string @tech{style
|
@item{@indexed-racket['command] --- For Latex output, a string @tech{style
|
||||||
name} is used as a command name instead of an environment
|
name} is used as a command name instead of an environment
|
||||||
name.}
|
name.}
|
||||||
|
|
||||||
@item{@racket['multicommand] --- For Latex output, a string
|
@item{@indexed-racket['multicommand] --- For Latex output, a string
|
||||||
@tech{style name} is used as a command name with a separate
|
@tech{style name} is used as a command name with a separate
|
||||||
argument for each block in @racket[blocks].}
|
argument for each block in @racket[blocks].}
|
||||||
|
|
||||||
|
@ -716,20 +743,20 @@ The following @tech{style properties} are currently recognized:
|
||||||
@item{@racket[body-id] structure --- For HTML, uses the given string
|
@item{@racket[body-id] structure --- For HTML, uses the given string
|
||||||
as an @tt{id} attribute of the @tt{<blockquote>} tag.}
|
as an @tt{id} attribute of the @tt{<blockquote>} tag.}
|
||||||
|
|
||||||
@item{@racket['never-indents] --- For Latex and @tech{compound
|
@item{@indexed-racket['never-indents] --- For Latex and @tech{compound
|
||||||
paragraphs}; see @racket[compound-paragraph].}
|
paragraphs}; see @racket[compound-paragraph].}
|
||||||
|
|
||||||
@item{@racket[box-mode] structure --- For Latex output, uses an alternate
|
@item{@racket[box-mode] structure --- For Latex output, uses an alternate
|
||||||
rendering form for @tech{boxing contexts} (such as a table cell); see
|
rendering form for @tech{boxing contexts} (such as a table cell); see
|
||||||
@racket[box-mode].}
|
@racket[box-mode].}
|
||||||
|
|
||||||
@item{@racket['decorative] --- The content of the nested flow is intended
|
@item{@indexed-racket['decorative] --- The content of the nested flow is intended
|
||||||
for decoration. Text output skips a decorative nested flow.}
|
for decoration. Text output skips a decorative nested flow.}
|
||||||
|
|
||||||
@item{@racket[alt-tag] structure --- Generates the indicated HTML tag
|
@item{@racket[alt-tag] structure --- Generates the indicated HTML tag
|
||||||
instead of @tt{<blockquote>}.}
|
instead of @tt{<blockquote>}.}
|
||||||
|
|
||||||
@item{@racket['pretitle] --- For Latex, raises the contents
|
@item{@indexed-racket['pretitle] --- For Latex, raises the contents
|
||||||
of the flow to above the title.}
|
of the flow to above the title.}
|
||||||
]}
|
]}
|
||||||
|
|
||||||
|
@ -756,7 +783,7 @@ for Latex output (see @secref["extra-style"]). The following
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['command] --- For Latex output, a string @tech{style
|
@item{@indexed-racket['command] --- For Latex output, a string @tech{style
|
||||||
name} is used as a command name instead of an environment
|
name} is used as a command name instead of an environment
|
||||||
name.}
|
name.}
|
||||||
|
|
||||||
|
@ -769,7 +796,7 @@ for Latex output (see @secref["extra-style"]). The following
|
||||||
@item{@racket[body-id] structure --- For HTML, uses the given string
|
@item{@racket[body-id] structure --- For HTML, uses the given string
|
||||||
as an @tt{id} attribute of the @tt{<p>} or alternate tag.}
|
as an @tt{id} attribute of the @tt{<p>} or alternate tag.}
|
||||||
|
|
||||||
@item{@racket['never-indents] --- For Latex within another
|
@item{@indexed-racket['never-indents] --- For Latex within another
|
||||||
@tech{compound paragraph}; see above.}
|
@tech{compound paragraph}; see above.}
|
||||||
|
|
||||||
]}
|
]}
|
||||||
|
@ -831,18 +858,18 @@ recognized:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['tt], @racket['italic], @racket['bold], @racket['roman], @racket['sf],
|
@item{@indexed-racket['tt], @racket['italic], @racket['bold], @racket['roman], @racket['sf],
|
||||||
@racket['url], @racket['subscript], @racket['superscript],
|
@racket['url], @racket['subscript], @racket['superscript],
|
||||||
@racket['smaller], @racket['larger] ---
|
@racket['smaller], @racket['larger] ---
|
||||||
Basic styles recognized by all renders.}
|
Basic styles recognized by all renders.}
|
||||||
|
|
||||||
@item{@racket['hspace] --- Renders its @racket[content] as monospace
|
@item{@indexed-racket['hspace] --- Renders its @racket[content] as monospace
|
||||||
blanks.}
|
blanks.}
|
||||||
|
|
||||||
@item{@racket['newline] --- Renders a line break independent of
|
@item{@indexed-racket['newline] --- Renders a line break independent of
|
||||||
the @racket[content].}
|
the @racket[content].}
|
||||||
|
|
||||||
@item{@racket['no-break] --- Prevents line breaks when rendering
|
@item{@indexed-racket['no-break] --- Prevents line breaks when rendering
|
||||||
@racket[content].}
|
@racket[content].}
|
||||||
|
|
||||||
]
|
]
|
||||||
|
@ -878,15 +905,15 @@ The following @tech{style properties} are currently recognized:
|
||||||
@item{@racket[body-id] structure --- For HTML uses the given
|
@item{@racket[body-id] structure --- For HTML uses the given
|
||||||
string as an @tt{id} attribute of the @tt{<span>} tag.}
|
string as an @tt{id} attribute of the @tt{<span>} tag.}
|
||||||
|
|
||||||
@item{@racket['aux] --- Intended for use in titles, where the
|
@item{@indexed-racket['aux] --- Intended for use in titles, where the
|
||||||
auxiliary part of the title can be omitted in hyperlinks. See,
|
auxiliary part of the title can be omitted in hyperlinks. See,
|
||||||
for example, @racket[secref].}
|
for example, @racket[secref].}
|
||||||
|
|
||||||
@item{@racket['tt-chars] --- For Latex output, when the @tech{style
|
@item{@indexed-racket['tt-chars] --- For Latex output, when the @tech{style
|
||||||
name} is a string, render the element's content with escapes
|
name} is a string, render the element's content with escapes
|
||||||
suitable for Latex @tt{tt} mode.}
|
suitable for Latex @tt{tt} mode.}
|
||||||
|
|
||||||
@item{@racket['exact-chars] --- For Latex output, when the @tech{style
|
@item{@indexed-racket['exact-chars] --- For Latex output, when the @tech{style
|
||||||
name} is a string or @racket[#f], render the elements content exactly
|
name} is a string or @racket[#f], render the elements content exactly
|
||||||
(without escapes).}
|
(without escapes).}
|
||||||
|
|
||||||
|
@ -962,19 +989,66 @@ field.}
|
||||||
|
|
||||||
@defstruct[(link-element element) ([tag tag?])]{
|
@defstruct[(link-element element) ([tag tag?])]{
|
||||||
|
|
||||||
Hyperlinks the content to @racket[_tag].
|
Represents a hyperlink to @racket[_tag].
|
||||||
|
|
||||||
|
Normally, the content of the element is rendered as the hyperlink.
|
||||||
When @racket[_tag] is a part tag and the content of the element is
|
When @racket[_tag] is a part tag and the content of the element is
|
||||||
@racket[null], then the hyperlink uses the target part's number and/or
|
@racket[null], however, rendering is treated specially based on the
|
||||||
title as the content. In that case, if the section number is preceded
|
@racket[_mode] value of a @racket[link-render-style] @tech{style
|
||||||
by a word, the word starts in uppercase if the element's style includes a
|
property}:
|
||||||
@racket['uppercase] property.
|
|
||||||
|
|
||||||
The following symbol is recognized as a @tech{style property}:
|
@itemlist[
|
||||||
|
|
||||||
|
@item{For HTML output, in the @racket['default] mode, the generated
|
||||||
|
reference is the hyperlinked title of the elements in the
|
||||||
|
section's title content, except that elements with the
|
||||||
|
@racket['aux] @tech{style property} are omitted in the
|
||||||
|
hyperlink label.
|
||||||
|
|
||||||
|
In @racket['number] mode, the section title is not shown.
|
||||||
|
Instead, the word ``section'' is shown followed by a
|
||||||
|
hyperlinked section number. The word ``section'' starts in
|
||||||
|
uppercase if the element's style includes a @racket['uppercase]
|
||||||
|
property.}
|
||||||
|
|
||||||
|
@item{For Latex/PDF output, the generated reference's format can
|
||||||
|
depend on the document style in addition the @racket[_mode].
|
||||||
|
For the @racket['default] mode and a default document style, a
|
||||||
|
section number is shown by the word ``section'' followed by the
|
||||||
|
section number, and the word ``section'' and the section number
|
||||||
|
are together hyperlinked. The word ``section'' starts in
|
||||||
|
uppercase if the element's style includes a @racket['uppercase]
|
||||||
|
property. The @racketmodname[scribble/manual] style uses the
|
||||||
|
symbol ``§'' in place of the word ``section''.
|
||||||
|
|
||||||
|
In @racket['number] mode, rendering is the same, except that
|
||||||
|
only the number is hyperlinked, not the word ``section'' or
|
||||||
|
the ``§'' symbol.
|
||||||
|
|
||||||
|
A new document style can customize Latex/PDF output (see
|
||||||
|
@secref["config"]) by redefining the @ltx{SecRefLocal}, @|etc|,
|
||||||
|
macros (see @secref["builtin-latex"]). The @ltx{SecRef},
|
||||||
|
@|etc|, variants are used in @racket['number] mode.}
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
If a @racket[link-render-style] @tech{style property} is not attached
|
||||||
|
to a @racket[link-element] that refers to a part, a
|
||||||
|
@racket[link-render-style] @tech{style property} that is attached to
|
||||||
|
an enclosing part is used, since attaching a
|
||||||
|
@racket[link-render-style] @tech{style property} to a part causes
|
||||||
|
@racket[current-link-render-style] to be set while rendering the part.
|
||||||
|
Otherwise, the render-time value of @racket[current-link-render-style]
|
||||||
|
determine's a @racket[link-element]'s rendering.
|
||||||
|
|
||||||
|
The following style properties are recognized in addition to the style
|
||||||
|
properties for all @racket[element]s:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['indirect-link] --- For HTML output, treats the link as
|
@item{@racket[link-render-style] structure --- As described above.}
|
||||||
|
|
||||||
|
@item{@indexed-racket['indirect-link] --- For HTML output, treats the link as
|
||||||
``external''. When rendering to HTML and the
|
``external''. When rendering to HTML and the
|
||||||
@method[render-mixin set-external-tag-path] method is called to
|
@method[render-mixin set-external-tag-path] method is called to
|
||||||
provide an external-link URL, then the resolution of the
|
provide an external-link URL, then the resolution of the
|
||||||
|
@ -982,7 +1056,9 @@ The following symbol is recognized as a @tech{style property}:
|
||||||
some cases, patched by JavaScript when the documentation is
|
some cases, patched by JavaScript when the documentation is
|
||||||
viewed in a browser).}
|
viewed in a browser).}
|
||||||
|
|
||||||
]}
|
]
|
||||||
|
|
||||||
|
@history[#:changed "1.26" @elem{Added @racket[link-render-style] support.}]}
|
||||||
|
|
||||||
|
|
||||||
@defstruct[(index-element element) ([tag tag?]
|
@defstruct[(index-element element) ([tag tag?]
|
||||||
|
@ -1119,7 +1195,7 @@ reverse order):
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@history[#:changed "6.4" @elem{Added @racket[(list/c string? string?)]
|
@history[#:changed "1.1" @elem{Added @racket[(list/c string? string?)]
|
||||||
number items for
|
number items for
|
||||||
@tech{numberer}-generated section
|
@tech{numberer}-generated section
|
||||||
numbers.}]}
|
numbers.}]}
|
||||||
|
@ -1176,26 +1252,26 @@ The following are recognized as cell-@tech{style properties}:
|
||||||
|
|
||||||
@itemize[
|
@itemize[
|
||||||
|
|
||||||
@item{@racket['left] --- Left-align the cell content.}
|
@item{@indexed-racket['left] --- Left-align the cell content.}
|
||||||
|
|
||||||
@item{@racket['right] --- Right-align the cell content top baselines.}
|
@item{@indexed-racket['right] --- Right-align the cell content top baselines.}
|
||||||
|
|
||||||
@item{@racket['center] --- Center the cell content horizontally.}
|
@item{@indexed-racket['center] --- Center the cell content horizontally.}
|
||||||
|
|
||||||
@item{@racket['top] --- Top-align the cell content.}
|
@item{@indexed-racket['top] --- Top-align the cell content.}
|
||||||
|
|
||||||
@item{@racket['baseline] --- Align the cell content top baselines.}
|
@item{@indexed-racket['baseline] --- Align the cell content top baselines.}
|
||||||
|
|
||||||
@item{@racket['bottom] --- bottom-align the cell content.}
|
@item{@indexed-racket['bottom] --- bottom-align the cell content.}
|
||||||
|
|
||||||
@item{@racket['vcenter] --- Center the cell content vertically.}
|
@item{@indexed-racket['vcenter] --- Center the cell content vertically.}
|
||||||
|
|
||||||
@item{@racket['border] --- Draw a line around all sides of the
|
@item{@indexed-racket['border] --- Draw a line around all sides of the
|
||||||
cell. Borders along a shared edge of adjacent cells are
|
cell. Borders along a shared edge of adjacent cells are
|
||||||
collapsed into a single line.}
|
collapsed into a single line.}
|
||||||
|
|
||||||
@item{@racket['left-border], @racket['right-border],
|
@item{@indexed-racket['left-border], @indexed-racket['right-border],
|
||||||
@racket['top-border], or @racket['bottom-border] --- Draw a
|
@indexed-racket['top-border], or @indexed-racket['bottom-border] --- Draw a
|
||||||
line along the corresponding side of the cell (with the same
|
line along the corresponding side of the cell (with the same
|
||||||
border collapsing as for @racket['border]).}
|
border collapsing as for @racket['border]).}
|
||||||
|
|
||||||
|
@ -1354,7 +1430,7 @@ Return @racket[#t] if @racket[v] is @racket[#f], an exact non-negative
|
||||||
integer, a string, or a list containing two strings. See @racket[collected-info]
|
integer, a string, or a list containing two strings. See @racket[collected-info]
|
||||||
for information on how different representations are used for numbering.
|
for information on how different representations are used for numbering.
|
||||||
|
|
||||||
@history[#:added "6.4"]}
|
@history[#:added "1.1"]}
|
||||||
|
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
|
@ -1409,7 +1485,38 @@ number for each subsection. If @racket[numberer-step] produces a plain
|
||||||
string for the rendered number, then it is not added as a prefix to
|
string for the rendered number, then it is not added as a prefix to
|
||||||
subsection numbers. See also @racket[collected-info].
|
subsection numbers. See also @racket[collected-info].
|
||||||
|
|
||||||
@history[#:added "6.4"]}
|
@history[#:added "1.1"]}
|
||||||
|
|
||||||
|
|
||||||
|
@defstruct[link-render-style ([mode (or/c 'default 'number)])]{
|
||||||
|
|
||||||
|
Used as a @tech{style property} for a @racket[part] or a specific
|
||||||
|
@racket[link-element] to control the way that a hyperlink is rendered
|
||||||
|
for a part via @racket[secref] or for a figure via @racket[figure-ref]
|
||||||
|
from @racketmodname[scriblib/figure].
|
||||||
|
|
||||||
|
The @racket['default] and @racket['number] modes represent generic
|
||||||
|
hyperlink-style configurations that could make sense for various kinds
|
||||||
|
of references. The @racket['number] style is intended to mean that a
|
||||||
|
specific number is shown for the reference and that only the number is
|
||||||
|
hyperlinked. The @racket['default] style is more flexible, allowing a
|
||||||
|
more appropriate choice for the rendering context, such as using the
|
||||||
|
target section's name for a hyperlink in HTML.
|
||||||
|
|
||||||
|
@history[#:added "1.26"]}
|
||||||
|
|
||||||
|
|
||||||
|
@defparam[current-link-render-style style link-render-style?]{
|
||||||
|
|
||||||
|
A parameter that determines the default rendering style for a section
|
||||||
|
link.
|
||||||
|
|
||||||
|
When a @racket[part] has a @racket[link-render-style] as one of its
|
||||||
|
@tech{style properties}, then the @racket[current-link-render-style]
|
||||||
|
parameter is set during the @tech{resolve pass} and @tech{render pass}
|
||||||
|
for the @racket[part]'s content.
|
||||||
|
|
||||||
|
@history[#:added "1.26"]}
|
||||||
|
|
||||||
|
|
||||||
@defstruct[collect-info ([fp any/c] [ht any/c] [ext-ht any/c]
|
@defstruct[collect-info ([fp any/c] [ht any/c] [ext-ht any/c]
|
||||||
|
|
|
@ -94,8 +94,15 @@ parsing. Instances of @racket[section] trigger are used as-is as
|
||||||
subsections, and instances of @racket[paragraph] and other
|
subsections, and instances of @racket[paragraph] and other
|
||||||
flow-element datatypes are used as-is in the enclosing flow.
|
flow-element datatypes are used as-is in the enclosing flow.
|
||||||
|
|
||||||
|
As a part is decoded, as long as the style for the part does not
|
||||||
|
include the @tech{style property} @racket['hidden] or
|
||||||
|
@racket['no-index], an entry is added to the document index for the
|
||||||
|
part's title.
|
||||||
|
|
||||||
Portions of @racket[lst] are within a part are decoded using
|
Portions of @racket[lst] are within a part are decoded using
|
||||||
@racket[decode-flow].}
|
@racket[decode-flow].
|
||||||
|
|
||||||
|
@history[#:changed "1.25" @elem{Added @racket['no-index] support.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(decode-part [lst (listof pre-part?)]
|
@defproc[(decode-part [lst (listof pre-part?)]
|
||||||
|
|
|
@ -177,10 +177,11 @@ As an example,
|
||||||
@codeblock|{
|
@codeblock|{
|
||||||
#lang scribble/manual
|
#lang scribble/manual
|
||||||
@(require racket/sandbox
|
@(require racket/sandbox
|
||||||
scribble/eval)
|
scribble/example)
|
||||||
@(define my-evaluator
|
@(define my-evaluator
|
||||||
(parameterize ([sandbox-output 'string]
|
(parameterize ([sandbox-output 'string]
|
||||||
[sandbox-error-output 'string])
|
[sandbox-error-output 'string]
|
||||||
|
[sandbox-memory-limit 50])
|
||||||
(make-evaluator 'typed/racket/base)))
|
(make-evaluator 'typed/racket/base)))
|
||||||
|
|
||||||
@examples[#:eval my-evaluator
|
@examples[#:eval my-evaluator
|
||||||
|
|
|
@ -58,7 +58,7 @@ includes a citation to section 8 of the Racket reference.
|
||||||
(code:line #:date=? date-compare-expr)
|
(code:line #:date=? date-compare-expr)
|
||||||
(code:line #:cite-author cite-author-id)
|
(code:line #:cite-author cite-author-id)
|
||||||
(code:line #:cite-year cite-year-id)])
|
(code:line #:cite-year cite-year-id)])
|
||||||
#:contracts ([style-expr (or/c author+date-style number-style)]
|
#:contracts ([style-expr (or/c number-style author+date-style author+date-square-bracket-style)]
|
||||||
[spaces-expr number?]
|
[spaces-expr number?]
|
||||||
[disambiguator-expr (or/c #f (-> exact-nonnegative-integer? element?))]
|
[disambiguator-expr (or/c #f (-> exact-nonnegative-integer? element?))]
|
||||||
[render-date-expr (or/c #f (-> date? element?))]
|
[render-date-expr (or/c #f (-> date? element?))]
|
||||||
|
@ -144,10 +144,16 @@ optionally given @racket[render-date-expr] functions.
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
@defthing[author+date-style any/c]
|
@defthing[author+date-style any/c]
|
||||||
|
@defthing[author+date-square-bracket-style any/c]
|
||||||
@defthing[number-style any/c]
|
@defthing[number-style any/c]
|
||||||
)]{
|
)]{
|
||||||
|
|
||||||
Styles for use with @racket[define-cite].}
|
Styles for use with @racket[define-cite].
|
||||||
|
|
||||||
|
The @racket[author+date-square-bracket-style] definition is the same
|
||||||
|
as @racket[author+date-style], except that references to citations
|
||||||
|
are enclosed in @litchar["[]"] instead of @litchar["()"].
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(bib? [v any/c]) boolean?]{
|
@defproc[(bib? [v any/c]) boolean?]{
|
||||||
|
|
|
@ -15,21 +15,29 @@
|
||||||
@defproc[(figure [tag string?] [caption content?]
|
@defproc[(figure [tag string?] [caption content?]
|
||||||
[p pre-flow?] ...
|
[p pre-flow?] ...
|
||||||
[#:style style style? center-figure-style]
|
[#:style style style? center-figure-style]
|
||||||
|
[#:label-sep label-sep pre-content? ": "]
|
||||||
|
[#:label-style label-style element-style? #f]
|
||||||
[#:continue? continue? any/c #f])
|
[#:continue? continue? any/c #f])
|
||||||
block?]
|
block?]
|
||||||
@defproc[(figure* [tag string?] [caption content?]
|
@defproc[(figure* [tag string?] [caption content?]
|
||||||
[p pre-flow?] ...
|
[p pre-flow?] ...
|
||||||
[#:style style style? center-figure-style]
|
[#:style style style? center-figure-style]
|
||||||
[#:continue? continue? any/c #f])
|
[#:label-sep label-sep pre-content? ": "]
|
||||||
|
[#:label-style label-style element-style? #f]
|
||||||
|
[#:continue? continue? any/c #f])
|
||||||
block?]
|
block?]
|
||||||
@defproc[(figure** [tag string?] [caption content?]
|
@defproc[(figure** [tag string?] [caption content?]
|
||||||
[p pre-flow?] ...
|
[p pre-flow?] ...
|
||||||
[#:style style style? center-figure-style]
|
[#:style style style? center-figure-style]
|
||||||
|
[#:label-sep label-sep pre-content? ": "]
|
||||||
|
[#:label-style label-style element-style? #f]
|
||||||
[#:continue? continue? any/c #f])
|
[#:continue? continue? any/c #f])
|
||||||
block?]
|
block?]
|
||||||
@defproc[(figure-here [tag string?] [caption content?]
|
@defproc[(figure-here [tag string?] [caption content?]
|
||||||
[pre-flow pre-flow?] ...
|
[pre-flow pre-flow?] ...
|
||||||
[#:style style style? center-figure-style]
|
[#:style style style? center-figure-style]
|
||||||
|
[#:label-sep label-sep pre-content? ": "]
|
||||||
|
[#:label-style label-style element-style? #f]
|
||||||
[#:continue? continue? any/c #f])
|
[#:continue? continue? any/c #f])
|
||||||
block?]
|
block?]
|
||||||
)]{
|
)]{
|
||||||
|
@ -52,8 +60,18 @@ By default, @racket[style] is set so that the content of the figure is
|
||||||
centered. Use @racket[left-figure-style], @racket[center-figure-style],
|
centered. Use @racket[left-figure-style], @racket[center-figure-style],
|
||||||
or @racket[right-figure-style] to specify the alignment.
|
or @racket[right-figure-style] to specify the alignment.
|
||||||
|
|
||||||
|
The @racket[label-sep] and @racket[label-style] arguments adjust the
|
||||||
|
way that the caption's label is shown. By default, the label is the
|
||||||
|
word ``Figure'' followed by a space, the figure number, ``:'', and a
|
||||||
|
space, but @racket[label-sep] can specify an alternative to the ``:''
|
||||||
|
and ending space. The composed label is given the style specified by
|
||||||
|
@racket[label-style].
|
||||||
|
|
||||||
If @racket[continue?] is a true value, then the figure counter is not
|
If @racket[continue?] is a true value, then the figure counter is not
|
||||||
incremented.}
|
incremented.
|
||||||
|
|
||||||
|
@history[#:changed "1.24" @elem{Added the @racket[#:label-sep] and
|
||||||
|
@racket[#:label-style] arguments.}]}
|
||||||
|
|
||||||
@deftogether[(
|
@deftogether[(
|
||||||
@defthing[left-figure-style style?]
|
@defthing[left-figure-style style?]
|
||||||
|
@ -67,14 +85,28 @@ The @racket[left] binding is a synonym for @racket[left-figure-style],
|
||||||
provided for backward compatibility.}
|
provided for backward compatibility.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(figure-ref [tag string?] ...+) element?]{
|
@defproc[(figure-ref [tag string?] ...+
|
||||||
|
[#:link-render-style link-style (or/c link-render-style? #f)])
|
||||||
|
element?]{
|
||||||
|
|
||||||
Generates a reference to one or more figures, using a lowercase word ``figure''.}
|
Generates a reference to one or more figures, using a lowercase word ``figure''.
|
||||||
|
|
||||||
|
If @racket[link-style] or @racket[(current-link-render-style)] at the
|
||||||
|
time of rendering indicates the @racket['number] style mode, then the
|
||||||
|
word ``figure'' itself is not hyperlinked. Otherwise, the word
|
||||||
|
@racket[figure] is hyperlinked together with the referenced figure's
|
||||||
|
number.
|
||||||
|
|
||||||
|
@history[#:changed "1.26" @elem{Added the @racket[#:link-render-style] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(Figure-ref [tag string?] ...+) element?]{
|
@defproc[(Figure-ref [tag string?] ...+
|
||||||
|
[#:link-render-style link-style (or/c link-render-style? #f)])
|
||||||
|
element?]{
|
||||||
|
|
||||||
Generates a reference to one or more figures, capitalizing the word ``Figure''.}
|
Like @racket[figure-ref], but capitalizes the word ``Figure''.
|
||||||
|
|
||||||
|
@history[#:changed "1.26" @elem{Added the @racket[#:link-render-style] argument.}]}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(Figure-target [tag string?]
|
@defproc[(Figure-target [tag string?]
|
||||||
|
|
|
@ -23,4 +23,4 @@
|
||||||
|
|
||||||
(define pkg-authors '(mflatt eli))
|
(define pkg-authors '(mflatt eli))
|
||||||
|
|
||||||
(define version "1.22")
|
(define version "1.26")
|
||||||
|
|
|
@ -70,13 +70,14 @@
|
||||||
[acmConference
|
[acmConference
|
||||||
(-> string? string? string? block?)]
|
(-> string? string? string? block?)]
|
||||||
[grantsponsor
|
[grantsponsor
|
||||||
(-> string? string? string? block?)]
|
(-> string? string? string? content?)]
|
||||||
[grantnum
|
[grantnum
|
||||||
(->* (string? string?) (#:url string?) block?)]
|
(->* (string? string?) (#:url string?) content?)]
|
||||||
[acmBadgeR (->* (string?) (#:url string?) block?)]
|
[acmBadgeR (->* (string?) (#:url string?) block?)]
|
||||||
[acmBadgeL (->* (string?) (#:url string?) block?)]
|
[acmBadgeL (->* (string?) (#:url string?) block?)]
|
||||||
[received (->* (string?) (#:stage string?) block?)]
|
[received (->* (string?) (#:stage string?) block?)]
|
||||||
[citestyle (-> content? block?)]
|
[citestyle (-> content? block?)]
|
||||||
|
[ccsdesc (->* (string?) (#:number exact-integer?) block?)]
|
||||||
[CCSXML
|
[CCSXML
|
||||||
(->* () () #:rest (listof pre-content?)
|
(->* () () #:rest (listof pre-content?)
|
||||||
any/c)])
|
any/c)])
|
||||||
|
@ -105,7 +106,7 @@
|
||||||
(define-syntax-rule (define-environments name ...)
|
(define-syntax-rule (define-environments name ...)
|
||||||
(begin
|
(begin
|
||||||
(begin
|
(begin
|
||||||
(provide/contract [name (->* () () #:rest (listof pre-content?)
|
(provide/contract [name (->* () () #:rest (listof pre-flow?)
|
||||||
block?)])
|
block?)])
|
||||||
(define (name . str)
|
(define (name . str)
|
||||||
(make-nested-flow (make-style (symbol->string 'name) acmart-extras)
|
(make-nested-flow (make-style (symbol->string 'name) acmart-extras)
|
||||||
|
@ -116,7 +117,7 @@
|
||||||
(define-syntax-rule (define-comment-environments name ...)
|
(define-syntax-rule (define-comment-environments name ...)
|
||||||
(begin
|
(begin
|
||||||
(begin
|
(begin
|
||||||
(provide/contract [name (->* () () #:rest (listof pre-content?)
|
(provide/contract [name (->* () () #:rest (listof pre-flow?)
|
||||||
block?)])
|
block?)])
|
||||||
(define (name . str)
|
(define (name . str)
|
||||||
(make-nested-flow (make-style (symbol->string 'name) acmart-extras)
|
(make-nested-flow (make-style (symbol->string 'name) acmart-extras)
|
||||||
|
@ -162,39 +163,37 @@
|
||||||
(decode-string venue)))))
|
(decode-string venue)))))
|
||||||
|
|
||||||
(define (grantsponsor id name url)
|
(define (grantsponsor id name url)
|
||||||
(make-paragraph (make-style 'pretitle '())
|
(make-multiarg-element (make-style "grantsponsor" multicommand-props)
|
||||||
(make-multiarg-element (make-style "grantsponsor" multicommand-props)
|
(list (decode-string id)
|
||||||
(list (decode-string id)
|
(decode-string name)
|
||||||
(decode-string name)
|
(decode-string url))))
|
||||||
(decode-string url)))))
|
|
||||||
|
|
||||||
(define (grantnum #:url [url #f] id num)
|
(define (grantnum #:url [url #f] id num)
|
||||||
(make-paragraph (make-style 'pretitle '())
|
(if url
|
||||||
(if url
|
(make-multiarg-element (make-style "SgrantnumURL" multicommand-props)
|
||||||
(make-multiarg-element (make-style "SgrantnumURL" multicommand-props)
|
(list (decode-string url)
|
||||||
(list (decode-string url)
|
(decode-string id)
|
||||||
(decode-string id)
|
(decode-string num)))
|
||||||
(decode-string num)))
|
(make-multiarg-element (make-style "grantnum" multicommand-props)
|
||||||
(make-multiarg-element (make-style "grantnum" multicommand-props)
|
(list (decode-string id)
|
||||||
(list (decode-string id)
|
(decode-string num)))))
|
||||||
(decode-string num))))))
|
|
||||||
|
|
||||||
(define (acmBadgeR #:url [url #f] str)
|
(define (acmBadgeR #:url [url #f] str)
|
||||||
(make-paragraph (make-style 'pretitle '())
|
(make-paragraph (make-style 'pretitle '())
|
||||||
(if url
|
(if url
|
||||||
(make-multiarg-element (make-style "SacmBadgeRURL" multicommand-props)
|
(make-multiarg-element (make-style "SacmBadgeRURL" (cons 'exact-chars multicommand-props))
|
||||||
(list (decode-string url)
|
(list (decode-string url)
|
||||||
(decode-string str)))
|
(decode-string str)))
|
||||||
(make-element (make-style "acmBadgeR" command-props)
|
(make-element (make-style "acmBadgeR" (cons 'exact-chars command-props))
|
||||||
(decode-string str)))))
|
(decode-string str)))))
|
||||||
|
|
||||||
(define (acmBadgeL #:url [url #f] str)
|
(define (acmBadgeL #:url [url #f] str)
|
||||||
(make-paragraph (make-style 'pretitle '())
|
(make-paragraph (make-style 'pretitle '())
|
||||||
(if url
|
(if url
|
||||||
(make-multiarg-element (make-style "SacmBadgeLURL" multicommand-props)
|
(make-multiarg-element (make-style "SacmBadgeLURL" (cons 'exact-chars multicommand-props))
|
||||||
(list (decode-string url)
|
(list (decode-string url)
|
||||||
(decode-string str)))
|
(decode-string str)))
|
||||||
(make-element (make-style "acmBadgeL" command-props)
|
(make-element (make-style "acmBadgeL" (cons 'exact-chars command-props))
|
||||||
(decode-string str)))))
|
(decode-string str)))))
|
||||||
|
|
||||||
(define (received #:stage [s #f] str)
|
(define (received #:stage [s #f] str)
|
||||||
|
@ -214,10 +213,10 @@
|
||||||
(define (ccsdesc #:number [n #f] str)
|
(define (ccsdesc #:number [n #f] str)
|
||||||
(make-paragraph (make-style 'pretitle '())
|
(make-paragraph (make-style 'pretitle '())
|
||||||
(if n
|
(if n
|
||||||
(make-multiarg-element (make-style "SccsdescNumber" multicommand-props)
|
(make-multiarg-element (make-style "SccsdescNumber" (cons 'exact-chars multicommand-props))
|
||||||
(list (number->string n)
|
(list (number->string n)
|
||||||
(decode-string str)))
|
(decode-string str)))
|
||||||
(make-element (make-style "ccsdesc" command-props)
|
(make-element (make-style "ccsdesc" (cons 'exact-chars command-props))
|
||||||
(decode-string str)))))
|
(decode-string str)))))
|
||||||
|
|
||||||
(define (title #:tag [tag #f]
|
(define (title #:tag [tag #f]
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
% BEGIN acmart-load.tex
|
||||||
% Avoid package option conflict
|
% Avoid package option conflict
|
||||||
\renewcommand\packageColor\relax
|
\renewcommand\packageColor\relax
|
||||||
|
\renewcommand\packageTocstyle\relax
|
||||||
\let\Footnote\undefined
|
\let\Footnote\undefined
|
||||||
\let\captionwidth\undefined
|
\let\captionwidth\undefined
|
||||||
|
\renewcommand{\renewrmdefault}{}
|
||||||
|
% END acmart-load.tex
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
%% Right brace \} Tilde \~}
|
%% Right brace \} Tilde \~}
|
||||||
\NeedsTeXFormat{LaTeX2e}
|
\NeedsTeXFormat{LaTeX2e}
|
||||||
\ProvidesClass{acmart}
|
\ProvidesClass{acmart}
|
||||||
[2017/05/14 v1.39 Typesetting articles for Association of
|
[2017/09/16 v1.48 Typesetting articles for the Association for
|
||||||
Computing Machinery]
|
Computing Machinery]
|
||||||
\def\@classname{acmart}
|
\def\@classname{acmart}
|
||||||
\InputIfFileExists{acmart-preload-hook.tex}{%
|
\InputIfFileExists{acmart-preload-hook.tex}{%
|
||||||
|
@ -68,15 +68,24 @@ Computing Machinery]
|
||||||
\PackageInfo{\@classname}{Using screen mode}%
|
\PackageInfo{\@classname}{Using screen mode}%
|
||||||
\else
|
\else
|
||||||
\PackageInfo{\@classname}{Not using screen mode}%
|
\PackageInfo{\@classname}{Not using screen mode}%
|
||||||
\fi}{\PackageError{\@classname}{Option screen can be either true or
|
\fi}{\PackageError{\@classname}{The option screen can be either true or
|
||||||
false}}
|
false}}
|
||||||
\ExecuteOptionsX{screen=false}
|
\ExecuteOptionsX{screen=false}
|
||||||
|
\define@boolkey+{acmart.cls}[@ACM@]{acmthm}[true]{%
|
||||||
|
\if@ACM@acmthm
|
||||||
|
\PackageInfo{\@classname}{Requiring acmthm}%
|
||||||
|
\else
|
||||||
|
\PackageInfo{\@classname}{Suppressing acmthm}%
|
||||||
|
\fi}{\PackageError{\@classname}{The option acmthm can be either true or
|
||||||
|
false}}
|
||||||
|
\ExecuteOptionsX{acmthm=true}
|
||||||
\define@boolkey+{acmart.cls}[@ACM@]{review}[true]{%
|
\define@boolkey+{acmart.cls}[@ACM@]{review}[true]{%
|
||||||
\if@ACM@review
|
\if@ACM@review
|
||||||
\PackageInfo{\@classname}{Using review mode}%
|
\PackageInfo{\@classname}{Using review mode}%
|
||||||
|
\AtBeginDocument{\@ACM@printfoliostrue}%
|
||||||
\else
|
\else
|
||||||
\PackageInfo{\@classname}{Not using review mode}%
|
\PackageInfo{\@classname}{Not using review mode}%
|
||||||
\fi}{\PackageError{\@classname}{Option review can be either true or
|
\fi}{\PackageError{\@classname}{The option review can be either true or
|
||||||
false}}
|
false}}
|
||||||
\ExecuteOptionsX{review=false}
|
\ExecuteOptionsX{review=false}
|
||||||
\define@boolkey+{acmart.cls}[@ACM@]{authorversion}[true]{%
|
\define@boolkey+{acmart.cls}[@ACM@]{authorversion}[true]{%
|
||||||
|
@ -84,7 +93,7 @@ Computing Machinery]
|
||||||
\PackageInfo{\@classname}{Using authorversion mode}%
|
\PackageInfo{\@classname}{Using authorversion mode}%
|
||||||
\else
|
\else
|
||||||
\PackageInfo{\@classname}{Not using authorversion mode}%
|
\PackageInfo{\@classname}{Not using authorversion mode}%
|
||||||
\fi}{\PackageError{\@classname}{Option authorversion can be either true or
|
\fi}{\PackageError{\@classname}{The option authorversion can be either true or
|
||||||
false}}
|
false}}
|
||||||
\ExecuteOptionsX{authorversion=false}
|
\ExecuteOptionsX{authorversion=false}
|
||||||
\define@boolkey+{acmart.cls}[@ACM@]{natbib}[true]{%
|
\define@boolkey+{acmart.cls}[@ACM@]{natbib}[true]{%
|
||||||
|
@ -92,7 +101,7 @@ Computing Machinery]
|
||||||
\PackageInfo{\@classname}{Explicitly selecting natbib mode}%
|
\PackageInfo{\@classname}{Explicitly selecting natbib mode}%
|
||||||
\else
|
\else
|
||||||
\PackageInfo{\@classname}{Explicitly deselecting natbib mode}%
|
\PackageInfo{\@classname}{Explicitly deselecting natbib mode}%
|
||||||
\fi}{\PackageError{\@classname}{Option natbib can be either true or
|
\fi}{\PackageError{\@classname}{The option natbib can be either true or
|
||||||
false}}
|
false}}
|
||||||
\ExecuteOptionsX{natbib=true}
|
\ExecuteOptionsX{natbib=true}
|
||||||
\define@boolkey+{acmart.cls}[@ACM@]{anonymous}[true]{%
|
\define@boolkey+{acmart.cls}[@ACM@]{anonymous}[true]{%
|
||||||
|
@ -100,7 +109,7 @@ Computing Machinery]
|
||||||
\PackageInfo{\@classname}{Using anonymous mode}%
|
\PackageInfo{\@classname}{Using anonymous mode}%
|
||||||
\else
|
\else
|
||||||
\PackageInfo{\@classname}{Not using anonymous mode}%
|
\PackageInfo{\@classname}{Not using anonymous mode}%
|
||||||
\fi}{\PackageError{\@classname}{Option anonymous can be either true or
|
\fi}{\PackageError{\@classname}{The option anonymous can be either true or
|
||||||
false}}
|
false}}
|
||||||
\ExecuteOptionsX{anonymous=false}
|
\ExecuteOptionsX{anonymous=false}
|
||||||
\define@boolkey+{acmart.cls}[@ACM@]{timestamp}[true]{%
|
\define@boolkey+{acmart.cls}[@ACM@]{timestamp}[true]{%
|
||||||
|
@ -108,7 +117,7 @@ Computing Machinery]
|
||||||
\PackageInfo{\@classname}{Using timestamp mode}%
|
\PackageInfo{\@classname}{Using timestamp mode}%
|
||||||
\else
|
\else
|
||||||
\PackageInfo{\@classname}{Not using timestamp mode}%
|
\PackageInfo{\@classname}{Not using timestamp mode}%
|
||||||
\fi}{\PackageError{\@classname}{Option timestamp can be either true or
|
\fi}{\PackageError{\@classname}{The option timestamp can be either true or
|
||||||
false}}
|
false}}
|
||||||
\ExecuteOptionsX{timestamp=false}
|
\ExecuteOptionsX{timestamp=false}
|
||||||
\define@boolkey+{acmart.cls}[@ACM@]{authordraft}[true]{%
|
\define@boolkey+{acmart.cls}[@ACM@]{authordraft}[true]{%
|
||||||
|
@ -118,7 +127,7 @@ Computing Machinery]
|
||||||
\@ACM@reviewtrue
|
\@ACM@reviewtrue
|
||||||
\else
|
\else
|
||||||
\PackageInfo{\@classname}{Not using authordraft mode}%
|
\PackageInfo{\@classname}{Not using authordraft mode}%
|
||||||
\fi}{\PackageError{\@classname}{Option authordraft can be either true or
|
\fi}{\PackageError{\@classname}{The option authordraft can be either true or
|
||||||
false}}
|
false}}
|
||||||
\ExecuteOptionsX{authordraft=false}
|
\ExecuteOptionsX{authordraft=false}
|
||||||
\def\ACM@fontsize{}
|
\def\ACM@fontsize{}
|
||||||
|
@ -134,7 +143,7 @@ Computing Machinery]
|
||||||
\newif\if@ACM@journal
|
\newif\if@ACM@journal
|
||||||
\newif\if@ACM@sigchiamode
|
\newif\if@ACM@sigchiamode
|
||||||
\ifnum\ACM@format@nr=5\relax % siggraph
|
\ifnum\ACM@format@nr=5\relax % siggraph
|
||||||
\ClassWarning{\@classname}{The format `siggraph' is now obsolete.
|
\ClassWarning{\@classname}{The format siggraph is now obsolete.
|
||||||
I am switching to sigconf.}
|
I am switching to sigconf.}
|
||||||
\setkeys{acmart.cls}{format=sigconf}
|
\setkeys{acmart.cls}{format=sigconf}
|
||||||
\fi
|
\fi
|
||||||
|
@ -190,12 +199,31 @@ Computing Machinery]
|
||||||
\ClassInfo{\@classname}{Using fontsize \ACM@fontsize}
|
\ClassInfo{\@classname}{Using fontsize \ACM@fontsize}
|
||||||
\LoadClass[\ACM@fontsize, reqno]{amsart}
|
\LoadClass[\ACM@fontsize, reqno]{amsart}
|
||||||
\RequirePackage{microtype}
|
\RequirePackage{microtype}
|
||||||
|
\ifcase\ACM@format@nr
|
||||||
|
\relax % manuscript
|
||||||
|
\or % acmsmall
|
||||||
|
\or % acmlarge
|
||||||
|
\or % acmtog
|
||||||
|
\RequirePackage{flushend}
|
||||||
|
\or % sigconf
|
||||||
|
\RequirePackage{flushend}
|
||||||
|
\or % siggraph
|
||||||
|
\RequirePackage{flushend}
|
||||||
|
\or % sigplan
|
||||||
|
\RequirePackage{flushend}
|
||||||
|
\or % sigchi
|
||||||
|
\RequirePackage{flushend}
|
||||||
|
\or % sigchi-a
|
||||||
|
\fi
|
||||||
|
\RequirePackage{etoolbox}
|
||||||
|
\RequirePackage{refcount}
|
||||||
\RequirePackage{totpages}
|
\RequirePackage{totpages}
|
||||||
\RequirePackage{environ}
|
\RequirePackage{environ}
|
||||||
\if@ACM@manuscript
|
\if@ACM@manuscript
|
||||||
\RequirePackage{setspace}
|
\RequirePackage{setspace}
|
||||||
\onehalfspacing
|
\onehalfspacing
|
||||||
\fi
|
\fi
|
||||||
|
\RequirePackage{textcase}
|
||||||
\if@ACM@natbib
|
\if@ACM@natbib
|
||||||
\RequirePackage{natbib}
|
\RequirePackage{natbib}
|
||||||
\renewcommand{\bibsection}{%
|
\renewcommand{\bibsection}{%
|
||||||
|
@ -382,7 +410,7 @@ Computing Machinery]
|
||||||
\def\@svsechd{#4{\hskip #1\relax #5}}%
|
\def\@svsechd{#4{\hskip #1\relax #5}}%
|
||||||
\fi
|
\fi
|
||||||
\@xsect{#3}}
|
\@xsect{#3}}
|
||||||
\def\@starttoc#1#2{\begingroup
|
\def\@starttoc#1#2{\begingroup\makeatletter
|
||||||
\setTrue{#1}%
|
\setTrue{#1}%
|
||||||
\par\removelastskip\vskip\z@skip
|
\par\removelastskip\vskip\z@skip
|
||||||
\@startsection{section}\@M\z@{\linespacing\@plus\linespacing}%
|
\@startsection{section}\@M\z@{\linespacing\@plus\linespacing}%
|
||||||
|
@ -395,6 +423,7 @@ Computing Machinery]
|
||||||
\global\@nobreakfalse \endgroup
|
\global\@nobreakfalse \endgroup
|
||||||
\addvspace{32\p@\@plus14\p@}%
|
\addvspace{32\p@\@plus14\p@}%
|
||||||
}
|
}
|
||||||
|
\def\l@section{\@tocline{1}{0pt}{1pc}{2pc}{}}
|
||||||
\def\l@subsection{\@tocline{2}{0pt}{1pc}{3pc}{}}
|
\def\l@subsection{\@tocline{2}{0pt}{1pc}{3pc}{}}
|
||||||
\def\l@subsubsection{\@tocline{2}{0pt}{1pc}{5pc}{}}
|
\def\l@subsubsection{\@tocline{2}{0pt}{1pc}{5pc}{}}
|
||||||
\let\@footnotemark@nolink\@footnotemark
|
\let\@footnotemark@nolink\@footnotemark
|
||||||
|
@ -420,15 +449,16 @@ Computing Machinery]
|
||||||
\or % sigchi-a
|
\or % sigchi-a
|
||||||
\urlstyle{sf}
|
\urlstyle{sf}
|
||||||
\fi
|
\fi
|
||||||
\if@ACM@screen
|
\AtEndPreamble{%
|
||||||
\hypersetup{colorlinks,
|
\if@ACM@screen
|
||||||
linkcolor=ACMRed,
|
\hypersetup{colorlinks,
|
||||||
citecolor=ACMPurple,
|
linkcolor=ACMRed,
|
||||||
urlcolor=ACMDarkBlue,
|
citecolor=ACMPurple,
|
||||||
filecolor=ACMDarkBlue}
|
urlcolor=ACMDarkBlue,
|
||||||
\else
|
filecolor=ACMDarkBlue}
|
||||||
\hypersetup{hidelinks}
|
\else
|
||||||
\fi
|
\hypersetup{hidelinks}
|
||||||
|
\fi}
|
||||||
\if@ACM@natbib
|
\if@ACM@natbib
|
||||||
\let\citeN\cite
|
\let\citeN\cite
|
||||||
\let\cite\citep
|
\let\cite\citep
|
||||||
|
@ -476,55 +506,55 @@ Computing Machinery]
|
||||||
\ifcase\ACM@format@nr
|
\ifcase\ACM@format@nr
|
||||||
\relax % manuscript
|
\relax % manuscript
|
||||||
\geometry{letterpaper,head=13pt,
|
\geometry{letterpaper,head=13pt,
|
||||||
marginparwidth=6pc}%
|
marginparwidth=6pc,heightrounded}%
|
||||||
\or % acmsmall
|
\or % acmsmall
|
||||||
\geometry{twoside=true,
|
\geometry{twoside=true,
|
||||||
includeheadfoot, head=13pt, foot=2pc,
|
includeheadfoot, head=13pt, foot=2pc,
|
||||||
paperwidth=6.75in, paperheight=10in,
|
paperwidth=6.75in, paperheight=10in,
|
||||||
top=58pt, bottom=44pt, inner=46pt, outer=46pt,
|
top=58pt, bottom=44pt, inner=46pt, outer=46pt,
|
||||||
marginparwidth=2pc
|
marginparwidth=2pc,heightrounded
|
||||||
}%
|
}%
|
||||||
\or % acmlarge
|
\or % acmlarge
|
||||||
\geometry{twoside=true, head=13pt, foot=2pc,
|
\geometry{twoside=true, head=13pt, foot=2pc,
|
||||||
paperwidth=8.5in, paperheight=11in,
|
paperwidth=8.5in, paperheight=11in,
|
||||||
includeheadfoot,
|
includeheadfoot,
|
||||||
top=78pt, bottom=114pt, inner=81pt, outer=81pt,
|
top=78pt, bottom=114pt, inner=81pt, outer=81pt,
|
||||||
marginparwidth=4pc
|
marginparwidth=4pc,heightrounded
|
||||||
}%
|
}%
|
||||||
\or % acmtog
|
\or % acmtog
|
||||||
\geometry{twoside=true, head=13pt, foot=2pc,
|
\geometry{twoside=true, head=13pt, foot=2pc,
|
||||||
paperwidth=8.5in, paperheight=11in,
|
paperwidth=8.5in, paperheight=11in,
|
||||||
includeheadfoot, columnsep=24pt,
|
includeheadfoot, columnsep=24pt,
|
||||||
top=52pt, bottom=75pt, inner=52pt, outer=52pt,
|
top=52pt, bottom=75pt, inner=52pt, outer=52pt,
|
||||||
marginparwidth=2pc
|
marginparwidth=2pc,heightrounded
|
||||||
}%
|
}%
|
||||||
\or % sigconf
|
\or % sigconf
|
||||||
\geometry{twoside=true, head=13pt,
|
\geometry{twoside=true, head=13pt,
|
||||||
paperwidth=8.5in, paperheight=11in,
|
paperwidth=8.5in, paperheight=11in,
|
||||||
includeheadfoot, columnsep=2pc,
|
includeheadfoot, columnsep=2pc,
|
||||||
top=57pt, bottom=73pt, inner=54pt, outer=54pt,
|
top=57pt, bottom=73pt, inner=54pt, outer=54pt,
|
||||||
marginparwidth=2pc
|
marginparwidth=2pc,heightrounded
|
||||||
}%
|
}%
|
||||||
\or % siggraph
|
\or % siggraph
|
||||||
\geometry{twoside=true, head=13pt,
|
\geometry{twoside=true, head=13pt,
|
||||||
paperwidth=8.5in, paperheight=11in,
|
paperwidth=8.5in, paperheight=11in,
|
||||||
includeheadfoot, columnsep=2pc,
|
includeheadfoot, columnsep=2pc,
|
||||||
top=57pt, bottom=73pt, inner=54pt, outer=54pt,
|
top=57pt, bottom=73pt, inner=54pt, outer=54pt,
|
||||||
marginparwidth=2pc
|
marginparwidth=2pc,heightrounded
|
||||||
}%
|
}%
|
||||||
\or % sigplan
|
\or % sigplan
|
||||||
\geometry{twoside=true, head=13pt,
|
\geometry{twoside=true, head=13pt,
|
||||||
paperwidth=8.5in, paperheight=11in,
|
paperwidth=8.5in, paperheight=11in,
|
||||||
includeheadfoot=false, columnsep=2pc,
|
includeheadfoot=false, columnsep=2pc,
|
||||||
top=1in, bottom=1in, inner=0.75in, outer=0.75in,
|
top=1in, bottom=1in, inner=0.75in, outer=0.75in,
|
||||||
marginparwidth=2pc
|
marginparwidth=2pc,heightrounded
|
||||||
}%
|
}%
|
||||||
\or % sigchi
|
\or % sigchi
|
||||||
\geometry{twoside=true, head=13pt,
|
\geometry{twoside=true, head=13pt,
|
||||||
paperwidth=8.5in, paperheight=11in,
|
paperwidth=8.5in, paperheight=11in,
|
||||||
includeheadfoot, columnsep=2pc,
|
includeheadfoot, columnsep=2pc,
|
||||||
top=66pt, bottom=73pt, inner=54pt, outer=54pt,
|
top=66pt, bottom=73pt, inner=54pt, outer=54pt,
|
||||||
marginparwidth=2pc
|
marginparwidth=2pc,heightrounded
|
||||||
}%
|
}%
|
||||||
\or % sigchi-a
|
\or % sigchi-a
|
||||||
\geometry{twoside=false, head=13pt,
|
\geometry{twoside=false, head=13pt,
|
||||||
|
@ -555,6 +585,8 @@ Computing Machinery]
|
||||||
\hrule \@width \columnwidth \kern 2.6\p@}
|
\hrule \@width \columnwidth \kern 2.6\p@}
|
||||||
\RequirePackage{manyfoot}
|
\RequirePackage{manyfoot}
|
||||||
\SelectFootnoteRule[2]{copyrightpermission}
|
\SelectFootnoteRule[2]{copyrightpermission}
|
||||||
|
\DeclareNewFootnote{authorsaddresses}
|
||||||
|
\SelectFootnoteRule[2]{copyrightpermission}
|
||||||
\DeclareNewFootnote{copyrightpermission}
|
\DeclareNewFootnote{copyrightpermission}
|
||||||
\def\footnoterule{\kern-3\p@
|
\def\footnoterule{\kern-3\p@
|
||||||
\hrule \@width 4pc \kern 2.6\p@}
|
\hrule \@width 4pc \kern 2.6\p@}
|
||||||
|
@ -566,7 +598,7 @@ Computing Machinery]
|
||||||
\normalcolor
|
\normalcolor
|
||||||
\unvbox\@mpfootins
|
\unvbox\@mpfootins
|
||||||
\fi
|
\fi
|
||||||
\@minipagefalse %% added 24 May 89
|
\@minipagefalse
|
||||||
\color@endgroup
|
\color@endgroup
|
||||||
\egroup
|
\egroup
|
||||||
\expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
|
\expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}}
|
||||||
|
@ -601,18 +633,26 @@ Computing Machinery]
|
||||||
\RequirePackage{iftex}
|
\RequirePackage{iftex}
|
||||||
\ifPDFTeX
|
\ifPDFTeX
|
||||||
\input{glyphtounicode}
|
\input{glyphtounicode}
|
||||||
|
\pdfglyphtounicode{f_f}{FB00}
|
||||||
|
\pdfglyphtounicode{f_f_i}{FB03}
|
||||||
|
\pdfglyphtounicode{f_f_l}{FB04}
|
||||||
|
\pdfglyphtounicode{f_i}{FB01}
|
||||||
|
\pdfglyphtounicode{t_t}{00740074}
|
||||||
|
\pdfglyphtounicode{f_t}{00660074}
|
||||||
|
\pdfglyphtounicode{T_h}{00540068}
|
||||||
\pdfgentounicode=1
|
\pdfgentounicode=1
|
||||||
\fi
|
\fi
|
||||||
\RequirePackage{cmap}
|
\RequirePackage{cmap}
|
||||||
\newif\if@ACM@newfonts
|
\newif\if@ACM@newfonts
|
||||||
\@ACM@newfontstrue
|
\@ACM@newfontstrue
|
||||||
\IfFileExists{libertine.sty}{}{\ClassWarning{\@classname}{You do not
|
\IfFileExists{libertine.sty}{}{\ClassWarning{\@classname}{You do not
|
||||||
have libertine package installed. Please upgrade your
|
have the libertine package installed. Please upgrade your
|
||||||
TeX}\@ACM@newfontsfalse}
|
TeX}\@ACM@newfontsfalse}
|
||||||
\IfFileExists{zi4.sty}{}{\ClassWarning{\@classname}{You do not
|
\IfFileExists{zi4.sty}{}{\ClassWarning{\@classname}{You do not
|
||||||
have zi4 package installed. Please upgrade your TeX}\@ACM@newfontsfalse}
|
have the zi4 package installed. Please upgrade your
|
||||||
|
TeX}\@ACM@newfontsfalse}
|
||||||
\IfFileExists{newtxmath.sty}{}{\ClassWarning{\@classname}{You do not
|
\IfFileExists{newtxmath.sty}{}{\ClassWarning{\@classname}{You do not
|
||||||
have newtxmath package installed. Please upgrade your
|
have the newtxmath package installed. Please upgrade your
|
||||||
TeX}\@ACM@newfontsfalse}
|
TeX}\@ACM@newfontsfalse}
|
||||||
\if@ACM@newfonts
|
\if@ACM@newfonts
|
||||||
\RequirePackage[tt=false, type1=true]{libertine}
|
\RequirePackage[tt=false, type1=true]{libertine}
|
||||||
|
@ -620,6 +660,9 @@ Computing Machinery]
|
||||||
\RequirePackage[libertine]{newtxmath}
|
\RequirePackage[libertine]{newtxmath}
|
||||||
\RequirePackage[T1]{fontenc}
|
\RequirePackage[T1]{fontenc}
|
||||||
\fi
|
\fi
|
||||||
|
\let\liningnums\@undefined
|
||||||
|
\AtEndPreamble{%
|
||||||
|
\DeclareTextFontCommand{\liningnums}{\libertineLF}}
|
||||||
\if@ACM@sigchiamode
|
\if@ACM@sigchiamode
|
||||||
\renewcommand{\familydefault}{\sfdefault}
|
\renewcommand{\familydefault}{\sfdefault}
|
||||||
\fi
|
\fi
|
||||||
|
@ -627,7 +670,7 @@ Computing Machinery]
|
||||||
\captionsetup[table]{position=top}
|
\captionsetup[table]{position=top}
|
||||||
\if@ACM@journal
|
\if@ACM@journal
|
||||||
\captionsetup{labelfont={sf, small},
|
\captionsetup{labelfont={sf, small},
|
||||||
textfont={sf, small}, margin=\z@}
|
textfont={sf, small}, margin=\z@}
|
||||||
\captionsetup[figure]{name={Fig.}}
|
\captionsetup[figure]{name={Fig.}}
|
||||||
\else
|
\else
|
||||||
\captionsetup{labelfont={bf},
|
\captionsetup{labelfont={bf},
|
||||||
|
@ -769,6 +812,7 @@ Computing Machinery]
|
||||||
TCPS,%
|
TCPS,%
|
||||||
TEAC,%
|
TEAC,%
|
||||||
TECS,%
|
TECS,%
|
||||||
|
THRI,%
|
||||||
TIIS,%
|
TIIS,%
|
||||||
TISSEC,%
|
TISSEC,%
|
||||||
TIST,%
|
TIST,%
|
||||||
|
@ -814,6 +858,8 @@ Computing Machinery]
|
||||||
Wearable and Ubiquitous Technologies}%
|
Wearable and Ubiquitous Technologies}%
|
||||||
\def\@journalNameShort{Proc. ACM Interact. Mob. Wearable Ubiquitous Technol.}%
|
\def\@journalNameShort{Proc. ACM Interact. Mob. Wearable Ubiquitous Technol.}%
|
||||||
\def\@permissionCodeOne{2474-9567}%
|
\def\@permissionCodeOne{2474-9567}%
|
||||||
|
\@ACM@screentrue
|
||||||
|
\PackageInfo{\@classname}{Using screen mode due to \@journalCode}%
|
||||||
\or % JACM
|
\or % JACM
|
||||||
\def\@journalName{Journal of the ACM}%
|
\def\@journalName{Journal of the ACM}%
|
||||||
\def\@journalNameShort{J. ACM}%
|
\def\@journalNameShort{J. ACM}%
|
||||||
|
@ -836,19 +882,25 @@ Computing Machinery]
|
||||||
\def\@permissionCodeOne{1550-4832}%
|
\def\@permissionCodeOne{1550-4832}%
|
||||||
\or % JOCCH
|
\or % JOCCH
|
||||||
\def\@journalName{ACM Journal on Computing and Cultural Heritage}%
|
\def\@journalName{ACM Journal on Computing and Cultural Heritage}%
|
||||||
\def\@journalName{ACM J. Comput. Cult. Herit.}%
|
\def\@journalNameShort{ACM J. Comput. Cult. Herit.}%
|
||||||
\or % PACMHCI
|
\or % PACMHCI
|
||||||
\def\@journalName{Proceedings of the ACM on Human-Computer Interaction}%
|
\def\@journalName{Proceedings of the ACM on Human-Computer Interaction}%
|
||||||
\def\@journalName{Proc. ACM Hum.-Comput. Interact.}%
|
\def\@journalNameShort{Proc. ACM Hum.-Comput. Interact.}%
|
||||||
\def\@permissionCodeOne{2573-0142}%
|
\def\@permissionCodeOne{2573-0142}%
|
||||||
|
\@ACM@screentrue
|
||||||
|
\PackageInfo{\@classname}{Using screen mode due to \@journalCode}%
|
||||||
\or % PACMPL
|
\or % PACMPL
|
||||||
\def\@journalName{Proceedings of the ACM on Programming Languages}%
|
\def\@journalName{Proceedings of the ACM on Programming Languages}%
|
||||||
\def\@journalName{Proc. ACM Program. Lang.}%
|
\def\@journalNameShort{Proc. ACM Program. Lang.}%
|
||||||
\def\@permissionCodeOne{2475-1421}%
|
\def\@permissionCodeOne{2475-1421}%
|
||||||
|
\@ACM@screentrue
|
||||||
|
\PackageInfo{\@classname}{Using screen mode due to \@journalCode}%
|
||||||
\or % POMACS
|
\or % POMACS
|
||||||
\def\@journalName{Proceedings of the ACM on Measurement and Analysis of Computing Systems}%
|
\def\@journalName{Proceedings of the ACM on Measurement and Analysis of Computing Systems}%
|
||||||
\def\@journalName{Proc. ACM Meas. Anal. Comput. Syst.}%
|
\def\@journalNameShort{Proc. ACM Meas. Anal. Comput. Syst.}%
|
||||||
\def\@permissionCodeOne{2476-1249}%
|
\def\@permissionCodeOne{2476-1249}%
|
||||||
|
\@ACM@screentrue
|
||||||
|
\PackageInfo{\@classname}{Using screen mode due to \@journalCode}%
|
||||||
\or % TAAS
|
\or % TAAS
|
||||||
\def\@journalName{ACM Transactions on Autonomous and Adaptive Systems}%
|
\def\@journalName{ACM Transactions on Autonomous and Adaptive Systems}%
|
||||||
\def\@journalNameShort{ACM Trans. Autonom. Adapt. Syst.}%
|
\def\@journalNameShort{ACM Trans. Autonom. Adapt. Syst.}%
|
||||||
|
@ -859,6 +911,7 @@ Computing Machinery]
|
||||||
\def\@permissionCodeOne{1936-7228}%
|
\def\@permissionCodeOne{1936-7228}%
|
||||||
\or % TACO
|
\or % TACO
|
||||||
\def\@journalName{ACM Transactions on Architecture and Code Optimization}%
|
\def\@journalName{ACM Transactions on Architecture and Code Optimization}%
|
||||||
|
\def\@journalNameShort{ACM Trans. Arch. Code Optim.}%
|
||||||
\or % TALG
|
\or % TALG
|
||||||
\def\@journalName{ACM Transactions on Algorithms}%
|
\def\@journalName{ACM Transactions on Algorithms}%
|
||||||
\def\@journalNameShort{ACM Trans. Algor.}%
|
\def\@journalNameShort{ACM Trans. Algor.}%
|
||||||
|
@ -877,6 +930,10 @@ Computing Machinery]
|
||||||
\def\@journalName{ACM Transactions on Embedded Computing Systems}%
|
\def\@journalName{ACM Transactions on Embedded Computing Systems}%
|
||||||
\def\@journalNameShort{ACM Trans. Embedd. Comput. Syst.}%
|
\def\@journalNameShort{ACM Trans. Embedd. Comput. Syst.}%
|
||||||
\def\@permissionCodeOne{1539-9087}%
|
\def\@permissionCodeOne{1539-9087}%
|
||||||
|
\or % THRI
|
||||||
|
\def\@journalName{ACM Transactions on Human-Robot Interaction}%
|
||||||
|
\def\@journalNameShort{ACM Trans. Hum.-Robot Interact.}%
|
||||||
|
\def\@permissionCodeOne{2573-9522}%
|
||||||
\or % TIIS
|
\or % TIIS
|
||||||
\def\@journalName{ACM Transactions on Interactive Intelligent Systems}%
|
\def\@journalName{ACM Transactions on Interactive Intelligent Systems}%
|
||||||
\def\@journalNameShort{ACM Trans. Interact. Intell. Syst.}%
|
\def\@journalNameShort{ACM Trans. Interact. Intell. Syst.}%
|
||||||
|
@ -930,7 +987,6 @@ Computing Machinery]
|
||||||
\def\@journalNameShort{ACM Trans. Graph.}%
|
\def\@journalNameShort{ACM Trans. Graph.}%
|
||||||
\def\@permissionCodeOne{0730-0301}
|
\def\@permissionCodeOne{0730-0301}
|
||||||
\or % TOIS
|
\or % TOIS
|
||||||
\def\@journalName{ACM Transactions on Information Systems}%
|
|
||||||
\def\@journalName{ACM Transactions on Information Systems}%
|
\def\@journalName{ACM Transactions on Information Systems}%
|
||||||
\def\@permissionCodeOne{1046-8188}%
|
\def\@permissionCodeOne{1046-8188}%
|
||||||
\or % TOIT
|
\or % TOIT
|
||||||
|
@ -938,7 +994,6 @@ Computing Machinery]
|
||||||
\def\@journalNameShort{ACM Trans. Internet Technol.}%
|
\def\@journalNameShort{ACM Trans. Internet Technol.}%
|
||||||
\def\@permissionCodeOne{1533-5399}%
|
\def\@permissionCodeOne{1533-5399}%
|
||||||
\or % TOMACS
|
\or % TOMACS
|
||||||
\def\@journalName{ACM Transactions on Modeling and Computer Simulation}%
|
|
||||||
\def\@journalName{ACM Transactions on Modeling and Computer Simulation}%
|
\def\@journalName{ACM Transactions on Modeling and Computer Simulation}%
|
||||||
\def\@journalNameShort{ACM Trans. Model. Comput. Simul.}%
|
\def\@journalNameShort{ACM Trans. Model. Comput. Simul.}%
|
||||||
\or % TOMM
|
\or % TOMM
|
||||||
|
@ -1019,13 +1074,28 @@ Computing Machinery]
|
||||||
\fi}
|
\fi}
|
||||||
\acmConference[Conference'17]{ACM Conference}{July 2017}{Washington,
|
\acmConference[Conference'17]{ACM Conference}{July 2017}{Washington,
|
||||||
DC, USA}
|
DC, USA}
|
||||||
|
\def\acmBooktitle#1{\gdef\@acmBooktitle{#1}}
|
||||||
|
\acmBooktitle{Proceedings of \acmConference@name
|
||||||
|
\ifx\acmConference@name\acmConference@shortname\else
|
||||||
|
\ (\acmConference@shortname)\fi}
|
||||||
|
\def\@editorsAbbrev{(Ed.)}
|
||||||
|
\def\@acmEditors{}
|
||||||
|
\def\editor#1{\ifx\@acmEditors\@empty
|
||||||
|
\gdef\@acmEditors{#1}%
|
||||||
|
\else
|
||||||
|
\gdef\@editorsAbbrev{(Eds.)}%
|
||||||
|
\g@addto@macro\@acmEditors{\and#1}%
|
||||||
|
\fi}
|
||||||
\def\subtitle#1{\def\@subtitle{#1}}
|
\def\subtitle#1{\def\@subtitle{#1}}
|
||||||
\subtitle{}
|
\subtitle{}
|
||||||
\newcount\num@authorgroups
|
\newcount\num@authorgroups
|
||||||
\num@authorgroups=0\relax
|
\num@authorgroups=0\relax
|
||||||
|
\newcount\num@authors
|
||||||
|
\num@authors=0\relax
|
||||||
\newif\if@insideauthorgroup
|
\newif\if@insideauthorgroup
|
||||||
\@insideauthorgroupfalse
|
\@insideauthorgroupfalse
|
||||||
\renewcommand\author[2][]{%
|
\renewcommand\author[2][]{%
|
||||||
|
\global\advance\num@authors by 1\relax
|
||||||
\if@insideauthorgroup\else
|
\if@insideauthorgroup\else
|
||||||
\global\advance\num@authorgroups by 1\relax
|
\global\advance\num@authorgroups by 1\relax
|
||||||
\global\@insideauthorgrouptrue
|
\global\@insideauthorgrouptrue
|
||||||
|
@ -1070,7 +1140,7 @@ Computing Machinery]
|
||||||
\g@addto@macro\addresses{\affiliation{#1}{#2}}%
|
\g@addto@macro\addresses{\affiliation{#1}{#2}}%
|
||||||
\fi}
|
\fi}
|
||||||
\define@boolkey+{@ACM@affiliation@}[@ACM@affiliation@]{obeypunctuation}%
|
\define@boolkey+{@ACM@affiliation@}[@ACM@affiliation@]{obeypunctuation}%
|
||||||
[true]{}{\ClassError{\@classname}{obeypunctuation must be true or false}}
|
[true]{}{\ClassError{\@classname}{The option obeypunctuation can be either true or false}}
|
||||||
\def\additionalaffiliation#1{\authornote{\@additionalaffiliation{#1}}}
|
\def\additionalaffiliation#1{\authornote{\@additionalaffiliation{#1}}}
|
||||||
\def\@additionalaffiliation#1{\bgroup
|
\def\@additionalaffiliation#1{\bgroup
|
||||||
\def\position##1{\ignorespaces}%
|
\def\position##1{\ignorespaces}%
|
||||||
|
@ -1087,7 +1157,9 @@ Computing Machinery]
|
||||||
\if@ACM@anonymous\else
|
\if@ACM@anonymous\else
|
||||||
\g@addto@macro\addresses{\email{#1}{#2}}%
|
\g@addto@macro\addresses{\email{#1}{#2}}%
|
||||||
\fi}
|
\fi}
|
||||||
\let\orcid\@gobble
|
\def\orcid#1{\unskip\ignorespaces}
|
||||||
|
\def\authorsaddresses#1{\def\@authorsaddresses{#1}}
|
||||||
|
\authorsaddresses{\@mkauthorsaddresses}
|
||||||
\def\@titlenotes{}
|
\def\@titlenotes{}
|
||||||
\def\titlenote#1{%
|
\def\titlenote#1{%
|
||||||
\g@addto@macro\@title{\footnotemark}%
|
\g@addto@macro\@title{\footnotemark}%
|
||||||
|
@ -1125,7 +1197,7 @@ Computing Machinery]
|
||||||
\def\acmNumber#1{\def\@acmNumber{#1}}
|
\def\acmNumber#1{\def\@acmNumber{#1}}
|
||||||
\acmNumber{1}
|
\acmNumber{1}
|
||||||
\def\acmArticle#1{\def\@acmArticle{#1}}
|
\def\acmArticle#1{\def\@acmArticle{#1}}
|
||||||
\acmArticle{1}
|
\acmArticle{}
|
||||||
\def\acmArticleSeq#1{\def\@acmArticleSeq{#1}}
|
\def\acmArticleSeq#1{\def\@acmArticleSeq{#1}}
|
||||||
\acmArticleSeq{\@acmArticle}
|
\acmArticleSeq{\@acmArticle}
|
||||||
\def\acmYear#1{\def\@acmYear{#1}}
|
\def\acmYear#1{\def\@acmYear{#1}}
|
||||||
|
@ -1176,22 +1248,22 @@ Computing Machinery]
|
||||||
\ClassInfo{\@classname}{Printing CCS}%
|
\ClassInfo{\@classname}{Printing CCS}%
|
||||||
\else
|
\else
|
||||||
\ClassInfo{\@classname}{Suppressing CCS}%
|
\ClassInfo{\@classname}{Suppressing CCS}%
|
||||||
\fi}{\ClassError{\@classname}{printccs must be true or false}}
|
\fi}{\ClassError{\@classname}{The option printccs can be either true or false}}
|
||||||
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printacmref}[true]{%
|
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printacmref}[true]{%
|
||||||
\if@ACM@printacmref
|
\if@ACM@printacmref
|
||||||
\ClassInfo{\@classname}{Printing bibformat}%
|
\ClassInfo{\@classname}{Printing bibformat}%
|
||||||
\else
|
\else
|
||||||
\ClassInfo{\@classname}{Suppressing bibformat}%
|
\ClassInfo{\@classname}{Suppressing bibformat}%
|
||||||
\fi}{\ClassError{\@classname}{printacmref must be true or false}}
|
\fi}{\ClassError{\@classname}{The option printacmref can be either true or false}}
|
||||||
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printfolios}[true]{%
|
\define@boolkey+{@ACM@topmatter@}[@ACM@]{printfolios}[true]{%
|
||||||
\if@ACM@printfolios
|
\if@ACM@printfolios
|
||||||
\ClassInfo{\@classname}{Printing folios}%
|
\ClassInfo{\@classname}{Printing folios}%
|
||||||
\else
|
\else
|
||||||
\ClassInfo{\@classname}{Suppressing folios}%
|
\ClassInfo{\@classname}{Suppressing folios}%
|
||||||
\fi}{\ClassError{\@classname}{printfolios must be true or false}}
|
\fi}{\ClassError{\@classname}{The option printfolios can be either true or false}}
|
||||||
\define@cmdkey{@ACM@topmatter@}[@ACM@]{authorsperrow}[0]{%
|
\define@cmdkey{@ACM@topmatter@}[@ACM@]{authorsperrow}[0]{%
|
||||||
\IfInteger{#1}{\ClassInfo{\@classname}{Setting authorsperrow to
|
\IfInteger{#1}{\ClassInfo{\@classname}{Setting authorsperrow to
|
||||||
#1}}{\ClassWarning{\@classname}{Parameter authorsperrow must be
|
#1}}{\ClassWarning{\@classname}{The parameter authorsperrow must be
|
||||||
numerical. Ignoring the input #1}\gdef\@ACM@authorsperrow{0}}}
|
numerical. Ignoring the input #1}\gdef\@ACM@authorsperrow{0}}}
|
||||||
\def\settopmatter#1{\setkeys{@ACM@topmatter@}{#1}}
|
\def\settopmatter#1{\setkeys{@ACM@topmatter@}{#1}}
|
||||||
\settopmatter{printccs=true, printacmref=true}
|
\settopmatter{printccs=true, printacmref=true}
|
||||||
|
@ -1228,16 +1300,28 @@ Computing Machinery]
|
||||||
\excludecomment{CCSXML}
|
\excludecomment{CCSXML}
|
||||||
\let\@concepts\@empty
|
\let\@concepts\@empty
|
||||||
\newcommand\ccsdesc[2][100]{%
|
\newcommand\ccsdesc[2][100]{%
|
||||||
\ccsdesc@parse#1~#2~}
|
\ccsdesc@parse#1~#2~~\ccsdesc@parse@end}
|
||||||
\RequirePackage{textcomp}
|
\RequirePackage{textcomp}
|
||||||
\def\ccsdesc@parse#1~#2~#3~{%
|
\def\ccsdesc@parse#1~#2~#3~{%
|
||||||
\expandafter\ifx\csname CCS@#2\endcsname\relax
|
\expandafter\ifx\csname CCS@General@#2\endcsname\relax
|
||||||
\expandafter\gdef\csname CCS@#2\endcsname{\textbullet\ \textbf{#2} \textrightarrow\ }%
|
\expandafter\gdef\csname CCS@General@#2\endcsname{\textbullet\
|
||||||
\g@addto@macro{\@concepts}{\csname CCS@#2\endcsname}\fi
|
\textbf{#2}}%
|
||||||
\expandafter\g@addto@macro\expandafter{\csname CCS@#2\endcsname}{%
|
\expandafter\gdef\csname CCS@Punctuation@#2\endcsname{; }%
|
||||||
\ifnum#1>499\textbf{#3}; \else
|
\expandafter\gdef\csname CCS@Specific@#2\endcsname{}%
|
||||||
\ifnum#1>299\textit{#3}; \else
|
\g@addto@macro{\@concepts}{\csname CCS@General@#2\endcsname
|
||||||
#3; \fi\fi}}
|
\csname CCS@Punctuation@#2\endcsname
|
||||||
|
\csname CCS@Specific@#2\endcsname}%
|
||||||
|
\fi
|
||||||
|
\ifx#3\relax\relax\else
|
||||||
|
\expandafter\gdef\csname CCS@Punctuation@#2\endcsname{
|
||||||
|
\textrightarrow\ }%
|
||||||
|
\expandafter\g@addto@macro\expandafter{\csname CCS@Specific@#2\endcsname}{%
|
||||||
|
\ifnum#1>499\textbf{#3}; \else
|
||||||
|
\ifnum#1>299\textit{#3}; \else
|
||||||
|
#3; \fi\fi}%
|
||||||
|
\fi
|
||||||
|
\ccsdesc@parse@finish}
|
||||||
|
\def\ccsdesc@parse@finish#1\ccsdesc@parse@end{}
|
||||||
\newif\if@printcopyright
|
\newif\if@printcopyright
|
||||||
\@printcopyrighttrue
|
\@printcopyrighttrue
|
||||||
\newif\if@printpermission
|
\newif\if@printpermission
|
||||||
|
@ -1245,9 +1329,10 @@ Computing Machinery]
|
||||||
\newif\if@acmowned
|
\newif\if@acmowned
|
||||||
\@acmownedtrue
|
\@acmownedtrue
|
||||||
\define@choicekey*{ACM@}{acmcopyrightmode}[%
|
\define@choicekey*{ACM@}{acmcopyrightmode}[%
|
||||||
\acm@copyrightinput\acm@copyrightmode]{none,acmcopyright,acmlicensed,%
|
\acm@copyrightinput\acm@copyrightmode]{none,%
|
||||||
rightsretained,usgov,usgovmixed,cagov,cagovmixed,%
|
acmcopyright,acmlicensed,rightsretained,%
|
||||||
licensedusgovmixed,licensedcagovmixed,othergov,licensedothergov}{%
|
usgov,usgovmixed,cagov,cagovmixed,licensedusgovmixed,%
|
||||||
|
licensedcagov,licensedcagovmixed,othergov,licensedothergov}{%
|
||||||
\@printpermissiontrue
|
\@printpermissiontrue
|
||||||
\@printcopyrighttrue
|
\@printcopyrighttrue
|
||||||
\@acmownedtrue
|
\@acmownedtrue
|
||||||
|
@ -1275,13 +1360,16 @@ Computing Machinery]
|
||||||
\ifnum\acm@copyrightmode=8\relax % licensedusgovmixed
|
\ifnum\acm@copyrightmode=8\relax % licensedusgovmixed
|
||||||
\@acmownedfalse
|
\@acmownedfalse
|
||||||
\fi
|
\fi
|
||||||
\ifnum\acm@copyrightmode=9\relax % licensedcagovmixed
|
\ifnum\acm@copyrightmode=9\relax % licensedcagov
|
||||||
\@acmownedfalse
|
\@acmownedfalse
|
||||||
\fi
|
\fi
|
||||||
\ifnum\acm@copyrightmode=10\relax % othergov
|
\ifnum\acm@copyrightmode=10\relax % licensedcagovmixed
|
||||||
|
\@acmownedfalse
|
||||||
|
\fi
|
||||||
|
\ifnum\acm@copyrightmode=11\relax % othergov
|
||||||
\@acmownedtrue
|
\@acmownedtrue
|
||||||
\fi
|
\fi
|
||||||
\ifnum\acm@copyrightmode=11\relax % licensedothergov
|
\ifnum\acm@copyrightmode=12\relax % licensedothergov
|
||||||
\@acmownedfalse
|
\@acmownedfalse
|
||||||
\fi}
|
\fi}
|
||||||
\def\setcopyright#1{\setkeys{ACM@}{acmcopyrightmode=#1}}
|
\def\setcopyright#1{\setkeys{ACM@}{acmcopyrightmode=#1}}
|
||||||
|
@ -1305,6 +1393,9 @@ Computing Machinery]
|
||||||
\or %licensedusgovmixed
|
\or %licensedusgovmixed
|
||||||
Copyright held by the owner/author(s). Publication rights licensed to
|
Copyright held by the owner/author(s). Publication rights licensed to
|
||||||
Association for Computing Machinery.
|
Association for Computing Machinery.
|
||||||
|
\or % licensedcagov
|
||||||
|
Crown in Right of Canada. Publication rights licensed to
|
||||||
|
Association for Computing Machinery.
|
||||||
\or %licensedcagovmixed
|
\or %licensedcagovmixed
|
||||||
Copyright held by the owner/author(s). Publication rights licensed to
|
Copyright held by the owner/author(s). Publication rights licensed to
|
||||||
Association for Computing Machinery.
|
Association for Computing Machinery.
|
||||||
|
@ -1355,16 +1446,10 @@ Computing Machinery]
|
||||||
source.
|
source.
|
||||||
\or % usgovmixed
|
\or % usgovmixed
|
||||||
ACM acknowledges that this contribution was authored or co-authored
|
ACM acknowledges that this contribution was authored or co-authored
|
||||||
by an employee, or contractor of the national government. As such,
|
by an employee, contractor, or affiliate of the United States government. As such,
|
||||||
the Government retains a nonexclusive, royalty-free right to
|
the United States government retains a nonexclusive, royalty-free right to
|
||||||
publish or reproduce this article, or to allow others to do so, for
|
publish or reproduce this article, or to allow others to do so, for
|
||||||
Government purposes only. Permission to make digital or hard copies
|
government purposes only.
|
||||||
for personal or classroom use is granted. Copies must bear this
|
|
||||||
notice and the full citation on the first page. Copyrights for
|
|
||||||
components of this work owned by others than ACM must be
|
|
||||||
honored. To copy otherwise, distribute, republish, or post,
|
|
||||||
requires prior specific permission and\hspace*{.5pt}/or a
|
|
||||||
fee. Request permissions from permissions@acm.org.
|
|
||||||
\or % cagov
|
\or % cagov
|
||||||
This article was authored by employees of the Government of Canada.
|
This article was authored by employees of the Government of Canada.
|
||||||
As such, the Canadian government retains all interest in the
|
As such, the Canadian government retains all interest in the
|
||||||
|
@ -1375,7 +1460,7 @@ Computing Machinery]
|
||||||
Permission to make digital or hard copies for personal or classroom
|
Permission to make digital or hard copies for personal or classroom
|
||||||
use is granted. Copies must bear this notice and the full citation
|
use is granted. Copies must bear this notice and the full citation
|
||||||
on the first page. Copyrights for components of this work owned by
|
on the first page. Copyrights for components of this work owned by
|
||||||
others than the Canadain Government must be honored. To copy
|
others than the Canadian Government must be honored. To copy
|
||||||
otherwise, distribute, republish, or post, requires prior specific
|
otherwise, distribute, republish, or post, requires prior specific
|
||||||
permission and\hspace*{.5pt}/or a fee. Request permissions from
|
permission and\hspace*{.5pt}/or a fee. Request permissions from
|
||||||
permissions@acm.org.
|
permissions@acm.org.
|
||||||
|
@ -1398,6 +1483,20 @@ Computing Machinery]
|
||||||
Government retains a nonexclusive, royalty-free right to publish or
|
Government retains a nonexclusive, royalty-free right to publish or
|
||||||
reproduce this article, or to allow others to do so, for Government
|
reproduce this article, or to allow others to do so, for Government
|
||||||
purposes only.
|
purposes only.
|
||||||
|
\or % licensedcagov
|
||||||
|
This article was authored by employees of the Government of Canada.
|
||||||
|
As such, the Canadian government retains all interest in the
|
||||||
|
copyright to this work and grants to ACM a nonexclusive,
|
||||||
|
royalty-free right to publish or reproduce this article, or to allow
|
||||||
|
others to do so, provided that clear attribution is given both to
|
||||||
|
the authors and the Canadian government agency employing them.
|
||||||
|
Permission to make digital or hard copies for personal or classroom
|
||||||
|
use is granted. Copies must bear this notice and the full citation
|
||||||
|
on the first page. Copyrights for components of this work owned by
|
||||||
|
others than the Canadian Government must be honored. To copy
|
||||||
|
otherwise, distribute, republish, or post, requires prior specific
|
||||||
|
permission and\hspace*{.5pt}/or a fee. Request permissions from
|
||||||
|
permissions@acm.org.
|
||||||
\or % licensedcagovmixed
|
\or % licensedcagovmixed
|
||||||
Publication rights licensed to ACM\@. ACM acknowledges that this
|
Publication rights licensed to ACM\@. ACM acknowledges that this
|
||||||
contribution was authored or co-authored by an employee, contractor
|
contribution was authored or co-authored by an employee, contractor
|
||||||
|
@ -1443,7 +1542,7 @@ Computing Machinery]
|
||||||
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
|
\renewcommand\thefootnote{\@fnsymbol\c@footnote}%
|
||||||
\global\@topnum\z@ % this prevents floats from falling
|
\global\@topnum\z@ % this prevents floats from falling
|
||||||
% at the top of page 1
|
% at the top of page 1
|
||||||
\global\@botnum\z@ % we do not want them to be on bottom either
|
\global\@botnum\z@ % we do not want them to be on the bottom either
|
||||||
\hsize=\textwidth
|
\hsize=\textwidth
|
||||||
\def\@makefnmark{\hbox{\@textsuperscript{\@thefnmark}}}%
|
\def\@makefnmark{\hbox{\@textsuperscript{\@thefnmark}}}%
|
||||||
\@mktitle\if@ACM@sigchiamode\else\@mkauthors\fi\@mkteasers
|
\@mktitle\if@ACM@sigchiamode\else\@mkauthors\fi\@mkteasers
|
||||||
|
@ -1454,12 +1553,21 @@ Computing Machinery]
|
||||||
\@titlenotes
|
\@titlenotes
|
||||||
\@subtitlenotes
|
\@subtitlenotes
|
||||||
\@authornotes
|
\@authornotes
|
||||||
\let\@makefnmark\relax \let\@thefnmark\relax
|
\let\@makefnmark\relax
|
||||||
|
\let\@thefnmark\relax
|
||||||
\let\@makefntext\noindent
|
\let\@makefntext\noindent
|
||||||
\ifx\@empty\thankses\else
|
\ifx\@empty\thankses\else
|
||||||
\footnotetextcopyrightpermission{%
|
\footnotetextauthorsaddresses{%
|
||||||
\def\par{\let\par\@par}\parindent\z@\@setthanks}%
|
\def\par{\let\par\@par}\parindent\z@\@setthanks}%
|
||||||
\fi
|
\fi
|
||||||
|
\ifx\@empty\@authorsaddresses\else
|
||||||
|
\if@ACM@anonymous\else
|
||||||
|
\if@ACM@journal
|
||||||
|
\footnotetextauthorsaddresses{%
|
||||||
|
\def\par{\let\par\@par}\parindent\z@\@setauthorsaddresses}%
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
|
\fi
|
||||||
\footnotetextcopyrightpermission{%
|
\footnotetextcopyrightpermission{%
|
||||||
\if@ACM@authordraft
|
\if@ACM@authordraft
|
||||||
\raisebox{-2ex}[\z@][\z@]{\makebox[0pt][l]{\large\bfseries
|
\raisebox{-2ex}[\z@][\z@]{\makebox[0pt][l]{\large\bfseries
|
||||||
|
@ -1491,7 +1599,7 @@ Computing Machinery]
|
||||||
\if@ACM@journal
|
\if@ACM@journal
|
||||||
\emph{\@journalName}%
|
\emph{\@journalName}%
|
||||||
\else
|
\else
|
||||||
\emph{Proceedings of \acmConference@name, \acmConference@date}%
|
\emph{\@acmBooktitle}%
|
||||||
\fi
|
\fi
|
||||||
\ifx\@acmDOI\@empty
|
\ifx\@acmDOI\@empty
|
||||||
.
|
.
|
||||||
|
@ -1504,9 +1612,9 @@ Computing Machinery]
|
||||||
\ifx\@acmPrice\@empty\else\ \$\@acmPrice\fi\\
|
\ifx\@acmPrice\@empty\else\ \$\@acmPrice\fi\\
|
||||||
\@formatdoi{\@acmDOI}%
|
\@formatdoi{\@acmDOI}%
|
||||||
\else % Conference
|
\else % Conference
|
||||||
ACM~ISBN~\@acmISBN
|
\ifx\@acmISBN\@empty\else ACM~ISBN~\@acmISBN
|
||||||
\ifx\@acmPrice\@empty.\else\dots\$\@acmPrice\fi\\
|
\ifx\@acmPrice\@empty.\else\dots\$\@acmPrice\fi\\\fi
|
||||||
\@formatdoi{\@acmDOI}%
|
\ifx\@acmDOI\@empty\else\@formatdoi{\@acmDOI}\fi%
|
||||||
\fi
|
\fi
|
||||||
\fi
|
\fi
|
||||||
\fi}
|
\fi}
|
||||||
|
@ -1535,7 +1643,9 @@ Computing Machinery]
|
||||||
\@mkbibcitation
|
\@mkbibcitation
|
||||||
\fi
|
\fi
|
||||||
\hypersetup{pdfauthor={\authors},
|
\hypersetup{pdfauthor={\authors},
|
||||||
pdftitle={\@title}, pdfkeywords={\@concepts}}%
|
pdftitle={\@title},
|
||||||
|
pdfsubject={\@concepts},
|
||||||
|
pdfkeywords={\@keywords}}%
|
||||||
\@printendtopmatter
|
\@printendtopmatter
|
||||||
\@afterindentfalse
|
\@afterindentfalse
|
||||||
\@afterheading
|
\@afterheading
|
||||||
|
@ -1572,13 +1682,10 @@ Computing Machinery]
|
||||||
\ifcase\ACM@format@nr
|
\ifcase\ACM@format@nr
|
||||||
\relax % manuscript
|
\relax % manuscript
|
||||||
\box\mktitle@bx\par
|
\box\mktitle@bx\par
|
||||||
\noindent\hrulefill\par
|
|
||||||
\or % acmsmall
|
\or % acmsmall
|
||||||
\box\mktitle@bx\par
|
\box\mktitle@bx\par
|
||||||
\noindent\hrulefill\par
|
|
||||||
\or % acmlarge
|
\or % acmlarge
|
||||||
\box\mktitle@bx\par
|
\box\mktitle@bx\par
|
||||||
\noindent\hrulefill\par
|
|
||||||
\or % acmtog
|
\or % acmtog
|
||||||
\twocolumn[\box\mktitle@bx]%
|
\twocolumn[\box\mktitle@bx]%
|
||||||
\or % sigconf
|
\or % sigconf
|
||||||
|
@ -1630,11 +1737,11 @@ Computing Machinery]
|
||||||
\def\@titlefont{%
|
\def\@titlefont{%
|
||||||
\ifcase\ACM@format@nr
|
\ifcase\ACM@format@nr
|
||||||
\relax % manuscript
|
\relax % manuscript
|
||||||
\LARGE\bfseries\sffamily
|
\LARGE\sffamily\bfseries
|
||||||
\or % acmsmall
|
\or % acmsmall
|
||||||
\LARGE\bfseries\sffamily
|
\LARGE\sffamily\bfseries
|
||||||
\or % acmlarge
|
\or % acmlarge
|
||||||
\LARGE\bfseries\sffamily
|
\LARGE\sffamily\bfseries
|
||||||
\or % acmtog
|
\or % acmtog
|
||||||
\Huge\sffamily
|
\Huge\sffamily
|
||||||
\or % sigconf
|
\or % sigconf
|
||||||
|
@ -1741,24 +1848,22 @@ Computing Machinery]
|
||||||
\unskip\cleaders\copy\@ACM@commabox\hskip\wd\@ACM@commabox
|
\unskip\cleaders\copy\@ACM@commabox\hskip\wd\@ACM@commabox
|
||||||
\fi\fi
|
\fi\fi
|
||||||
#1}
|
#1}
|
||||||
|
\def\streetaddress#1{\unskip\ignorespaces}
|
||||||
|
\def\postcode#1{\unskip\ignorespaces}
|
||||||
\if@ACM@journal
|
\if@ACM@journal
|
||||||
\let\position\@gobble
|
\def\position#1{\unskip\ignorespaces}
|
||||||
\def\institution#1{#1\ignorespaces}%
|
\def\institution#1{\unskip~#1\ignorespaces}
|
||||||
\newcommand\department[2][0]{}%
|
\def\city#1{\unskip\ignorespaces}
|
||||||
\let\streetaddress\@gobble
|
\def\state#1{\unskip\ignorespaces}
|
||||||
\let\city\@gobble
|
\newcommand\department[2][0]{\unskip\ignorespaces}
|
||||||
\let\state\@gobble
|
\def\country#1{\if@ACM@affiliation@obeypunctuation\else, \fi#1\ignorespaces}
|
||||||
\let\postcode\@gobble
|
|
||||||
\let\country\@gobble
|
|
||||||
\else
|
\else
|
||||||
\def\position#1{\if@ACM@affiliation@obeypunctuation#1\else#1\par\fi}%
|
\def\position#1{\if@ACM@affiliation@obeypunctuation#1\else#1\par\fi}%
|
||||||
\def\institution#1{\if@ACM@affiliation@obeypunctuation#1\else#1\par\fi}%
|
\def\institution#1{\if@ACM@affiliation@obeypunctuation#1\else#1\par\fi}%
|
||||||
\newcommand\department[2][0]{\if@ACM@affiliation@obeypunctuation
|
\newcommand\department[2][0]{\if@ACM@affiliation@obeypunctuation
|
||||||
#2\else#2\par\fi}%
|
#2\else#2\par\fi}%
|
||||||
\def\streetaddress#1{\if@ACM@affiliation@obeypunctuation#1\else#1\par\fi}%
|
|
||||||
\let\city\@ACM@addtoaddress
|
\let\city\@ACM@addtoaddress
|
||||||
\let\state\@ACM@addtoaddress
|
\let\state\@ACM@addtoaddress
|
||||||
\def\postcode#1{\if@ACM@affiliation@obeypunctuation#1\else\unskip\space#1\fi}%
|
|
||||||
\let\country\@ACM@addtoaddress
|
\let\country\@ACM@addtoaddress
|
||||||
\fi
|
\fi
|
||||||
\def\@mkauthors{\begingroup
|
\def\@mkauthors{\begingroup
|
||||||
|
@ -1826,9 +1931,9 @@ Computing Machinery]
|
||||||
\global\let\and\@typeset@author@line
|
\global\let\and\@typeset@author@line
|
||||||
\def\@author##1{%
|
\def\@author##1{%
|
||||||
\ifx\@currentauthors\@empty
|
\ifx\@currentauthors\@empty
|
||||||
\gdef\@currentauthors{\@authorfont\MakeUppercase{##1}}%
|
\gdef\@currentauthors{\@authorfont\MakeTextUppercase{##1}}%
|
||||||
\else
|
\else
|
||||||
\g@addto@macro{\@currentauthors}{\and\MakeUppercase{##1}}%
|
\g@addto@macro{\@currentauthors}{\and\MakeTextUppercase{##1}}%
|
||||||
\fi
|
\fi
|
||||||
\gdef\and{}}%
|
\gdef\and{}}%
|
||||||
\def\email##1##2{}%
|
\def\email##1##2{}%
|
||||||
|
@ -1951,6 +2056,26 @@ Computing Machinery]
|
||||||
\par\raggedright\leftskip=\z@
|
\par\raggedright\leftskip=\z@
|
||||||
\lineskip=1pc\noindent
|
\lineskip=1pc\noindent
|
||||||
\addresses\let\and\@typeset@author@bx\and\par\bigskip\egroup}
|
\addresses\let\and\@typeset@author@bx\and\par\bigskip\egroup}
|
||||||
|
\def\@mkauthorsaddresses{%
|
||||||
|
\ifnum\num@authors>1\relax
|
||||||
|
Authors' \else Author's \fi
|
||||||
|
\ifnum\num@authorgroups>1\relax
|
||||||
|
addresses: \else address: \fi
|
||||||
|
\bgroup
|
||||||
|
\def\streetaddress##1{\unskip\@addpunct, ##1}%
|
||||||
|
\def\postcode##1{\unskip\@addpunct, ##1}%
|
||||||
|
\def\position##1{\unskip\ignorespaces}%
|
||||||
|
\def\institution##1{\unskip\@addpunct, ##1}%
|
||||||
|
\def\city##1{\unskip\@addpunct, ##1}%
|
||||||
|
\def\state##1{\unskip\@addpunct, ##1}%
|
||||||
|
\renewcommand\department[2][0]{\unskip\@addpunct, ##2}%
|
||||||
|
\def\country##1{\unskip\@addpunct, ##1}%
|
||||||
|
\def\and{\unskip\@addpunct; }%
|
||||||
|
\def\@author##1{##1}%
|
||||||
|
\def\email##1##2{\unskip\@addpunct, \nolinkurl{##2}}%
|
||||||
|
\addresses
|
||||||
|
\egroup}
|
||||||
|
\def\@setaddresses{}
|
||||||
\def\@authornotemark{\g@addto@macro\@currentauthors{\footnotemark\relax}}
|
\def\@authornotemark{\g@addto@macro\@currentauthors{\footnotemark\relax}}
|
||||||
\def\@@authornotemark#1{\g@addto@macro\@currentauthors{\footnotemark[#1]}}
|
\def\@@authornotemark#1{\g@addto@macro\@currentauthors{\footnotemark[#1]}}
|
||||||
\def\@mkteasers{%
|
\def\@mkteasers{%
|
||||||
|
@ -1960,60 +2085,45 @@ Computing Machinery]
|
||||||
\global\setbox\mktitle@bx=\vbox{\noindent\box\mktitle@bx\par
|
\global\setbox\mktitle@bx=\vbox{\noindent\box\mktitle@bx\par
|
||||||
\noindent\@teaserfigures\par\medskip}%
|
\noindent\@teaserfigures\par\medskip}%
|
||||||
\fi}
|
\fi}
|
||||||
\def\@setaddresses{}
|
|
||||||
\def\@mkabstract{\bgroup
|
\def\@mkabstract{\bgroup
|
||||||
\ifx\@abstract\@lempty\else
|
\ifx\@abstract\@lempty\else
|
||||||
{\phantomsection\addcontentsline{toc}{section}{Abstract}%
|
{\phantomsection\addcontentsline{toc}{section}{Abstract}%
|
||||||
\if@ACM@journal
|
\if@ACM@journal
|
||||||
\small\noindent
|
\everypar{\setbox\z@\lastbox\everypar{}}\small
|
||||||
\else
|
\else
|
||||||
\section*{Abstract}%
|
\section*{Abstract}%
|
||||||
\fi
|
\fi
|
||||||
\ignorespaces\@abstract\par}%
|
\ignorespaces\@abstract\par}%
|
||||||
\fi\egroup}
|
\fi\egroup}
|
||||||
\def\@mkbibcitation{\bgroup
|
\def\@mkbibcitation{\bgroup
|
||||||
|
\def\@pages@word{\ifnum\getrefnumber{TotPages}=1\relax page\else pages\fi}%
|
||||||
\def\footnotemark{}%
|
\def\footnotemark{}%
|
||||||
\def\\{\unskip{} \ignorespaces}%
|
\def\\{\unskip{} \ignorespaces}%
|
||||||
\def\footnote{\ClassError{\@classname}{Please do note use footnotes
|
\def\footnote{\ClassError{\@classname}{Please do note use footnotes
|
||||||
inside \string\title{} or \string\author{} command! Use
|
inside a \string\title{} or \string\author{} command! Use
|
||||||
\string\titlenote{} or \string\authornote{} instead!}}%
|
\string\titlenote{} or \string\authornote{} instead!}}%
|
||||||
\par\medskip\small\noindent{\bfseries ACM Reference format:}\par\nobreak
|
\def\@article@string{\ifx\@acmArticle\@empty{\ }\else,
|
||||||
\noindent\authors. \@acmYear. \@title.
|
Article~\@acmArticle\ \fi}%
|
||||||
|
\par\medskip\small\noindent{\bfseries ACM Reference Format:}\par\nobreak
|
||||||
|
\noindent\authors. \@acmYear. \@title
|
||||||
|
\ifx\@subtitle\@empty. \else: \@subtitle. \fi
|
||||||
\if@ACM@journal
|
\if@ACM@journal
|
||||||
\textit{\@journalNameShort}
|
\textit{\@journalNameShort}
|
||||||
\@acmVolume, \@acmNumber, Article~\@acmArticle\ (\@acmPubDate),
|
\@acmVolume, \@acmNumber \@article@string (\@acmPubDate),
|
||||||
\ref{TotPages}~pages.
|
\ref{TotPages}~\@pages@word.
|
||||||
\else
|
\else
|
||||||
In \textit{Proceedings of \acmConference@name, \acmConference@venue,
|
In \textit{\@acmBooktitle}%
|
||||||
\acmConference@date
|
\ifx\@acmEditors\@empty\textit{.}\else
|
||||||
\ifx\acmConference@name\acmConference@shortname\else
|
\andify\@acmEditors\textit{, }\@acmEditors~\@editorsAbbrev.%
|
||||||
\ (\acmConference@shortname)\fi
|
\fi\
|
||||||
,} \ref{TotPages}~pages.
|
ACM, New York, NY, USA%
|
||||||
\fi\par
|
\@article@string\unskip, \ref{TotPages}~\@pages@word.
|
||||||
\noindent\@formatdoi{\@acmDOI}
|
|
||||||
\par\egroup}
|
|
||||||
\def\@printendtopmatter{\par\medskip
|
|
||||||
\ifcase\ACM@format@nr
|
|
||||||
\relax % manuscript
|
|
||||||
\noindent\hrulefill\par\medskip
|
|
||||||
\or % acmsmall
|
|
||||||
\noindent\hrulefill\par\medskip
|
|
||||||
\or % acmlarge
|
|
||||||
\noindent\hrulefill\par\medskip
|
|
||||||
\or % acmtog
|
|
||||||
\par\bigskip
|
|
||||||
\or % sigconf
|
|
||||||
\par\bigskip
|
|
||||||
\or % siggraph
|
|
||||||
\par\bigskip
|
|
||||||
\or % sigplan
|
|
||||||
\par\bigskip
|
|
||||||
\or % sigchi
|
|
||||||
\par\bigskip
|
|
||||||
\or % sigchi-a
|
|
||||||
\fi
|
\fi
|
||||||
}
|
\@formatdoi{\@acmDOI}
|
||||||
|
\par\egroup}
|
||||||
|
\def\@printendtopmatter{\par\bigskip}
|
||||||
\def\@setthanks{\long\def\thanks##1{\par##1\@addpunct.}\thankses}
|
\def\@setthanks{\long\def\thanks##1{\par##1\@addpunct.}\thankses}
|
||||||
|
\def\@setauthorsaddresses{\@authorsaddresses\unskip\@addpunct.}
|
||||||
\RequirePackage{fancyhdr}
|
\RequirePackage{fancyhdr}
|
||||||
\if@ACM@review
|
\if@ACM@review
|
||||||
\newsavebox{\ACM@linecount@bx}
|
\newsavebox{\ACM@linecount@bx}
|
||||||
|
@ -2022,11 +2132,13 @@ Computing Machinery]
|
||||||
\ACM@linecount\@ne\relax
|
\ACM@linecount\@ne\relax
|
||||||
\def\ACM@mk@linecount{%
|
\def\ACM@mk@linecount{%
|
||||||
\savebox{\ACM@linecount@bx}[4em][t]{\parbox[t]{4em}{%
|
\savebox{\ACM@linecount@bx}[4em][t]{\parbox[t]{4em}{%
|
||||||
\setlength{\ACM@linecount@bxht}{-\baselineskip}%
|
\setlength{\ACM@linecount@bxht}{0pt}%
|
||||||
\loop{\color{ACMRed}\scriptsize\the\ACM@linecount}\\
|
\loop{\color{red}\scriptsize\the\ACM@linecount}\\
|
||||||
\global\advance\ACM@linecount by \@ne
|
\global\advance\ACM@linecount by \@ne
|
||||||
\addtolength{\ACM@linecount@bxht}{\baselineskip}%
|
\addtolength{\ACM@linecount@bxht}{\baselineskip}%
|
||||||
\ifdim\ACM@linecount@bxht<\textheight\repeat}}}
|
\ifdim\ACM@linecount@bxht<\textheight\repeat
|
||||||
|
{\color{red}\scriptsize\the\ACM@linecount}\hfill
|
||||||
|
\global\advance\ACM@linecount by \@ne}}}
|
||||||
\fi
|
\fi
|
||||||
\def\ACM@linecountL{%
|
\def\ACM@linecountL{%
|
||||||
\if@ACM@review
|
\if@ACM@review
|
||||||
|
@ -2043,7 +2155,7 @@ Computing Machinery]
|
||||||
\end{picture}%
|
\end{picture}%
|
||||||
\fi}
|
\fi}
|
||||||
\if@ACM@timestamp
|
\if@ACM@timestamp
|
||||||
% Subtracting 30 from \time gives us the effect of rounding-down despite
|
% Subtracting 30 from \time gives us the effect of rounding down despite
|
||||||
% \numexpr rounding to nearest
|
% \numexpr rounding to nearest
|
||||||
\newcounter{ACM@time@hours}
|
\newcounter{ACM@time@hours}
|
||||||
\setcounter{ACM@time@hours}{\numexpr (\time - 30) / 60 \relax}
|
\setcounter{ACM@time@hours}{\numexpr (\time - 30) / 60 \relax}
|
||||||
|
@ -2051,36 +2163,16 @@ Computing Machinery]
|
||||||
\setcounter{ACM@time@minutes}{\numexpr \time - \theACM@time@hours * 60 \relax}
|
\setcounter{ACM@time@minutes}{\numexpr \time - \theACM@time@hours * 60 \relax}
|
||||||
\newcommand\ACM@timestamp{%
|
\newcommand\ACM@timestamp{%
|
||||||
\footnotesize%
|
\footnotesize%
|
||||||
\the\year-\two@digits{\the\month}-\two@digits{\the\day}{ }%
|
|
||||||
\two@digits{\theACM@time@hours}:\two@digits{\theACM@time@minutes}{ }%
|
|
||||||
page~\thepage\ (pp. \@startPage-\pageref*{TotPages})%
|
|
||||||
\ifx\@acmSubmissionID\@empty\relax\else
|
\ifx\@acmSubmissionID\@empty\relax\else
|
||||||
~Submission~ID: \@acmSubmissionID
|
Submission ID: \@acmSubmissionID.{ }%
|
||||||
\fi
|
\fi
|
||||||
|
\the\year-\two@digits{\the\month}-\two@digits{\the\day}{ }%
|
||||||
|
\two@digits{\theACM@time@hours}:\two@digits{\theACM@time@minutes}{. }%
|
||||||
|
Page \thepage\ of \@startPage--\pageref*{TotPages}.%
|
||||||
}
|
}
|
||||||
\fi
|
\fi
|
||||||
\def\@shortauthors{\if@ACM@anonymous Anon.\else\shortauthors\fi}
|
\def\@shortauthors{\if@ACM@anonymous Anon.\else\shortauthors\fi}
|
||||||
\def\@headfootfont{%
|
\def\@headfootfont{\sffamily}
|
||||||
\ifcase\ACM@format@nr
|
|
||||||
\relax % manuscript
|
|
||||||
\sffamily
|
|
||||||
\or % acmsmall
|
|
||||||
\sffamily
|
|
||||||
\or % acmlarge
|
|
||||||
\sffamily
|
|
||||||
\or % acmtog
|
|
||||||
\sffamily
|
|
||||||
\or % sigconf
|
|
||||||
\sffamily
|
|
||||||
\or % siggraph
|
|
||||||
\sffamily
|
|
||||||
\or % sigplan
|
|
||||||
\sffamily
|
|
||||||
\or % sigchi
|
|
||||||
\sffamily
|
|
||||||
\or % sigchi-a
|
|
||||||
\sffamily
|
|
||||||
\fi}
|
|
||||||
\fancypagestyle{standardpagestyle}{%
|
\fancypagestyle{standardpagestyle}{%
|
||||||
\fancyhf{}%
|
\fancyhf{}%
|
||||||
\renewcommand{\headrulewidth}{\z@}%
|
\renewcommand{\headrulewidth}{\z@}%
|
||||||
|
@ -2153,7 +2245,8 @@ Computing Machinery]
|
||||||
\@folio@voffset=.55in\relax
|
\@folio@voffset=.55in\relax
|
||||||
\def\@folio@max{10}
|
\def\@folio@max{10}
|
||||||
\fi
|
\fi
|
||||||
\def\@folioblob{\@tempcnta=\@acmArticleSeq\relax
|
\def\@folioblob{\@tempcnta=0\@acmArticleSeq\relax
|
||||||
|
\ifnum\@tempcnta=0\relax\else
|
||||||
\loop
|
\loop
|
||||||
\ifnum\@tempcnta>\@folio@max\relax
|
\ifnum\@tempcnta>\@folio@max\relax
|
||||||
\advance\@tempcnta by - \@folio@max
|
\advance\@tempcnta by - \@folio@max
|
||||||
|
@ -2169,8 +2262,8 @@ Computing Machinery]
|
||||||
\rule{\@folio@wd}{\@folio@ht}}}%
|
\rule{\@folio@wd}{\@folio@ht}}}%
|
||||||
\parbox{\@folio@wd}{%
|
\parbox{\@folio@wd}{%
|
||||||
\centering
|
\centering
|
||||||
\textcolor{white}{\LARGE\bfseries\sffamily\@acmArticle}}}}
|
\textcolor{white}{\LARGE\sffamily\bfseries\@acmArticle}}}}
|
||||||
\end{picture}}
|
\end{picture}\fi}
|
||||||
|
|
||||||
\fancypagestyle{firstpagestyle}{%
|
\fancypagestyle{firstpagestyle}{%
|
||||||
\fancyhf{}%
|
\fancyhf{}%
|
||||||
|
@ -2217,6 +2310,14 @@ Computing Machinery]
|
||||||
\fi
|
\fi
|
||||||
\fi
|
\fi
|
||||||
}
|
}
|
||||||
|
\let\ACM@ps@plain\ps@plain
|
||||||
|
\let\ACM@ps@myheadings\ps@myheadings
|
||||||
|
\let\ACM@ps@headings\ps@headings
|
||||||
|
\def\ACM@restore@pagestyle{%
|
||||||
|
\let\ps@plain\ACM@ps@plain
|
||||||
|
\let\ps@myheadings\ACM@ps@myheadings
|
||||||
|
\let\ps@headings\ACM@ps@headings}
|
||||||
|
\AtBeginDocument{\ACM@restore@pagestyle}
|
||||||
\renewcommand\section{\@startsection{section}{1}{\z@}%
|
\renewcommand\section{\@startsection{section}{1}{\z@}%
|
||||||
{-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}%
|
{-.75\baselineskip \@plus -2\p@ \@minus -.2\p@}%
|
||||||
{.25\baselineskip}%
|
{.25\baselineskip}%
|
||||||
|
@ -2241,7 +2342,7 @@ Computing Machinery]
|
||||||
\rightskip\@rightskip
|
\rightskip\@rightskip
|
||||||
\leftskip\z@skip
|
\leftskip\z@skip
|
||||||
\parindent\z@}
|
\parindent\z@}
|
||||||
\def\@secfont{\sffamily\bfseries\section@raggedright\MakeUppercase}
|
\def\@secfont{\sffamily\bfseries\section@raggedright\MakeTextUppercase}
|
||||||
\def\@subsecfont{\sffamily\bfseries\section@raggedright}
|
\def\@subsecfont{\sffamily\bfseries\section@raggedright}
|
||||||
\def\@subsubsecfont{\sffamily\itshape}
|
\def\@subsubsecfont{\sffamily\itshape}
|
||||||
\def\@parfont{\itshape}
|
\def\@parfont{\itshape}
|
||||||
|
@ -2250,17 +2351,17 @@ Computing Machinery]
|
||||||
\relax % manuscript
|
\relax % manuscript
|
||||||
\or % acmsmall
|
\or % acmsmall
|
||||||
\or % acmlarge
|
\or % acmlarge
|
||||||
\def\@secfont{\sffamily\large\section@raggedright\MakeUppercase}
|
\def\@secfont{\sffamily\large\section@raggedright\MakeTextUppercase}
|
||||||
\def\@subsecfont{\sffamily\large\section@raggedright}
|
\def\@subsecfont{\sffamily\large\section@raggedright}
|
||||||
\or % acmtog
|
\or % acmtog
|
||||||
\def\@secfont{\sffamily\large\section@raggedright\MakeUppercase}
|
\def\@secfont{\sffamily\large\section@raggedright\MakeTextUppercase}
|
||||||
\def\@subsecfont{\sffamily\large\section@raggedright}
|
\def\@subsecfont{\sffamily\large\section@raggedright}
|
||||||
\or % sigconf
|
\or % sigconf
|
||||||
\def\@secfont{\bfseries\Large\section@raggedright\MakeUppercase}
|
\def\@secfont{\bfseries\Large\section@raggedright\MakeTextUppercase}
|
||||||
\def\@subsecfont{\bfseries\Large\section@raggedright}
|
\def\@subsecfont{\bfseries\Large\section@raggedright}
|
||||||
\or % siggraph
|
\or % siggraph
|
||||||
\def\@secfont{\bfseries\sffamily\Large\section@raggedright\MakeUppercase}
|
\def\@secfont{\sffamily\bfseries\Large\section@raggedright\MakeTextUppercase}
|
||||||
\def\@subsecfont{\bfseries\sffamily\Large\section@raggedright}
|
\def\@subsecfont{\sffamily\bfseries\Large\section@raggedright}
|
||||||
\or % sigplan
|
\or % sigplan
|
||||||
\def\@secfont{\bfseries\Large\section@raggedright}
|
\def\@secfont{\bfseries\Large\section@raggedright}
|
||||||
\def\@subsecfont{\bfseries\section@raggedright}
|
\def\@subsecfont{\bfseries\section@raggedright}
|
||||||
|
@ -2281,12 +2382,12 @@ Computing Machinery]
|
||||||
\def\@subparfont{\itshape}
|
\def\@subparfont{\itshape}
|
||||||
\or % sigchi
|
\or % sigchi
|
||||||
\setcounter{secnumdepth}{1}
|
\setcounter{secnumdepth}{1}
|
||||||
\def\@secfont{\bfseries\sffamily\section@raggedright\MakeUppercase}
|
\def\@secfont{\sffamily\bfseries\section@raggedright\MakeTextUppercase}
|
||||||
\def\@subsecfont{\bfseries\sffamily\section@raggedright}
|
\def\@subsecfont{\sffamily\bfseries\section@raggedright}
|
||||||
\or % sigchi-a
|
\or % sigchi-a
|
||||||
\setcounter{secnumdepth}{0}
|
\setcounter{secnumdepth}{0}
|
||||||
\def\@secfont{\bfseries\sffamily\section@raggedright\MakeUppercase}
|
\def\@secfont{\sffamily\bfseries\section@raggedright\MakeTextUppercase}
|
||||||
\def\@subsecfont{\bfseries\sffamily\section@raggedright}
|
\def\@subsecfont{\sffamily\bfseries\section@raggedright}
|
||||||
\fi
|
\fi
|
||||||
\def\@adddotafter#1{#1\@addpunct{.}}
|
\def\@adddotafter#1{#1\@addpunct{.}}
|
||||||
\def\@addspaceafter#1{#1\@addpunct{\enspace}}
|
\def\@addspaceafter#1{#1\@addpunct{\enspace}}
|
||||||
|
@ -2352,15 +2453,33 @@ Computing Machinery]
|
||||||
{.5em}% spacing after head
|
{.5em}% spacing after head
|
||||||
{\thmname{#1}\thmnumber{ #2}\thmnote{ {\@acmdefinitionnotefont(#3)}}}% head spec
|
{\thmname{#1}\thmnumber{ #2}\thmnote{ {\@acmdefinitionnotefont(#3)}}}% head spec
|
||||||
\theoremstyle{acmplain}
|
\theoremstyle{acmplain}
|
||||||
\newtheorem{theorem}{Theorem}[section]
|
\AtEndPreamble{%
|
||||||
\newtheorem{conjecture}[theorem]{Conjecture}
|
\if@ACM@acmthm
|
||||||
\newtheorem{proposition}[theorem]{Proposition}
|
\theoremstyle{acmplain}
|
||||||
\newtheorem{lemma}[theorem]{Lemma}
|
\@ifundefined{theorem}{%
|
||||||
\newtheorem{corollary}[theorem]{Corollary}
|
\newtheorem{theorem}{Theorem}[section]
|
||||||
\theoremstyle{acmdefinition}
|
}{}
|
||||||
\newtheorem{example}[theorem]{Example}
|
\@ifundefined{conjecture}{%
|
||||||
\newtheorem{definition}[theorem]{Definition}
|
\newtheorem{conjecture}[theorem]{Conjecture}
|
||||||
\theoremstyle{acmplain}
|
}{}
|
||||||
|
\@ifundefined{proposition}{%
|
||||||
|
\newtheorem{proposition}[theorem]{Proposition}
|
||||||
|
}{}
|
||||||
|
\newtheorem{lemma}[theorem]{Lemma}
|
||||||
|
\@ifundefined{lemma}{}{}
|
||||||
|
\@ifundefined{corollary}{%
|
||||||
|
\newtheorem{corollary}[theorem]{Corollary}
|
||||||
|
}{}
|
||||||
|
\theoremstyle{acmdefinition}
|
||||||
|
\@ifundefined{example}{%
|
||||||
|
\newtheorem{example}[theorem]{Example}
|
||||||
|
}{}
|
||||||
|
\@ifundefined{definition}{%
|
||||||
|
\newtheorem{definition}[theorem]{Definition}
|
||||||
|
}{}
|
||||||
|
\fi
|
||||||
|
\theoremstyle{acmplain}
|
||||||
|
}
|
||||||
\def\@proofnamefont{\scshape}
|
\def\@proofnamefont{\scshape}
|
||||||
\def\@proofindent{\indent}
|
\def\@proofindent{\indent}
|
||||||
\ifcase\ACM@format@nr
|
\ifcase\ACM@format@nr
|
||||||
|
@ -2395,6 +2514,7 @@ Computing Machinery]
|
||||||
\def\grantsponsor#1#2#3{#2}
|
\def\grantsponsor#1#2#3{#2}
|
||||||
\newcommand\grantnum[3][]{#3%
|
\newcommand\grantnum[3][]{#3%
|
||||||
\def\@tempa{#1}\ifx\@tempa\@empty\else\space(\url{#1})\fi}
|
\def\@tempa{#1}\ifx\@tempa\@empty\else\space(\url{#1})\fi}
|
||||||
|
\AtEndPreamble{%
|
||||||
\if@ACM@screen
|
\if@ACM@screen
|
||||||
\includecomment{screenonly}
|
\includecomment{screenonly}
|
||||||
\excludecomment{printonly}
|
\excludecomment{printonly}
|
||||||
|
@ -2407,7 +2527,7 @@ Computing Machinery]
|
||||||
\excludecomment{acks}
|
\excludecomment{acks}
|
||||||
\else
|
\else
|
||||||
\includecomment{anonsuppress}
|
\includecomment{anonsuppress}
|
||||||
\fi
|
\fi}
|
||||||
\newcommand\showeprint[2][arxiv]{%
|
\newcommand\showeprint[2][arxiv]{%
|
||||||
\def\@tempa{#1}%
|
\def\@tempa{#1}%
|
||||||
\ifx\@tempa\@empty\def\@tempa{arxiv}\fi
|
\ifx\@tempa\@empty\def\@tempa{arxiv}\fi
|
||||||
|
|
|
@ -23,4 +23,6 @@
|
||||||
% Normally gets re-written by the title macro:
|
% Normally gets re-written by the title macro:
|
||||||
\newcommand{\SSubtitle}[1]{{\bf #1}}
|
\newcommand{\SSubtitle}[1]{{\bf #1}}
|
||||||
|
|
||||||
|
% Use ACM color; it would be better to use `citecolor` here somehow,
|
||||||
|
% but I can't figure out how to do that
|
||||||
|
\newcommand{\AutobibLink}[1]{\color{ACMPurple}{#1}}
|
||||||
|
|
|
@ -142,8 +142,16 @@
|
||||||
#:replacements (hash "scribble-load-replace.tex" (scribble-file "acmart/acmart-load.tex"))))))
|
#:replacements (hash "scribble-load-replace.tex" (scribble-file "acmart/acmart-load.tex"))))))
|
||||||
|
|
||||||
(define (add-acmart-styles doc)
|
(define (add-acmart-styles doc)
|
||||||
;; Ensure that "acmart.tex" is used, since "style.tex"
|
(struct-copy part doc
|
||||||
;; re-defines commands.
|
[to-collect
|
||||||
(struct-copy part doc [to-collect
|
;; Ensure that "acmart.tex" is used, since "style.tex"
|
||||||
(cons invisible-element-to-collect-for-acmart-extras
|
;; re-defines commands.
|
||||||
(part-to-collect doc))]))
|
(cons invisible-element-to-collect-for-acmart-extras
|
||||||
|
(part-to-collect doc))]
|
||||||
|
[style (let ([s (part-style doc)])
|
||||||
|
(struct-copy style s
|
||||||
|
[properties
|
||||||
|
;; Immitate Latex-based links where only the
|
||||||
|
;; number part is hyperlinked.
|
||||||
|
(cons (link-render-style 'number)
|
||||||
|
(style-properties s))]))]))
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
render-nested-flow
|
render-nested-flow
|
||||||
render-block
|
render-block
|
||||||
render-other
|
render-other
|
||||||
|
link-render-style-at-element
|
||||||
get-dest-directory
|
get-dest-directory
|
||||||
format-number
|
format-number
|
||||||
number-depth))
|
number-depth))
|
||||||
|
@ -606,17 +607,28 @@
|
||||||
number))
|
number))
|
||||||
sub-pos
|
sub-pos
|
||||||
sub-numberers))
|
sub-numberers))
|
||||||
|
(define unnumbered-and-unnumbered-subsections?
|
||||||
|
(and (not sub-grouper?)
|
||||||
|
;; If this section wasn't marked with
|
||||||
|
;; 'grouper but is unnumbered and doesn't
|
||||||
|
;; have numbered subsections, then didn't
|
||||||
|
;; reset counters, so propagate the old
|
||||||
|
;; position
|
||||||
|
(and unnumbered?
|
||||||
|
(= next-sub-pos sub-pos))))
|
||||||
(loop (cdr parts)
|
(loop (cdr parts)
|
||||||
(if (or unnumbered? numberer)
|
(if (or unnumbered? numberer)
|
||||||
pos
|
pos
|
||||||
(add1 pos))
|
(add1 pos))
|
||||||
next-numberers
|
next-numberers
|
||||||
(if sub-grouper?
|
(cond
|
||||||
next-sub-pos
|
[sub-grouper? next-sub-pos]
|
||||||
1)
|
[unnumbered-and-unnumbered-subsections? sub-pos]
|
||||||
(if sub-grouper?
|
[else 1])
|
||||||
next-sub-numberers
|
(cond
|
||||||
#hash())))))))
|
[sub-grouper? next-sub-numberers]
|
||||||
|
[unnumbered-and-unnumbered-subsections? sub-numberers]
|
||||||
|
[else #hash()])))))))
|
||||||
(let ([prefix (part-tag-prefix d)])
|
(let ([prefix (part-tag-prefix d)])
|
||||||
(for ([(k v) (collect-info-ht p-ci)])
|
(for ([(k v) (collect-info-ht p-ci)])
|
||||||
(when (cadr k)
|
(when (cadr k)
|
||||||
|
@ -737,7 +749,8 @@
|
||||||
|
|
||||||
(define/public (resolve-part d ri)
|
(define/public (resolve-part d ri)
|
||||||
(parameterize ([current-tag-prefixes
|
(parameterize ([current-tag-prefixes
|
||||||
(extend-prefix d (fresh-tag-resolve-context? d ri))])
|
(extend-prefix d (fresh-tag-resolve-context? d ri))]
|
||||||
|
[current-link-render-style (part-render-style d)])
|
||||||
(when (part-title-content d)
|
(when (part-title-content d)
|
||||||
(resolve-content (part-title-content d) d ri))
|
(resolve-content (part-title-content d) d ri))
|
||||||
(resolve-flow (part-blocks d) d ri)
|
(resolve-flow (part-blocks d) d ri)
|
||||||
|
@ -811,6 +824,15 @@
|
||||||
[(multiarg-element? i)
|
[(multiarg-element? i)
|
||||||
(resolve-content (multiarg-element-contents i) d ri)]))
|
(resolve-content (multiarg-element-contents i) d ri)]))
|
||||||
|
|
||||||
|
(define/public (link-render-style-at-element e)
|
||||||
|
(link-render-style-mode
|
||||||
|
(or (let ([s (element-style e)])
|
||||||
|
(and (style? s)
|
||||||
|
(for/or ([p (in-list (style-properties s))]
|
||||||
|
#:when (link-render-style? p))
|
||||||
|
p)))
|
||||||
|
(current-link-render-style))))
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
;; render methods
|
;; render methods
|
||||||
|
|
||||||
|
@ -871,9 +893,16 @@
|
||||||
|
|
||||||
(define/public (render-part d ri)
|
(define/public (render-part d ri)
|
||||||
(parameterize ([current-tag-prefixes
|
(parameterize ([current-tag-prefixes
|
||||||
(extend-prefix d (fresh-tag-render-context? d ri))])
|
(extend-prefix d (fresh-tag-render-context? d ri))]
|
||||||
|
[current-link-render-style (part-render-style d)])
|
||||||
(render-part-content d ri)))
|
(render-part-content d ri)))
|
||||||
|
|
||||||
|
(define/private (part-render-style d)
|
||||||
|
(or (for/or ([p (in-list (style-properties (part-style d)))]
|
||||||
|
#:when (link-render-style? p))
|
||||||
|
p)
|
||||||
|
(current-link-render-style)))
|
||||||
|
|
||||||
(define/public (render-part-content d ri)
|
(define/public (render-part-content d ri)
|
||||||
(list
|
(list
|
||||||
(when (part-title-content d)
|
(when (part-title-content d)
|
||||||
|
@ -962,7 +991,11 @@
|
||||||
(render-content (traverse-element-content i ri) part ri)]
|
(render-content (traverse-element-content i ri) part ri)]
|
||||||
[(part-relative-element? i)
|
[(part-relative-element? i)
|
||||||
(render-content (part-relative-element-content i ri) part ri)]
|
(render-content (part-relative-element-content i ri) part ri)]
|
||||||
[(convertible? i) (list "???")]
|
[(convertible? i)
|
||||||
|
(define s (convert i 'text))
|
||||||
|
(if (string? s)
|
||||||
|
(render-other s part ri)
|
||||||
|
(render-other (format "~s" i) part ri))]
|
||||||
[else (render-other i part ri)]))
|
[else (render-other i part ri)]))
|
||||||
|
|
||||||
(define/public (render-other i part ri)
|
(define/public (render-other i part ri)
|
||||||
|
|
|
@ -549,45 +549,55 @@
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
(provide/contract
|
(provide
|
||||||
[elemtag (->* ((or/c taglet? generated-tag?))
|
(contract-out
|
||||||
()
|
[elemtag (->* ((or/c taglet? generated-tag?))
|
||||||
#:rest (listof pre-content?)
|
()
|
||||||
element?)]
|
#:rest (listof pre-content?)
|
||||||
[elemref (->* ((or/c taglet? generated-tag?))
|
element?)]
|
||||||
(#:underline? any/c)
|
[elemref (->* ((or/c taglet? generated-tag?))
|
||||||
#:rest (listof pre-content?)
|
(#:underline? any/c)
|
||||||
element?)]
|
#:rest (listof pre-content?)
|
||||||
[secref (->* (string?)
|
element?)]
|
||||||
(#:doc module-path?
|
[secref (->* (string?)
|
||||||
#:tag-prefixes (or/c #f (listof string?))
|
|
||||||
#:underline? any/c)
|
|
||||||
element?)]
|
|
||||||
[Secref (->* (string?)
|
|
||||||
(#:doc module-path?
|
|
||||||
#:tag-prefixes (or/c #f (listof string?))
|
|
||||||
#:underline? any/c)
|
|
||||||
element?)]
|
|
||||||
[seclink (->* (string?)
|
|
||||||
(#:doc module-path?
|
(#:doc module-path?
|
||||||
#:tag-prefixes (or/c #f (listof string?))
|
#:tag-prefixes (or/c #f (listof string?))
|
||||||
#:underline? any/c
|
#:underline? any/c
|
||||||
#:indirect? any/c)
|
#:link-render-style (or/c #f link-render-style?))
|
||||||
#:rest (listof pre-content?)
|
|
||||||
element?)]
|
element?)]
|
||||||
[other-doc (->* (module-path?)
|
[Secref (->* (string?)
|
||||||
(#:underline? any/c
|
(#:doc module-path?
|
||||||
#:indirect (or/c #f content?))
|
#:tag-prefixes (or/c #f (listof string?))
|
||||||
element?)])
|
#:underline? any/c
|
||||||
|
#:link-render-style (or/c #f link-render-style?))
|
||||||
|
element?)]
|
||||||
|
[seclink (->* (string?)
|
||||||
|
(#:doc module-path?
|
||||||
|
#:tag-prefixes (or/c #f (listof string?))
|
||||||
|
#:underline? any/c
|
||||||
|
#:indirect? any/c)
|
||||||
|
#:rest (listof pre-content?)
|
||||||
|
element?)]
|
||||||
|
[other-doc (->* (module-path?)
|
||||||
|
(#:underline? any/c
|
||||||
|
#:indirect (or/c #f content?))
|
||||||
|
element?)]))
|
||||||
|
|
||||||
(define (elemtag t . body)
|
(define (elemtag t . body)
|
||||||
(make-target-element #f (decode-content body) `(elem ,t)))
|
(make-target-element #f (decode-content body) `(elem ,t)))
|
||||||
(define (elemref #:underline? [u? #t] t . body)
|
(define (elemref #:underline? [u? #t] t . body)
|
||||||
(make-link-element (if u? #f "plainlink") (decode-content body) `(elem ,t)))
|
(make-link-element (if u? #f "plainlink") (decode-content body) `(elem ,t)))
|
||||||
|
|
||||||
(define (secref s #:underline? [u? #t] #:doc [doc #f] #:tag-prefixes [prefix #f])
|
(define (secref s #:underline? [u? #t] #:doc [doc #f] #:tag-prefixes [prefix #f]
|
||||||
(make-link-element (if u? #f "plainlink") null (make-section-tag s #:doc doc #:tag-prefixes prefix)))
|
#:link-render-style [link-style #f])
|
||||||
(define (Secref s #:underline? [u? #t] #:doc [doc #f] #:tag-prefixes [prefix #f])
|
(make-link-element (let ([name (if u? #f "plainlink")])
|
||||||
|
(if link-style
|
||||||
|
(style name (list link-style))
|
||||||
|
name))
|
||||||
|
null
|
||||||
|
(make-section-tag s #:doc doc #:tag-prefixes prefix)))
|
||||||
|
(define (Secref s #:underline? [u? #t] #:doc [doc #f] #:tag-prefixes [prefix #f]
|
||||||
|
#:link-render-style [link-style #f])
|
||||||
(let ([le (secref s #:underline? u? #:doc doc #:tag-prefixes prefix)])
|
(let ([le (secref s #:underline? u? #:doc doc #:tag-prefixes prefix)])
|
||||||
(make-link-element
|
(make-link-element
|
||||||
(make-style (element-style le) '(uppercase))
|
(make-style (element-style le) '(uppercase))
|
||||||
|
|
|
@ -162,6 +162,36 @@
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
|
(define-struct link-render-style (mode)
|
||||||
|
#:constructor-name link-render-style
|
||||||
|
#:property
|
||||||
|
prop:serializable
|
||||||
|
(make-serialize-info
|
||||||
|
(lambda (s)
|
||||||
|
(vector (link-render-style-mode s)))
|
||||||
|
#'deserialize-link-render-style
|
||||||
|
#f
|
||||||
|
(or (current-load-relative-directory) (current-directory))))
|
||||||
|
|
||||||
|
(provide deserialize-link-render-style)
|
||||||
|
(define deserialize-link-render-style
|
||||||
|
(make-deserialize-info (lambda (s)
|
||||||
|
(link-render-style s))
|
||||||
|
(lambda (tag init-val)
|
||||||
|
(error "cannot allocate link-render-style for cycle"))))
|
||||||
|
|
||||||
|
(define current-link-render-style (make-parameter (link-render-style 'default)))
|
||||||
|
|
||||||
|
(provide
|
||||||
|
link-render-style?
|
||||||
|
link-render-style-mode
|
||||||
|
(contract-out
|
||||||
|
[link-render-style ((or/c 'default 'number)
|
||||||
|
. -> . link-render-style?)]
|
||||||
|
[current-link-render-style (parameter/c link-render-style?)]))
|
||||||
|
|
||||||
|
;; ----------------------------------------
|
||||||
|
|
||||||
(define-struct numberer (tag step-proc initial-value)
|
(define-struct numberer (tag step-proc initial-value)
|
||||||
#:constructor-name numberer
|
#:constructor-name numberer
|
||||||
#:property
|
#:property
|
||||||
|
|
|
@ -167,7 +167,8 @@
|
||||||
keys k-tags)
|
keys k-tags)
|
||||||
colls)])
|
colls)])
|
||||||
(if (and title
|
(if (and title
|
||||||
(not (memq 'hidden (style-properties style))))
|
(not (memq 'hidden (style-properties style)))
|
||||||
|
(not (memq 'no-index (style-properties style))))
|
||||||
(cons (make-index-element
|
(cons (make-index-element
|
||||||
#f null (car tags)
|
#f null (car tags)
|
||||||
(list (clean-up-index-string
|
(list (clean-up-index-string
|
||||||
|
@ -258,9 +259,6 @@
|
||||||
[(list? (car l))
|
[(list? (car l))
|
||||||
(loop (append (car l) (cdr l))
|
(loop (append (car l) (cdr l))
|
||||||
next? keys colls accum title tag-prefix tags vers style)]
|
next? keys colls accum title tag-prefix tags vers style)]
|
||||||
[(null? (cdr l))
|
|
||||||
(loop null #f keys colls (cons (car l) accum) title tag-prefix tags
|
|
||||||
vers style)]
|
|
||||||
[(part-index-decl? (car l))
|
[(part-index-decl? (car l))
|
||||||
(loop (cdr l) next? (cons (car l) keys) colls accum title tag-prefix
|
(loop (cdr l) next? (cons (car l) keys) colls accum title tag-prefix
|
||||||
tags vers style)]
|
tags vers style)]
|
||||||
|
@ -272,6 +270,9 @@
|
||||||
(loop (cdr l) next? keys colls accum title tag-prefix
|
(loop (cdr l) next? keys colls accum title tag-prefix
|
||||||
(append tags (list (part-tag-decl-tag (car l))))
|
(append tags (list (part-tag-decl-tag (car l))))
|
||||||
vers style)]
|
vers style)]
|
||||||
|
[(null? (cdr l))
|
||||||
|
(loop null #f keys colls (cons (car l) accum) title tag-prefix tags
|
||||||
|
vers style)]
|
||||||
[(and (pair? (cdr l))
|
[(and (pair? (cdr l))
|
||||||
(or (splice? (cadr l))
|
(or (splice? (cadr l))
|
||||||
(list? (cadr l))))
|
(list? (cadr l))))
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
(-> any/c any)]
|
(-> any/c any)]
|
||||||
|
|
||||||
[scribble-exn->string
|
[scribble-exn->string
|
||||||
(-> any/c string?)]
|
(parameter/c (-> any/c string?))]
|
||||||
[scribble-eval-handler
|
[scribble-eval-handler
|
||||||
(parameter/c (-> (-> any/c any) boolean? any/c any))]
|
(parameter/c (-> (-> any/c any) boolean? any/c any))]
|
||||||
[make-log-based-eval
|
[make-log-based-eval
|
||||||
|
|
|
@ -277,7 +277,8 @@
|
||||||
extract-part-style-files
|
extract-part-style-files
|
||||||
extract-version
|
extract-version
|
||||||
extract-authors
|
extract-authors
|
||||||
extract-pretitle)
|
extract-pretitle
|
||||||
|
link-render-style-at-element)
|
||||||
(inherit-field prefix-file style-file style-extra-files image-preferences)
|
(inherit-field prefix-file style-file style-extra-files image-preferences)
|
||||||
|
|
||||||
(init-field [alt-paths null]
|
(init-field [alt-paths null]
|
||||||
|
@ -373,7 +374,7 @@
|
||||||
(collect-put! ci key
|
(collect-put! ci key
|
||||||
(let ([v (vector (or (part-title-content d) '("???"))
|
(let ([v (vector (or (part-title-content d) '("???"))
|
||||||
(add-current-tag-prefix key)
|
(add-current-tag-prefix key)
|
||||||
number ; for consistency with base
|
number
|
||||||
(and (current-output-file)
|
(and (current-output-file)
|
||||||
(path->relative (current-output-file)))
|
(path->relative (current-output-file)))
|
||||||
(current-part-whole-page? d))])
|
(current-part-whole-page? d))])
|
||||||
|
@ -407,6 +408,8 @@
|
||||||
(vector-ref dest 3))
|
(vector-ref dest 3))
|
||||||
(define (dest-title dest)
|
(define (dest-title dest)
|
||||||
(vector-ref dest 0))
|
(vector-ref dest 0))
|
||||||
|
(define (dest-number dest)
|
||||||
|
(vector-ref dest 2))
|
||||||
(define (dest-page? dest)
|
(define (dest-page? dest)
|
||||||
(vector-ref dest 4))
|
(vector-ref dest 4))
|
||||||
(define (dest-anchor dest)
|
(define (dest-anchor dest)
|
||||||
|
@ -1341,13 +1344,31 @@
|
||||||
[(and (link-element? e) (not (current-no-links)))
|
[(and (link-element? e) (not (current-no-links)))
|
||||||
(parameterize ([current-no-links #t])
|
(parameterize ([current-no-links #t])
|
||||||
(define indirect-link? (link-element-indirect? e))
|
(define indirect-link? (link-element-indirect? e))
|
||||||
(let-values ([(dest ext-id)
|
(let*-values ([(dest ext-id)
|
||||||
(if (and indirect-link?
|
(if (and indirect-link?
|
||||||
external-tag-path)
|
external-tag-path)
|
||||||
(values #f #f)
|
(values #f #f)
|
||||||
(resolve-get/ext-id part ri (link-element-tag e)))])
|
(resolve-get/ext-id part ri (link-element-tag e)))]
|
||||||
|
[(number-link?)
|
||||||
|
(and dest
|
||||||
|
(not ext-id)
|
||||||
|
(let ([n (dest-number dest)])
|
||||||
|
;; If the section number is empty, don't generate an
|
||||||
|
;; empty link:
|
||||||
|
(not (or (not n)
|
||||||
|
(string=? "" (apply string-append (format-number n '("")))))))
|
||||||
|
(eq? 'number (link-render-style-at-element e))
|
||||||
|
(empty-content? (element-content e)))])
|
||||||
|
|
||||||
(if (or indirect-link? dest)
|
(if (or indirect-link? dest)
|
||||||
`((a ([href
|
`(,@(cond
|
||||||
|
[number-link?
|
||||||
|
`(,(if (let ([s (element-style e)])
|
||||||
|
(and (style? s) (memq 'uppercase (style-properties s))))
|
||||||
|
"Section "
|
||||||
|
"section "))]
|
||||||
|
[else '()])
|
||||||
|
(a ([href
|
||||||
,(cond
|
,(cond
|
||||||
[(and ext-id external-root-url dest
|
[(and ext-id external-root-url dest
|
||||||
(let* ([ref-path (relative->path (dest-path dest))]
|
(let* ([ref-path (relative->path (dest-path dest))]
|
||||||
|
@ -1401,7 +1422,10 @@
|
||||||
null))
|
null))
|
||||||
[data-pltdoc "x"])
|
[data-pltdoc "x"])
|
||||||
,@(if (empty-content? (element-content e))
|
,@(if (empty-content? (element-content e))
|
||||||
(render-content (strip-aux (dest-title dest)) part ri)
|
(cond
|
||||||
|
[number-link? (format-number (dest-number dest) '(""))]
|
||||||
|
[else
|
||||||
|
(render-content (strip-aux (dest-title dest)) part ri)])
|
||||||
(render-content (element-content e) part ri))))
|
(render-content (element-content e) part ri))))
|
||||||
(begin
|
(begin
|
||||||
(when #f
|
(when #f
|
||||||
|
@ -2013,9 +2037,9 @@
|
||||||
(loop (cdr path) (cdr root)))))))))
|
(loop (cdr path) (cdr root)))))))))
|
||||||
|
|
||||||
(define (from-root p d)
|
(define (from-root p d)
|
||||||
(define c-p (path->complete-path p))
|
(define c-p (simplify-path (path->complete-path p)))
|
||||||
(define e-p (explode c-p))
|
(define e-p (explode c-p))
|
||||||
(define e-d (and d (explode (path->complete-path d))))
|
(define e-d (and d (explode (simplify-path (path->complete-path d)))))
|
||||||
(define p-in? (in-plt? e-p))
|
(define p-in? (in-plt? e-p))
|
||||||
(define d-in? (and d (in-plt? e-d)))
|
(define d-in? (and d (in-plt? e-d)))
|
||||||
(define (normalize p) (normal-case-path p))
|
(define (normalize p) (normal-case-path p))
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
(define disable-images (make-parameter #f))
|
(define disable-images (make-parameter #f))
|
||||||
(define escape-brackets (make-parameter #f))
|
(define escape-brackets (make-parameter #f))
|
||||||
(define suppress-newline-content (make-parameter #f))
|
(define suppress-newline-content (make-parameter #f))
|
||||||
|
(define disable-hyperref (make-parameter #f))
|
||||||
|
|
||||||
(define-struct (toc-paragraph paragraph) ())
|
(define-struct (toc-paragraph paragraph) ())
|
||||||
|
|
||||||
|
@ -81,7 +82,8 @@
|
||||||
extract-version
|
extract-version
|
||||||
extract-date
|
extract-date
|
||||||
extract-authors
|
extract-authors
|
||||||
extract-pretitle-content)
|
extract-pretitle-content
|
||||||
|
link-render-style-at-element)
|
||||||
|
|
||||||
(define/public (extract-short-title d)
|
(define/public (extract-short-title d)
|
||||||
(ormap (lambda (v)
|
(ormap (lambda (v)
|
||||||
|
@ -243,12 +245,14 @@
|
||||||
(printf "{")
|
(printf "{")
|
||||||
(show-number)
|
(show-number)
|
||||||
(parameterize ([disable-images #t]
|
(parameterize ([disable-images #t]
|
||||||
[escape-brackets #t])
|
[escape-brackets #t]
|
||||||
|
[disable-hyperref #t])
|
||||||
(render-content (part-title-content d) d ri))
|
(render-content (part-title-content d) d ri))
|
||||||
(printf "}"))
|
(printf "}"))
|
||||||
(printf "{")
|
(printf "{")
|
||||||
(show-number)
|
(show-number)
|
||||||
(render-content (part-title-content d) d ri)
|
(parameterize ([disable-hyperref #t])
|
||||||
|
(render-content (part-title-content d) d ri))
|
||||||
(printf "}")
|
(printf "}")
|
||||||
(when (and (part-style? d 'hidden-number)
|
(when (and (part-style? d 'hidden-number)
|
||||||
(not (part-style? d 'unnumbered)))
|
(not (part-style? d 'unnumbered)))
|
||||||
|
@ -344,13 +348,15 @@
|
||||||
(format-number number null))]
|
(format-number number null))]
|
||||||
[lbl? (and dest
|
[lbl? (and dest
|
||||||
(not ext?)
|
(not ext?)
|
||||||
(not (show-link-page-numbers)))])
|
(not (show-link-page-numbers)))]
|
||||||
|
[link-number? (and lbl?
|
||||||
|
(eq? 'number (link-render-style-at-element e)))])
|
||||||
(printf "\\~aRef~a~a~a{"
|
(printf "\\~aRef~a~a~a{"
|
||||||
(case (and dest (number-depth number))
|
(case (and dest (number-depth number))
|
||||||
[(0) "Book"]
|
[(0) "Book"]
|
||||||
[(1) (if (string? (car number)) "Part" "Chap")]
|
[(1) (if (string? (car number)) "Part" "Chap")]
|
||||||
[else "Sec"])
|
[else "Sec"])
|
||||||
(if lbl?
|
(if (and lbl? (not link-number?))
|
||||||
"Local"
|
"Local"
|
||||||
"")
|
"")
|
||||||
(if (let ([s (element-style e)])
|
(if (let ([s (element-style e)])
|
||||||
|
@ -360,9 +366,10 @@
|
||||||
(if (null? formatted-number)
|
(if (null? formatted-number)
|
||||||
"UN"
|
"UN"
|
||||||
""))
|
""))
|
||||||
(when lbl?
|
(when (and lbl? (not link-number?))
|
||||||
(printf "t:~a}{" (t-encode (vector-ref dest 1))))
|
(printf "t:~a}{" (t-encode (vector-ref dest 1))))
|
||||||
(unless (null? formatted-number)
|
(unless (null? formatted-number)
|
||||||
|
(when link-number? (printf "\\SectionNumberLink{t:~a}{" (t-encode (vector-ref dest 1))))
|
||||||
(render-content
|
(render-content
|
||||||
(if dest
|
(if dest
|
||||||
(if (list? number)
|
(if (list? number)
|
||||||
|
@ -373,6 +380,7 @@
|
||||||
'("!!!")))
|
'("!!!")))
|
||||||
(list "???"))
|
(list "???"))
|
||||||
part ri)
|
part ri)
|
||||||
|
(when link-number? (printf "}"))
|
||||||
(printf "}{"))))
|
(printf "}{"))))
|
||||||
(let* ([es (cond
|
(let* ([es (cond
|
||||||
[(element? e) (element-style e)]
|
[(element? e) (element-style e)]
|
||||||
|
@ -382,6 +390,11 @@
|
||||||
(style-name es)
|
(style-name es)
|
||||||
es)]
|
es)]
|
||||||
[style (and (style? es) es)]
|
[style (and (style? es) es)]
|
||||||
|
[hyperref? (and (not part-label?)
|
||||||
|
(link-element? e)
|
||||||
|
(not (disable-hyperref))
|
||||||
|
(let-values ([(dest ext?) (resolve-get/ext? part ri (link-element-tag e))])
|
||||||
|
(and dest (not ext?))))]
|
||||||
[check-render
|
[check-render
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (render-element? e)
|
(when (render-element? e)
|
||||||
|
@ -520,9 +533,15 @@
|
||||||
(wrap e style-name 'exact)]
|
(wrap e style-name 'exact)]
|
||||||
[else
|
[else
|
||||||
(core-render e tt?)]))
|
(core-render e tt?)]))
|
||||||
|
(when hyperref?
|
||||||
|
(printf "\\hyperref[t:~a]{"
|
||||||
|
(t-encode (link-element-tag e))))
|
||||||
(let loop ([l (if style (style-properties style) null)] [tt? #f])
|
(let loop ([l (if style (style-properties style) null)] [tt? #f])
|
||||||
(if (null? l)
|
(if (null? l)
|
||||||
(finish tt?)
|
(if hyperref?
|
||||||
|
(parameterize ([disable-hyperref #t])
|
||||||
|
(finish tt?))
|
||||||
|
(finish tt?))
|
||||||
(let ([v (car l)])
|
(let ([v (car l)])
|
||||||
(cond
|
(cond
|
||||||
[(target-url? v)
|
[(target-url? v)
|
||||||
|
@ -560,7 +579,9 @@
|
||||||
(loop (cdr l) tt?)
|
(loop (cdr l) tt?)
|
||||||
(for ([l (in-list (command-extras-arguments (car l)))])
|
(for ([l (in-list (command-extras-arguments (car l)))])
|
||||||
(printf "{~a}" l))]
|
(printf "{~a}" l))]
|
||||||
[else (loop (cdr l) tt?)]))))))
|
[else (loop (cdr l) tt?)]))))
|
||||||
|
(when hyperref?
|
||||||
|
(printf "}"))))
|
||||||
(when part-label?
|
(when part-label?
|
||||||
(printf "}"))
|
(printf "}"))
|
||||||
(when (and (link-element? e)
|
(when (and (link-element? e)
|
||||||
|
@ -1116,8 +1137,8 @@
|
||||||
[(#\ϑ) "$\\vartheta$"]
|
[(#\ϑ) "$\\vartheta$"]
|
||||||
[(#\τ) "$\\tau$"]
|
[(#\τ) "$\\tau$"]
|
||||||
[(#\υ) "$\\upsilon$"]
|
[(#\υ) "$\\upsilon$"]
|
||||||
[(#\φ) "$\\phi$"]
|
[(#\φ) "$\\varphi$"]
|
||||||
[(#\ϕ) "$\\varphi$"]
|
[(#\ϕ) "$\\phi$"]
|
||||||
[(#\δ) "$\\delta$"]
|
[(#\δ) "$\\delta$"]
|
||||||
[(#\ρ) "$\\rho$"]
|
[(#\ρ) "$\\rho$"]
|
||||||
[(#\ϱ) "$\\varrho$"]
|
[(#\ϱ) "$\\varrho$"]
|
||||||
|
|
|
@ -263,6 +263,10 @@ a:hover {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Default to local view. Global will specialize */
|
||||||
|
.plt_global_only { display: none; }
|
||||||
|
.plt_local_only { display: block; }
|
||||||
|
|
||||||
/* ---------------------------------------- */
|
/* ---------------------------------------- */
|
||||||
/* Version */
|
/* Version */
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
setup/main-collects
|
setup/main-collects
|
||||||
pkg/path
|
pkg/path
|
||||||
racket/list
|
racket/list
|
||||||
|
scribble/html-properties
|
||||||
(for-syntax scheme/base
|
(for-syntax scheme/base
|
||||||
syntax/parse)
|
syntax/parse)
|
||||||
(for-label scheme/base))
|
(for-label scheme/base))
|
||||||
|
@ -201,6 +202,21 @@
|
||||||
(list pkg)
|
(list pkg)
|
||||||
null)))
|
null)))
|
||||||
|
|
||||||
|
;; mflatt thinks this should not be exposed
|
||||||
|
(define (racketpkgname pkg)
|
||||||
|
(link
|
||||||
|
;; XXX Look at (pkg-info-orig-pkg (hash-ref (read-pkgs-db scope)
|
||||||
|
;; pkg)) and only show link if catalog? Or did mflatt have
|
||||||
|
;; something else in mind? But I'd have to know the scope and pass
|
||||||
|
;; that down from compute-packages
|
||||||
|
(format "https://pkgs.racket-lang.org/package/~a" pkg)
|
||||||
|
(tt pkg)
|
||||||
|
#:style (make-style #f
|
||||||
|
(list "plainlink"
|
||||||
|
(hover-property
|
||||||
|
(format "Install this package using `raco pkg install ~a`"
|
||||||
|
pkg))))))
|
||||||
|
|
||||||
(define (*defmodule names modpaths module-path packages link-target? lang content req)
|
(define (*defmodule names modpaths module-path packages link-target? lang content req)
|
||||||
(let ([modpaths (or modpaths names)])
|
(let ([modpaths (or modpaths names)])
|
||||||
(define pkg-spec
|
(define pkg-spec
|
||||||
|
@ -218,7 +234,8 @@
|
||||||
""
|
""
|
||||||
"s")))
|
"s")))
|
||||||
" "
|
" "
|
||||||
(add-between (map tt pkgs) ", "))))))))))
|
(add-between (map racketpkgname pkgs)
|
||||||
|
", "))))))))))
|
||||||
(define (flow-width f) (apply max (map block-width f)))
|
(define (flow-width f) (apply max (map block-width f)))
|
||||||
(define libs-specs
|
(define libs-specs
|
||||||
;; make-desc : element -> flow
|
;; make-desc : element -> flow
|
||||||
|
|
|
@ -59,13 +59,15 @@
|
||||||
|
|
||||||
\newcommand{\BookRefLocalUN}[2]{\hyperref[#1]{\BookRefUN{#2}}}
|
\newcommand{\BookRefLocalUN}[2]{\hyperref[#1]{\BookRefUN{#2}}}
|
||||||
\newcommand{\ChapRefLocalUN}[2]{\SecRefLocalUN{#1}{#2}}
|
\newcommand{\ChapRefLocalUN}[2]{\SecRefLocalUN{#1}{#2}}
|
||||||
\newcommand{\SecRefLocalUN}[2]{\SecRefUN{#2} on page~\pageref{#1}}
|
\newcommand{\SecRefLocalUN}[2]{\hyperref[#1]{\SecRefUN{#2}}}
|
||||||
\newcommand{\PartRefLocalUN}[2]{\SecRefLocalUN{#1}{#2}}
|
\newcommand{\PartRefLocalUN}[2]{\SecRefLocalUN{#1}{#2}}
|
||||||
\newcommand{\BookRefLocalUCUN}[2]{\BookRefLocalUN{#1}{#2}}
|
\newcommand{\BookRefLocalUCUN}[2]{\BookRefLocalUN{#1}{#2}}
|
||||||
\newcommand{\ChapRefLocalUCUN}[2]{\ChapRefLocalUN{#1}{#2}}
|
\newcommand{\ChapRefLocalUCUN}[2]{\ChapRefLocalUN{#1}{#2}}
|
||||||
\newcommand{\SecRefLocalUCUN}[2]{\SecRefLocalUN{#1}{#2}}
|
\newcommand{\SecRefLocalUCUN}[2]{\SecRefLocalUN{#1}{#2}}
|
||||||
\newcommand{\PartRefLocalUCUN}[2]{\PartRefLocalUN{#1}{#2}}
|
\newcommand{\PartRefLocalUCUN}[2]{\PartRefLocalUN{#1}{#2}}
|
||||||
|
|
||||||
|
\newcommand{\SectionNumberLink}[2]{\hyperref[#1]{#2}}
|
||||||
|
|
||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
% Fonts
|
% Fonts
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
(define valid-blueboxes-info?
|
(define valid-blueboxes-info?
|
||||||
(hash/c
|
(hash/c
|
||||||
tag?
|
tag?
|
||||||
(listof (cons/dc [hd exact-nonnegative-integer?]
|
(listof (cons/c exact-nonnegative-integer?
|
||||||
[tl (hd) (and/c exact-nonnegative-integer?
|
exact-nonnegative-integer?))
|
||||||
(>/c hd))]
|
|
||||||
#:flat))
|
|
||||||
#:flat? #t))
|
#:flat? #t))
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
racket/contract)
|
racket/contract)
|
||||||
|
|
||||||
(provide define-cite
|
(provide define-cite
|
||||||
author+date-style number-style
|
author+date-style author+date-square-bracket-style number-style
|
||||||
make-bib in-bib (rename-out [auto-bib? bib?])
|
make-bib in-bib (rename-out [auto-bib? bib?])
|
||||||
author-name org-author-name
|
author-name org-author-name
|
||||||
(contract-out
|
(contract-out
|
||||||
|
@ -70,26 +70,28 @@
|
||||||
(lambda (renderer part ri)
|
(lambda (renderer part ri)
|
||||||
;; (list which key) should be mapped to the bibliography element.
|
;; (list which key) should be mapped to the bibliography element.
|
||||||
(define s (resolve-get part ri `(,which ,key)))
|
(define s (resolve-get part ri `(,which ,key)))
|
||||||
(make-link-element #f
|
(define content
|
||||||
(list (or s "???")
|
(list (or s "???")
|
||||||
(cond [(not (send style disambiguate-date?)) '()]
|
(cond [(not (send style disambiguate-date?)) '()]
|
||||||
[disambiguation ;; should be a list of bib-entries with same author/date
|
[disambiguation ;; should be a list of bib-entries with same author/date
|
||||||
(define disambiguation*
|
(define disambiguation*
|
||||||
(add-between (for/list ([bib (in-list disambiguation)])
|
(add-between (for/list ([bib (in-list disambiguation)])
|
||||||
(define key (auto-bib-key bib))
|
(define key (auto-bib-key bib))
|
||||||
(define maybe-disambiguation
|
(define maybe-disambiguation
|
||||||
(resolve-get part ri `(autobib-disambiguation ,key)))
|
(resolve-get part ri `(autobib-disambiguation ,key)))
|
||||||
(case maybe-disambiguation
|
(case maybe-disambiguation
|
||||||
[(#f) #f]
|
[(#f) #f]
|
||||||
[(unambiguous) #f]
|
[(unambiguous) #f]
|
||||||
[else (make-link-element #f maybe-disambiguation `(autobib ,key))]))
|
[else (make-link-element "AutobibLink" maybe-disambiguation `(autobib ,key))]))
|
||||||
","))
|
","))
|
||||||
(cond [(not (car disambiguation*)) '()] ;; the bib was unambiguous
|
(cond [(not (car disambiguation*)) '()] ;; the bib was unambiguous
|
||||||
[else disambiguation*])]
|
[else disambiguation*])]
|
||||||
[else '()])
|
[else '()])
|
||||||
(if with-specific?
|
(if with-specific?
|
||||||
(auto-bib-specific bib-entry)
|
(auto-bib-specific bib-entry)
|
||||||
""))
|
"")))
|
||||||
|
(make-link-element "AutobibLink"
|
||||||
|
content
|
||||||
`(autobib ,(auto-bib-key bib-entry))))
|
`(autobib ,(auto-bib-key bib-entry))))
|
||||||
(lambda () "(???)")
|
(lambda () "(???)")
|
||||||
(lambda () "(???)"))))
|
(lambda () "(???)"))))
|
||||||
|
@ -138,7 +140,7 @@
|
||||||
(error 'citet "citet must be used with identical authors, given ~a"
|
(error 'citet "citet must be used with identical authors, given ~a"
|
||||||
(map (compose author-element-names* auto-bib-author) bib-entries)))
|
(map (compose author-element-names* auto-bib-author) bib-entries)))
|
||||||
(make-element
|
(make-element
|
||||||
#f
|
(make-style "Autobibref" '())
|
||||||
(list (add-cite group (car bib-entries) 'autobib-author #f #f style)
|
(list (add-cite group (car bib-entries) 'autobib-author #f #f style)
|
||||||
'nbsp
|
'nbsp
|
||||||
(send style get-cite-open)
|
(send style get-cite-open)
|
||||||
|
@ -155,7 +157,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
|
||||||
#f
|
(make-style "Autobibref" '())
|
||||||
(append
|
(append
|
||||||
(list 'nbsp (send style get-cite-open))
|
(list 'nbsp (send style get-cite-open))
|
||||||
(add-between
|
(add-between
|
||||||
|
@ -195,20 +197,28 @@
|
||||||
(error 'default-disambiguation "Citations too ambiguous for default disambiguation scheme."))
|
(error 'default-disambiguation "Citations too ambiguous for default disambiguation scheme."))
|
||||||
(make-element #f (list (format "~a" (integer->char (+ 97 n))))))
|
(make-element #f (list (format "~a" (integer->char (+ 97 n))))))
|
||||||
|
|
||||||
(define author+date-style
|
(define author+date-style%
|
||||||
|
(class object%
|
||||||
|
(define/public (bibliography-table-style) bib-single-style)
|
||||||
|
(define/public (entry-style) bibentry-style)
|
||||||
|
(define/public (disambiguate-date?) #t)
|
||||||
|
(define/public (collapse-for-date?) #t)
|
||||||
|
(define/public (get-cite-open) "(")
|
||||||
|
(define/public (get-cite-close) ")")
|
||||||
|
(define/public (get-group-sep) "; ")
|
||||||
|
(define/public (get-item-sep) ", ")
|
||||||
|
(define/public (render-citation date-cite i) date-cite)
|
||||||
|
(define/public (render-author+dates author dates) (list* author " " dates))
|
||||||
|
(define/public (bibliography-line i e) (list e))
|
||||||
|
(super-new)))
|
||||||
|
|
||||||
|
(define author+date-style (new author+date-style%))
|
||||||
|
|
||||||
|
(define author+date-square-bracket-style
|
||||||
(new
|
(new
|
||||||
(class object%
|
(class author+date-style%
|
||||||
(define/public (bibliography-table-style) bib-single-style)
|
(define/override (get-cite-open) "[")
|
||||||
(define/public (entry-style) bibentry-style)
|
(define/override (get-cite-close) "]")
|
||||||
(define/public (disambiguate-date?) #t)
|
|
||||||
(define/public (collapse-for-date?) #t)
|
|
||||||
(define/public (get-cite-open) "(")
|
|
||||||
(define/public (get-cite-close) ")")
|
|
||||||
(define/public (get-group-sep) "; ")
|
|
||||||
(define/public (get-item-sep) ", ")
|
|
||||||
(define/public (render-citation date-cite i) date-cite)
|
|
||||||
(define/public (render-author+dates author dates) (list* author " " dates))
|
|
||||||
(define/public (bibliography-line i e) (list e))
|
|
||||||
(super-new))))
|
(super-new))))
|
||||||
|
|
||||||
(define number-style
|
(define number-style
|
||||||
|
@ -522,11 +532,17 @@
|
||||||
s)])
|
s)])
|
||||||
s))
|
s))
|
||||||
|
|
||||||
|
(define (string-capitalize str)
|
||||||
|
(if (non-empty-string? str)
|
||||||
|
(let ([chars (string->list str)])
|
||||||
|
(list->string (cons (char-upcase (car chars)) (cdr chars))))
|
||||||
|
str))
|
||||||
|
|
||||||
(define (book-location
|
(define (book-location
|
||||||
#:edition [edition #f]
|
#:edition [edition #f]
|
||||||
#:publisher [publisher #f])
|
#:publisher [publisher #f])
|
||||||
(let* ([s (if edition
|
(let* ([s (if edition
|
||||||
@elem{@(string-titlecase (to-string edition)) edition}
|
@elem{@(string-capitalize (to-string edition)) edition}
|
||||||
#f)]
|
#f)]
|
||||||
[s (if publisher
|
[s (if publisher
|
||||||
(if s
|
(if s
|
||||||
|
|
|
@ -6,3 +6,7 @@
|
||||||
\newlength{\ABcollength}
|
\newlength{\ABcollength}
|
||||||
\newcommand{\Autocolbibnumber}[1]{\parbox[t]{5ex}{\hfill#1~~\vspace{1.0ex}}}
|
\newcommand{\Autocolbibnumber}[1]{\parbox[t]{5ex}{\hfill#1~~\vspace{1.0ex}}}
|
||||||
\newcommand{\Autocolbibentry}[1]{\setlength{\ABcollength}{\linewidth-5ex}\parbox[t]{\ABcollength}{#1\vspace{1.0ex}}}
|
\newcommand{\Autocolbibentry}[1]{\setlength{\ABcollength}{\linewidth-5ex}\parbox[t]{\ABcollength}{#1\vspace{1.0ex}}}
|
||||||
|
|
||||||
|
\newcommand{\Autobibref}[1]{#1}
|
||||||
|
|
||||||
|
\providecommand{\AutobibLink}[1]{#1}
|
||||||
|
|
|
@ -471,6 +471,13 @@
|
||||||
#: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"
|
||||||
|
(make-bib #:title (raw-attr "title")
|
||||||
|
#:author (parse-author (raw-attr "author"))
|
||||||
|
#:date (raw-attr "year")
|
||||||
|
#:location (dissertation-location #:institution (raw-attr "school")
|
||||||
|
#:degree "PhD")
|
||||||
|
#:url (raw-attr "url"))]
|
||||||
["techreport"
|
["techreport"
|
||||||
(make-bib #:title (raw-attr "title")
|
(make-bib #:title (raw-attr "title")
|
||||||
#:author (parse-author (raw-attr "author"))
|
#:author (parse-author (raw-attr "author"))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#lang scheme/base
|
#lang scheme/base
|
||||||
|
(require racket/contract/base
|
||||||
(require scribble/manual
|
scribble/manual
|
||||||
scribble/core
|
scribble/core
|
||||||
scribble/decode
|
scribble/decode
|
||||||
scribble/html-properties
|
scribble/html-properties
|
||||||
|
@ -12,9 +12,18 @@
|
||||||
figure*
|
figure*
|
||||||
figure**
|
figure**
|
||||||
figure-here
|
figure-here
|
||||||
Figure-target
|
(contract-out
|
||||||
Figure-ref
|
[Figure-target (->* (string?)
|
||||||
figure-ref
|
(#:continue? any/c)
|
||||||
|
element?)]
|
||||||
|
[Figure-ref (->* (string?)
|
||||||
|
(#:link-render-style link-render-style?)
|
||||||
|
#:rest (listof string?)
|
||||||
|
element?)]
|
||||||
|
[figure-ref (->* (string?)
|
||||||
|
(#:link-render-style link-render-style?)
|
||||||
|
#:rest (listof string?)
|
||||||
|
element?)])
|
||||||
left-figure-style
|
left-figure-style
|
||||||
center-figure-style
|
center-figure-style
|
||||||
right-figure-style
|
right-figure-style
|
||||||
|
@ -66,30 +75,40 @@
|
||||||
figure-style-extras))
|
figure-style-extras))
|
||||||
c))
|
c))
|
||||||
|
|
||||||
|
(define default-label-sep ": ")
|
||||||
|
|
||||||
(define (figure tag caption
|
(define (figure tag caption
|
||||||
#:style [style center-figure-style]
|
#:style [style center-figure-style]
|
||||||
|
#:label-sep [label-sep default-label-sep]
|
||||||
|
#:label-style [label-style #f]
|
||||||
#:continue? [continue? #f]
|
#:continue? [continue? #f]
|
||||||
. content)
|
. content)
|
||||||
(figure-helper figure-style style tag caption content continue?))
|
(figure-helper figure-style style label-sep label-style tag caption content continue?))
|
||||||
|
|
||||||
(define (figure-here tag caption
|
(define (figure-here tag caption
|
||||||
#:style [style center-figure-style]
|
#:style [style center-figure-style]
|
||||||
|
#:label-sep [label-sep default-label-sep]
|
||||||
|
#:label-style [label-style #f]
|
||||||
#:continue? [continue? #f]
|
#:continue? [continue? #f]
|
||||||
. content)
|
. content)
|
||||||
(figure-helper herefigure-style style tag caption content continue?))
|
(figure-helper herefigure-style style label-sep label-style tag caption content continue?))
|
||||||
|
|
||||||
(define (figure* tag caption
|
(define (figure* tag caption
|
||||||
#:style [style center-figure-style]
|
#:style [style center-figure-style]
|
||||||
|
#:label-sep [label-sep default-label-sep]
|
||||||
|
#:label-style [label-style #f]
|
||||||
#:continue? [continue? #f]
|
#:continue? [continue? #f]
|
||||||
. content)
|
. content)
|
||||||
(figure-helper figuremulti-style style tag caption content continue?))
|
(figure-helper figuremulti-style style label-sep label-style tag caption content continue?))
|
||||||
(define (figure** tag caption
|
(define (figure** tag caption
|
||||||
#:style [style center-figure-style]
|
#:style [style center-figure-style]
|
||||||
|
#:label-sep [label-sep default-label-sep]
|
||||||
|
#:label-style [label-style #f]
|
||||||
#:continue? [continue? #f]
|
#:continue? [continue? #f]
|
||||||
. content)
|
. content)
|
||||||
(figure-helper figuremultiwide-style style tag caption content continue?))
|
(figure-helper figuremultiwide-style style label-sep label-style tag caption content continue?))
|
||||||
|
|
||||||
(define (figure-helper figure-style content-style tag caption content continue?)
|
(define (figure-helper figure-style content-style label-sep label-style tag caption content continue?)
|
||||||
(make-nested-flow
|
(make-nested-flow
|
||||||
figure-style
|
figure-style
|
||||||
(list
|
(list
|
||||||
|
@ -101,37 +120,57 @@
|
||||||
(list (make-element (if continue?
|
(list (make-element (if continue?
|
||||||
legend-continued-style
|
legend-continued-style
|
||||||
legend-style)
|
legend-style)
|
||||||
(list (Figure-target tag #:continue? continue?) caption)))))))
|
(list (Figure-target tag
|
||||||
|
#:label-sep label-sep
|
||||||
|
#:label-style label-style
|
||||||
|
#:continue? continue?)
|
||||||
|
caption)))))))
|
||||||
|
|
||||||
(define figures (new-counter "figure"
|
(define figures (new-counter "figure"
|
||||||
#:target-wrap make-figure-target
|
#:target-wrap make-figure-target
|
||||||
#:ref-wrap make-figure-ref))
|
#:ref-wrap make-figure-ref))
|
||||||
(define (Figure-target tag #:continue? [continue? #f])
|
(define (Figure-target tag
|
||||||
|
#:continue? [continue? #f]
|
||||||
|
#:label-sep [label-sep ": "]
|
||||||
|
#:label-style [label-style #f])
|
||||||
(counter-target figures tag
|
(counter-target figures tag
|
||||||
"Figure"
|
"Figure"
|
||||||
(if continue? " (continued): " ": ")
|
#:label-suffix (list (if continue? " (continued)" "") label-sep)
|
||||||
|
#:label-style label-style
|
||||||
#:target-style figure-target-style
|
#:target-style figure-target-style
|
||||||
#:continue? continue?))
|
#:continue? continue?))
|
||||||
|
|
||||||
(define (ref-proc initial)
|
(define (ref-proc initial)
|
||||||
(case-lambda
|
(lambda (tag #:link-render-style [link-style #f]
|
||||||
[(tag)
|
. tags)
|
||||||
(make-element #f (list (counter-ref figures tag (string-append initial "igure"))))]
|
(cond
|
||||||
[(tag1 tag2)
|
[(null? tags)
|
||||||
(make-element #f (list (counter-ref figures tag1 (string-append initial "igures"))
|
(make-element
|
||||||
" and "
|
#f
|
||||||
(counter-ref figures tag2 #f)))]
|
(counter-ref figures tag (string-append initial "igure")
|
||||||
[(tag . tags)
|
#:link-render-style link-style))]
|
||||||
(make-element #f (cons (counter-ref figures tag (string-append initial "igures"))
|
[(null? (cdr tags))
|
||||||
(let loop ([tags tags])
|
(define tag1 (car tags))
|
||||||
(cond
|
(define tag2 (cadr tags))
|
||||||
[(null? (cdr tags))
|
(make-element #f (list (counter-ref figures tag1 (string-append initial "igures")
|
||||||
(list ", and "
|
#:link-render-style link-style)
|
||||||
(counter-ref figures (car tags) #f))]
|
" and "
|
||||||
[else
|
(counter-ref figures tag2 #f
|
||||||
(list* ", "
|
#:link-render-style link-style)))]
|
||||||
(counter-ref figures (car tags) #f)
|
[else
|
||||||
(loop (cdr tags)))]))))]))
|
(make-element #f (cons (counter-ref figures tag (string-append initial "igures")
|
||||||
|
#:link-render-style link-style)
|
||||||
|
(let loop ([tags tags])
|
||||||
|
(cond
|
||||||
|
[(null? (cdr tags))
|
||||||
|
(list ", and "
|
||||||
|
(counter-ref figures (car tags) #f
|
||||||
|
#:link-render-style link-style))]
|
||||||
|
[else
|
||||||
|
(list* ", "
|
||||||
|
(counter-ref figures (car tags) #f
|
||||||
|
#:link-render-style link-style)
|
||||||
|
(loop (cdr tags)))]))))])))
|
||||||
|
|
||||||
(define Figure-ref (ref-proc "F"))
|
(define Figure-ref (ref-proc "F"))
|
||||||
(define figure-ref (ref-proc "f"))
|
(define figure-ref (ref-proc "f"))
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
\newcommand{\LegendContinued}[1]{\Legend{#1}}
|
\newcommand{\LegendContinued}[1]{\Legend{#1}}
|
||||||
|
|
||||||
\newcommand{\FigureTarget}[2]{#1}
|
\newcommand{\FigureTarget}[2]{#1}
|
||||||
\newcommand{\FigureRef}[2]{\hyperref[#2]{#1}}
|
\newcommand{\FigureRef}[2]{#1}
|
||||||
|
|
||||||
\newlength{\FigOrigskip}
|
\newlength{\FigOrigskip}
|
||||||
\FigOrigskip=\parskip
|
\FigOrigskip=\parskip
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
|
|
||||||
(define (counter-target counter tag label
|
(define (counter-target counter tag label
|
||||||
#:target-style [target-style #f]
|
#:target-style [target-style #f]
|
||||||
|
#:label-style [label-style #f]
|
||||||
|
#:label-suffix [label-suffix '()]
|
||||||
#:continue? [continue? #f]
|
#:continue? [continue? #f]
|
||||||
. content)
|
. content)
|
||||||
(let ([content (decode-content content)])
|
(let ([content (decode-content content)])
|
||||||
|
@ -34,10 +36,13 @@
|
||||||
(make-delayed-element
|
(make-delayed-element
|
||||||
(lambda (renderer part ri)
|
(lambda (renderer part ri)
|
||||||
(let ([n (resolve-get part ri (tag->counter-tag counter tag "value"))])
|
(let ([n (resolve-get part ri (tag->counter-tag counter tag "value"))])
|
||||||
(let ([l (cons (format "~a" n) content)])
|
(cons
|
||||||
(if label
|
(make-element label-style
|
||||||
(list* label 'nbsp l)
|
(let ([l (cons (format "~a" n) (decode-content (list label-suffix)))])
|
||||||
l))))
|
(if label
|
||||||
|
(list* label 'nbsp l)
|
||||||
|
l)))
|
||||||
|
content)))
|
||||||
(lambda () (if label
|
(lambda () (if label
|
||||||
(list* label 'nbsp "N" content)
|
(list* label 'nbsp "N" content)
|
||||||
(cons "N" content)))
|
(cons "N" content)))
|
||||||
|
@ -54,9 +59,13 @@
|
||||||
(if (counter-target-wrap counter)
|
(if (counter-target-wrap counter)
|
||||||
((counter-target-wrap counter)
|
((counter-target-wrap counter)
|
||||||
c
|
c
|
||||||
|
;; Don't use this argument:
|
||||||
(format "t:~a" (t-encode (tag->counter-tag counter tag))))
|
(format "t:~a" (t-encode (tag->counter-tag counter tag))))
|
||||||
c)))
|
c)))
|
||||||
|
|
||||||
|
;; The use of this function is a leftover for backward compatibility.
|
||||||
|
;; Duplicating the linking functionality of `link-element`, etc., is
|
||||||
|
;; a bad idea.
|
||||||
(define (t-encode s)
|
(define (t-encode s)
|
||||||
(apply
|
(apply
|
||||||
string-append
|
string-append
|
||||||
|
@ -69,31 +78,42 @@
|
||||||
[else (format "x~x" (char->integer c))]))
|
[else (format "x~x" (char->integer c))]))
|
||||||
(string->list (format "~s" s)))))
|
(string->list (format "~s" s)))))
|
||||||
|
|
||||||
(define (counter-ref counter tag label)
|
(define (counter-ref counter tag label
|
||||||
(let ([n (make-delayed-element
|
#:link-render-style [link-style #f])
|
||||||
(lambda (renderer part ri)
|
(make-delayed-element
|
||||||
(let ([n (resolve-get part ri (tag->counter-tag counter tag "value"))])
|
(lambda (renderer part ri)
|
||||||
(if (counter-ref-wrap counter)
|
(let ([n (resolve-get part ri (tag->counter-tag counter tag "value"))])
|
||||||
(let ([id (format "t:~a" (t-encode (list 'counter (list (counter-name counter) tag))))])
|
(let ([n (if (counter-ref-wrap counter)
|
||||||
((counter-ref-wrap counter)
|
((counter-ref-wrap counter)
|
||||||
(format "~a" n)
|
(format "~a" n)
|
||||||
id))
|
;; Don't use this argument:
|
||||||
(list (format "~a" n)))))
|
(format "t:~a" (t-encode (list 'counter (list (counter-name counter) tag)))))
|
||||||
(lambda () (if label
|
(list (format "~a" n)))]
|
||||||
(list label 'nbsp "N")
|
[link-number-only? (eq? (link-render-style-mode
|
||||||
(list "N")))
|
(or link-style
|
||||||
(lambda () (if label
|
(current-link-render-style)))
|
||||||
(list label 'nbsp "N")
|
'number)])
|
||||||
(list "N"))))])
|
(cond
|
||||||
(make-link-element
|
[(and label link-number-only?)
|
||||||
#f
|
(make-element #f
|
||||||
(if label
|
(list label 'nbsp
|
||||||
(list
|
(make-link-element
|
||||||
label
|
#f
|
||||||
'nbsp
|
(list n)
|
||||||
n)
|
(tag->counter-tag counter tag))))]
|
||||||
n)
|
[else
|
||||||
(tag->counter-tag counter tag))))
|
(make-link-element
|
||||||
|
#f
|
||||||
|
(if label
|
||||||
|
(list label 'nbsp n)
|
||||||
|
n)
|
||||||
|
(tag->counter-tag counter tag))]))))
|
||||||
|
(lambda () (if label
|
||||||
|
(list label 'nbsp "N")
|
||||||
|
(list "N")))
|
||||||
|
(lambda () (if label
|
||||||
|
(list label 'nbsp "N")
|
||||||
|
(list "N")))))
|
||||||
|
|
||||||
(define (counter-collect-value counter)
|
(define (counter-collect-value counter)
|
||||||
(counter-n counter))
|
(counter-n counter))
|
||||||
|
|
21
scribble-test/tests/scribble/docs/convertible.scrbl
Normal file
21
scribble-test/tests/scribble/docs/convertible.scrbl
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#lang scribble/base
|
||||||
|
@(require file/convertible)
|
||||||
|
|
||||||
|
@(struct s ()
|
||||||
|
#:property
|
||||||
|
prop:convertible
|
||||||
|
;; Not actually convertible to anything:
|
||||||
|
(lambda (v req default)
|
||||||
|
default))
|
||||||
|
|
||||||
|
@(struct c ()
|
||||||
|
#:property
|
||||||
|
prop:convertible
|
||||||
|
(lambda (v req default)
|
||||||
|
(cond
|
||||||
|
[(eq? req 'text) "hello"]
|
||||||
|
[else default])))
|
||||||
|
|
||||||
|
@(s)
|
||||||
|
|
||||||
|
@(c)
|
3
scribble-test/tests/scribble/docs/convertible.txt
Normal file
3
scribble-test/tests/scribble/docs/convertible.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#<s>
|
||||||
|
|
||||||
|
hello
|
29
scribble-test/tests/scribble/docs/grouper2.scrbl
Normal file
29
scribble-test/tests/scribble/docs/grouper2.scrbl
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#lang scribble/base
|
||||||
|
|
||||||
|
@title{Example}
|
||||||
|
|
||||||
|
@table-of-contents[]
|
||||||
|
|
||||||
|
@; ----------------------------------------
|
||||||
|
|
||||||
|
@section[#:style 'grouper]{Arbitrarily Small Data}
|
||||||
|
|
||||||
|
@subsection[#:tag "A"]{A}
|
||||||
|
|
||||||
|
See @secref["A"] and @secref["B"].
|
||||||
|
|
||||||
|
@; ----------------------------------------
|
||||||
|
|
||||||
|
@section[#:style '(unnumbered)]{Intermezzo}
|
||||||
|
|
||||||
|
@subsection[#:style '(unnumbered)]{More}
|
||||||
|
|
||||||
|
Nothing here.
|
||||||
|
|
||||||
|
@; ----------------------------------------
|
||||||
|
|
||||||
|
@section[#:style 'grouper]{Arbitrarily Large Data}
|
||||||
|
|
||||||
|
@subsection[#:tag "B"]{B}
|
||||||
|
|
||||||
|
See @secref["A"] and @secref["B"].
|
28
scribble-test/tests/scribble/docs/grouper2.txt
Normal file
28
scribble-test/tests/scribble/docs/grouper2.txt
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
Example
|
||||||
|
|
||||||
|
I Arbitrarily Small Data
|
||||||
|
1 A
|
||||||
|
|
||||||
|
Intermezzo
|
||||||
|
More
|
||||||
|
|
||||||
|
II Arbitrarily Large Data
|
||||||
|
2 B
|
||||||
|
|
||||||
|
I. Arbitrarily Small Data
|
||||||
|
|
||||||
|
1. A
|
||||||
|
|
||||||
|
See A and B.
|
||||||
|
|
||||||
|
Intermezzo
|
||||||
|
|
||||||
|
More
|
||||||
|
|
||||||
|
Nothing here.
|
||||||
|
|
||||||
|
II. Arbitrarily Large Data
|
||||||
|
|
||||||
|
2. B
|
||||||
|
|
||||||
|
See A and B.
|
|
@ -32,10 +32,27 @@
|
||||||
(check-exn blames-this-module?
|
(check-exn blames-this-module?
|
||||||
(λ () (make-eval-factory '() #:lang '(+ 2 2))))
|
(λ () (make-eval-factory '() #:lang '(+ 2 2))))
|
||||||
|
|
||||||
|
(check-exn blames-this-module?
|
||||||
|
(λ () (scribble-exn->string #f)))
|
||||||
|
(check-exn blames-this-module?
|
||||||
|
(λ () (scribble-exn->string (λ (a b c) a))))
|
||||||
|
(check-not-exn
|
||||||
|
(λ () (scribble-exn->string)))
|
||||||
|
(check-not-exn
|
||||||
|
(λ ()
|
||||||
|
(parameterize ((scribble-exn->string (λ (a) "hello")))
|
||||||
|
((scribble-exn->string) "error"))))
|
||||||
|
|
||||||
(check-exn blames-this-module?
|
(check-exn blames-this-module?
|
||||||
(λ () (scribble-eval-handler #f)))
|
(λ () (scribble-eval-handler #f)))
|
||||||
(check-exn blames-this-module?
|
(check-exn blames-this-module?
|
||||||
(λ () (scribble-eval-handler (λ (ev t) t))))
|
(λ () (scribble-eval-handler (λ (ev t) t))))
|
||||||
|
(check-not-exn
|
||||||
|
(λ () (scribble-eval-handler)))
|
||||||
|
(check-not-exn
|
||||||
|
(λ ()
|
||||||
|
(parameterize ((scribble-eval-handler (λ (a b c) c)))
|
||||||
|
((scribble-eval-handler) (λ (x) x) #f #true))))
|
||||||
|
|
||||||
(check-exn blames-this-module?
|
(check-exn blames-this-module?
|
||||||
(λ () (make-log-based-eval #f 'record)))
|
(λ () (make-log-based-eval #f 'record)))
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
|
|
||||||
(require rackunit scriblib/autobib)
|
(require rackunit scriblib/autobib scribble/base scribble/core)
|
||||||
|
|
||||||
(test-case "define-cite"
|
(test-case "define-cite"
|
||||||
;; Check that `define-cite` binds the expected identifiers
|
;; Check that `define-cite` binds the expected identifiers
|
||||||
|
@ -39,6 +39,23 @@
|
||||||
(check-exn exn:fail?
|
(check-exn exn:fail?
|
||||||
(λ () (book-location))))
|
(λ () (book-location))))
|
||||||
|
|
||||||
|
(define (mk-bookloc-elem/ed ed) (element (style #f '()) (list ed " edition")))
|
||||||
|
|
||||||
|
(test-case "book-location-edition-capitalization"
|
||||||
|
(check-equal? (book-location #:edition 'a)
|
||||||
|
(mk-bookloc-elem/ed "A"))
|
||||||
|
(check-equal? (book-location #:edition "first")
|
||||||
|
(mk-bookloc-elem/ed "First"))
|
||||||
|
(check-equal? (book-location #:edition 'Third)
|
||||||
|
(mk-bookloc-elem/ed "Third"))
|
||||||
|
(check-equal? (book-location #:edition 1)
|
||||||
|
(mk-bookloc-elem/ed "1"))
|
||||||
|
(check-equal? (book-location #:edition "1st")
|
||||||
|
(mk-bookloc-elem/ed "1st"))
|
||||||
|
(check-equal? (book-location #:edition "4th")
|
||||||
|
(mk-bookloc-elem/ed "4th")))
|
||||||
|
|
||||||
|
|
||||||
(test-case "techrpt-location"
|
(test-case "techrpt-location"
|
||||||
(check-not-exn
|
(check-not-exn
|
||||||
(λ () (techrpt-location #:institution "MIT" #:number 'AIM-353)))
|
(λ () (techrpt-location #:institution "MIT" #:number 'AIM-353)))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user