Merge tag 'v6.12' into my-changes-rebased
This commit is contained in:
commit
cd98afdc41
|
@ -203,6 +203,23 @@ screen version of the image links to the badge authority.
|
|||
@abstract{This is an abstract.}
|
||||
}|
|
||||
|
||||
@defproc[(authorsaddresses [addresses pre-content?] ...) block?]{
|
||||
Sets the text for the authors' addresses on the first page
|
||||
in some styles. By default this field is set to the authors
|
||||
and their affiliation information.
|
||||
|
||||
The @racket[addresses] parameter takes the address text. As a
|
||||
special case the empty list removes the addresses field entirely.
|
||||
|
||||
@codeblock|{
|
||||
#lang scribble/acmart @acmsmall
|
||||
@title{A fancy paper}
|
||||
@author["Ronon Dex"]
|
||||
@authorsaddresses{}
|
||||
}|
|
||||
|
||||
@history[#:added "1.26"]}
|
||||
|
||||
@deftogether[(
|
||||
@defproc[(terms [content pre-content?] ...) content?]
|
||||
@defproc[(keywords [content pre-content?] ...) content?]
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
@(require scribble/manual
|
||||
(except-in "utils.rkt" url)
|
||||
"struct-hierarchy.rkt"
|
||||
(only-in scribble/eval as-examples)
|
||||
(for-label scribble/manual-struct
|
||||
racket/serialize
|
||||
file/convertible
|
||||
|
@ -520,6 +521,14 @@ The recognized @tech{style properties} are as follows:
|
|||
section. See also @racket[link-element] and
|
||||
@racket[current-link-render-style].}
|
||||
|
||||
@item{@racket['enable-index-merge] --- On an index parts or one of
|
||||
its enclosing parts for Latex output, causes index entries to
|
||||
be merged when they have the same content, with multiple
|
||||
references for the same entry combined with @ltx{Smanypageref}.
|
||||
The @ltx{Smanypageref} Latex macro must be redefined to accept
|
||||
multiple @litchar{,}-separated labels and generate a suitable set of
|
||||
references. See also @racketmodname[scriblib/book-index].}
|
||||
|
||||
]
|
||||
|
||||
The @racket[to-collect] field contains @techlink{content} that is
|
||||
|
@ -902,6 +911,9 @@ The following @tech{style properties} are currently recognized:
|
|||
@item{@racket[script-property] structure --- For HTML, supplies a
|
||||
script alternative to @racket[content].}
|
||||
|
||||
@item{@racket[xexpr-property] structure --- For HTML, supplies literal
|
||||
HTML to render before and after @racket[content].}
|
||||
|
||||
@item{@racket[body-id] structure --- For HTML uses the given
|
||||
string as an @tt{id} attribute of the @tt{<span>} tag.}
|
||||
|
||||
|
@ -923,7 +935,8 @@ The following @tech{style properties} are currently recognized:
|
|||
]
|
||||
|
||||
@history[#:changed "1.6" @elem{Changed @racket['exact-chars] handling to
|
||||
take effect when the style name is @racket[#f].}]}
|
||||
take effect when the style name is @racket[#f].}
|
||||
#:changed "1.27" @elem{Changed to support @racket[xexpr-property].}]}
|
||||
|
||||
|
||||
@defstruct[(image-element element) ([path (or/c path-string?
|
||||
|
@ -1738,6 +1751,30 @@ Used as a @tech{style property} with @racket[element] to supply a
|
|||
script alternative to the element content.}
|
||||
|
||||
|
||||
@defstruct[xexpr-property ([before xexpr/c]
|
||||
[after xexpr/c])]{
|
||||
|
||||
Used as a @tech{style property} with @racket[element] to supply literal
|
||||
HTML that is rendered before and after element content.
|
||||
|
||||
@as-examples["Example:"
|
||||
@codeblock[#:keep-lang-line? #t]|{
|
||||
#lang scribble/base
|
||||
@(require scribble/core
|
||||
scribble/html-properties
|
||||
(only-in xml cdata))
|
||||
|
||||
@(define comments (xexpr-property
|
||||
(cdata #f #f "<!-- before -->")
|
||||
(cdata #f #f "<!-- after -->")))
|
||||
|
||||
Here is some
|
||||
@elem[#:style (style #f (list comments))]{content with comments around}.
|
||||
}|]
|
||||
|
||||
@history[#:added "1.27"]}
|
||||
|
||||
|
||||
@defstruct[css-addition ([path (or/c path-string?
|
||||
(cons/c 'collects (listof bytes?))
|
||||
url?
|
||||
|
|
35
scribble-doc/scriblib/scribblings/book-index.scrbl
Normal file
35
scribble-doc/scriblib/scribblings/book-index.scrbl
Normal file
|
@ -0,0 +1,35 @@
|
|||
#lang scribble/manual
|
||||
@(require (for-label scribble/core
|
||||
racket/base
|
||||
scriblib/book-index))
|
||||
|
||||
@title[#:tag "book-index"]{Book-Style Indexing}
|
||||
|
||||
@defmodule[scriblib/book-index]{Provides a list of style properties to
|
||||
attach to a Scribble document that contains an index part, making the
|
||||
index more suitable for a traditional rendering on paper. The style
|
||||
properties cause index entries to be merged when they have the same
|
||||
content, with (potentially) multiple page numbers attached to the
|
||||
merged entry.}
|
||||
|
||||
@defthing[book-index-style-properties list?]{
|
||||
|
||||
Combine these style properties with others for the style of a part
|
||||
(typically specified in @racket[title]) for a document that contains
|
||||
an index. The style properties enable index merging and select an
|
||||
implementation based on the @tt{cleveref} Latex package.
|
||||
|
||||
Example:
|
||||
|
||||
@codeblock[#:keep-lang-line? #t]|{
|
||||
#lang scribble/base
|
||||
@(require scriblib/book-index
|
||||
(only-in scribble/core make-style))
|
||||
|
||||
@title[#:style (make-style #f book-index-style-properties)]{Demo}
|
||||
|
||||
This paragraph is about @as-index{examples}.
|
||||
|
||||
This paragraph is about @as-index{examples}, too.
|
||||
|
||||
@index-section[]}|}
|
|
@ -10,3 +10,4 @@
|
|||
@include-section["bibtex.scrbl"]
|
||||
@include-section["footnote.scrbl"]
|
||||
@include-section["render-cond.scrbl"]
|
||||
@include-section["book-index.scrbl"]
|
||||
|
|
|
@ -23,4 +23,4 @@
|
|||
|
||||
(define pkg-authors '(mflatt eli))
|
||||
|
||||
(define version "1.26")
|
||||
(define version "1.27")
|
||||
|
|
|
@ -45,6 +45,10 @@
|
|||
#:email (or/c pre-content? email? (listof email?) #f))
|
||||
#:rest (listof pre-content?)
|
||||
block?)]
|
||||
[authorsaddresses (->* ()
|
||||
()
|
||||
#:rest (listof pre-content?)
|
||||
block?)]
|
||||
[institution (->* ()
|
||||
(#:departments (listof (or/c pre-content? institution?)))
|
||||
#:rest pre-content?
|
||||
|
@ -283,6 +287,12 @@
|
|||
(for/list ([e (in-list email)])
|
||||
(convert-email e))]))))))))
|
||||
|
||||
(define (authorsaddresses . content)
|
||||
(make-paragraph
|
||||
(make-style 'pretitle command-props)
|
||||
(make-element (make-style "authorsaddresses" command-props)
|
||||
(decode-content content))))
|
||||
|
||||
(define (institution #:departments [departments '()]
|
||||
. name)
|
||||
(author-institution name departments))
|
||||
|
|
|
@ -732,7 +732,7 @@
|
|||
(define-syntax racketblock*
|
||||
(syntax-rules (eval:alts code:comment eval:check eval:no-prompt eval:error eval:result eval:results)
|
||||
[(_ #:escape id (code:comment . rest)) (racketblock0 #:escape id (code:comment . rest))]
|
||||
[(_ #:escape id (eval:alts a b)) (racketblock #:escape id a)]
|
||||
[(_ #:escape id (eval:alts a b)) (racketblock* #:escape id a)]
|
||||
[(_ #:escape id (eval:result a . _)) (racketinputblock #:escape id a)]
|
||||
[(_ #:escape id (eval:results a . _)) (racketinputblock #:escape id a)]
|
||||
[(_ #:escape id (eval:check a b)) (racketblock #:escape id a)]
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
[body-id ([value string?])]
|
||||
[document-source ([module-path module-path?])]
|
||||
|
||||
[xexpr-property ([before xexpr/c] [after xexpr/c])]
|
||||
[hover-property ([text string?])]
|
||||
[script-property ([type string?]
|
||||
[script (or/c path-string? (listof string?))])]
|
||||
|
|
|
@ -1231,6 +1231,14 @@
|
|||
(element-style->attribs (style-name s) s extras)
|
||||
(element-style->attribs s #f extras))))
|
||||
|
||||
(define (element-style-property-matching e pred)
|
||||
(and (or (element? e) (multiarg-element? e))
|
||||
(ormap (lambda (v) (and (pred v) v))
|
||||
(let ([s (if (element? e)
|
||||
(element-style e)
|
||||
(multiarg-element-style e))])
|
||||
(if (style? s) (style-properties s) null)))))
|
||||
|
||||
(define/override (render-content e part ri)
|
||||
(define (attribs [extras null]) (content-attribs e extras))
|
||||
(cond
|
||||
|
@ -1320,12 +1328,7 @@
|
|||
,@(if svg?
|
||||
`((param ([name "src"] [value ,srcref])))
|
||||
null)))))]
|
||||
[(and (or (element? e) (multiarg-element? e))
|
||||
(ormap (lambda (v) (and (script-property? v) v))
|
||||
(let ([s (if (element? e)
|
||||
(element-style e)
|
||||
(multiarg-element-style e))])
|
||||
(if (style? s) (style-properties s) null))))
|
||||
[(element-style-property-matching e script-property?)
|
||||
=>
|
||||
(lambda (v)
|
||||
(let* ([t `[type ,(script-property-type v)]]
|
||||
|
@ -1335,6 +1338,12 @@
|
|||
`(script (,t ,@(attribs) [src ,s])))])
|
||||
(list s
|
||||
`(noscript ,@(render-plain-content e part ri)))))]
|
||||
[(element-style-property-matching e xexpr-property?)
|
||||
=>
|
||||
(lambda (v)
|
||||
(cons (xexpr-property-before v)
|
||||
(append (render-plain-content e part ri)
|
||||
(list (xexpr-property-after v)))))]
|
||||
[(target-element? e)
|
||||
`((a ([name ,(format "~a" (anchor-name (add-current-tag-prefix
|
||||
(tag-key (target-element-tag e)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
(require "core.rkt"
|
||||
"latex-properties.rkt"
|
||||
"private/render-utils.rkt"
|
||||
"private/latex-index.rkt"
|
||||
racket/class
|
||||
racket/runtime-path
|
||||
racket/port
|
||||
|
@ -18,6 +19,7 @@
|
|||
(define rendering-tt (make-parameter #f))
|
||||
(define show-link-page-numbers (make-parameter #f))
|
||||
(define done-link-page-numbers (make-parameter #f))
|
||||
(define multiple-page-references (make-parameter #f))
|
||||
(define disable-images (make-parameter #f))
|
||||
(define escape-brackets (make-parameter #f))
|
||||
(define suppress-newline-content (make-parameter #f))
|
||||
|
@ -587,10 +589,19 @@
|
|||
(when (and (link-element? e)
|
||||
(show-link-page-numbers)
|
||||
(not (done-link-page-numbers)))
|
||||
(printf ", \\pageref{t:~a}"
|
||||
(t-encode
|
||||
(let ([v (resolve-get part ri (link-element-tag e))])
|
||||
(and v (vector-ref v 1))))))
|
||||
(define (make-ref e)
|
||||
(string-append
|
||||
"t:"
|
||||
(t-encode
|
||||
(let ([v (resolve-get part ri (link-element-tag e))])
|
||||
(and v (vector-ref v 1))))))
|
||||
(cond
|
||||
[(multiple-page-references) ; for index
|
||||
=> (lambda (l)
|
||||
(printf ", \\Smanypageref{~a}" ; using cleveref
|
||||
(string-join (map make-ref l) ",")))]
|
||||
[else
|
||||
(printf ", \\pageref{~a}" (make-ref e))]))
|
||||
null))
|
||||
|
||||
(define/private (t-encode s)
|
||||
|
@ -626,6 +637,11 @@
|
|||
(let* ([s-name (style-name (table-style t))]
|
||||
[boxed? (eq? 'boxed s-name)]
|
||||
[index? (eq? 'index s-name)]
|
||||
[merge-index? (let loop ([part part])
|
||||
(or (memq 'enable-index-merge (style-properties (part-style part)))
|
||||
(let* ([ci (part-collected-info part ri)]
|
||||
[p (and ci (collected-info-parent ci))])
|
||||
(and p (loop p)))))]
|
||||
[tableform
|
||||
(cond [index? "list"]
|
||||
[(eq? 'block s-name) "tabular"]
|
||||
|
@ -758,6 +774,17 @@
|
|||
(let ([flows (car blockss)]
|
||||
[cell-styles (car cell-styless)])
|
||||
(unless index? (add-clines prev-styles cell-styles))
|
||||
(define group-size
|
||||
(cond
|
||||
[merge-index?
|
||||
;; Merge entries that have the same text & style
|
||||
(let loop ([blockss (cdr blockss)] [group-size 1])
|
||||
(cond
|
||||
[(null? blockss) group-size]
|
||||
[(same-index-entry? flows (car blockss))
|
||||
(loop (cdr blockss) (add1 group-size))]
|
||||
[else group-size]))]
|
||||
[else 1]))
|
||||
(let loop ([flows flows]
|
||||
[cell-styles cell-styles]
|
||||
[all-left-line?s all-left-line?s]
|
||||
|
@ -769,7 +796,10 @@
|
|||
(cond
|
||||
[index?
|
||||
(printf "\n\\item ")
|
||||
(render-cell 1)
|
||||
(parameterize ([multiple-page-references
|
||||
(and (group-size . > . 1)
|
||||
(extract-index-link-targets (take blockss group-size)))])
|
||||
(render-cell 1))
|
||||
#f]
|
||||
[(eq? 'cont (car flows))
|
||||
#f]
|
||||
|
@ -798,17 +828,18 @@
|
|||
(cdr cell-styles)
|
||||
(cdr all-left-line?s)
|
||||
right-line?))))
|
||||
(define rest-blockss (list-tail blockss group-size))
|
||||
(unless (or index?
|
||||
(and (null? (cdr blockss))
|
||||
(and (null? rest-blockss)
|
||||
(not (for/or ([cell-style (in-list cell-styles)])
|
||||
(or (memq 'bottom-border (style-properties cell-style))
|
||||
(memq 'border (style-properties cell-style)))))))
|
||||
(printf " \\\\\n"))
|
||||
(cond
|
||||
[(null? (cdr blockss))
|
||||
[(null? rest-blockss)
|
||||
(unless index? (add-clines cell-styles #f))]
|
||||
[else
|
||||
(loop (cdr blockss) (cdr cell-styless) cell-styles)])))
|
||||
(loop rest-blockss (list-tail cell-styless group-size) cell-styles)])))
|
||||
(unless inline?
|
||||
(printf "\\end{~a}~a"
|
||||
tableform
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,9 +6,11 @@
|
|||
.RktMod, .RktKw, .RktVar, .RktSym,
|
||||
.RktRes, .RktOut, .RktCmt, .RktVal,
|
||||
.RktBlk, .RktErr {
|
||||
font-family: 'Source Code Pro', monospace;
|
||||
font-family: 'Fira-Mono', monospace;
|
||||
white-space: inherit;
|
||||
font-size: 1rem;
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
|
||||
}
|
||||
|
||||
/* this selctor grabs the first linked Racket symbol
|
||||
|
@ -16,14 +18,14 @@ in a definition box (i.e., the symbol being defined) */
|
|||
a.RktValDef, a.RktStxDef, a.RktSymDef,
|
||||
span.RktValDef, span.RktStxDef, span.RktSymDef
|
||||
{
|
||||
font-size: 1.15rem;
|
||||
font-size: 1.1rem;
|
||||
color: black;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
||||
.inheritedlbl {
|
||||
font-family: 'Fira', sans;
|
||||
font-family: 'Fira', sans-serif;
|
||||
}
|
||||
|
||||
.RBackgroundLabelInner {
|
||||
|
@ -119,7 +121,6 @@ span.RktValDef, span.RktStxDef, span.RktSymDef
|
|||
.RktValLink, .RktStxLink, .RktModLink {
|
||||
text-decoration: none;
|
||||
color: #07A;
|
||||
font-weight: 500;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
|
@ -131,7 +132,7 @@ h2 .RktMod, h3 .RktMod, h4 .RktMod, h5 .RktMod,
|
|||
h2 .RktVal, h3 .RktVal, h4 .RktVal, h5 .RktVal,
|
||||
h2 .RktPn, h3 .RktPn, h4 .RktPn, h5 .RktPn {
|
||||
color: #333;
|
||||
font-size: 1.65rem;
|
||||
font-size: 1.50rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
|
@ -141,9 +142,9 @@ h2 .RktPn, h3 .RktPn, h4 .RktPn, h5 .RktPn {
|
|||
color: inherit;
|
||||
}
|
||||
|
||||
.tocset .RktValLink, .tocset .RktStxLink, .tocset .RktModLink {
|
||||
.tocset .RktValLink, .tocset .RktStxLink, .tocset .RktModLink, .tocset .RktSym {
|
||||
color: black;
|
||||
font-weight: 400;
|
||||
font-weight: 400;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
|
@ -195,11 +196,11 @@ tbody > tr:first-child > td > .together {
|
|||
}
|
||||
|
||||
.defmodule {
|
||||
font-family: 'Source Code Pro';
|
||||
font-family: 'Fira-Mono', monospace;
|
||||
padding: 0.25rem 0.75rem 0.25rem 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
width: 100%;
|
||||
background-color: hsl(60, 29%, 94%);
|
||||
background-color: #ebf0f4;
|
||||
}
|
||||
|
||||
.defmodule a {
|
||||
|
@ -218,6 +219,10 @@ tbody > tr:first-child > td > .together {
|
|||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/* make parens ordinary color in defmodule */
|
||||
.defmodule .RktPn {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.specgrammar {
|
||||
float: none;
|
||||
|
@ -288,7 +293,7 @@ tbody > tr:first-child > td > .together {
|
|||
text-align: right;
|
||||
z-index: 0;
|
||||
font-weight: 300;
|
||||
font-family: 'Source Code Pro';
|
||||
font-family: 'Fira-Mono', monospace;
|
||||
font-size: 0.9rem;
|
||||
color: gray;
|
||||
}
|
||||
|
@ -296,7 +301,7 @@ tbody > tr:first-child > td > .together {
|
|||
|
||||
.RpackageSpec .Smaller {
|
||||
font-weight: 300;
|
||||
font-family: 'Source Code Pro';
|
||||
font-family: 'Fira-Mono', monospace;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,17 +26,25 @@
|
|||
|
||||
/* Monospace: */
|
||||
.maincolumn, .refpara, .refelem, .tocset, .stt, .hspace, .refparaleft, .refelemleft {
|
||||
font-family: 'Source Code Pro', monospace;
|
||||
font-family: 'Fira-Mono', monospace;
|
||||
white-space: inherit;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.stt {
|
||||
font-weight: 500;
|
||||
/* embolden the "Racket Guide" and "Racket Reference" links on the TOC */
|
||||
/* there isn't an obvious tag in the markup that designates the top TOC page, which is called "start.scrbl" */
|
||||
/* nor a tag that designates these two links as special */
|
||||
/* so we'll use this slightly tortured sibling selector that hooks onto the h2 tag */
|
||||
h2[x-source-module='(lib "scribblings/main/start.scrbl")'] ~ table a[href="guide/index.html"],
|
||||
h2[x-source-module='(lib "scribblings/main/start.scrbl")'] ~ table a[href="reference/index.html"] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
h2 .stt {
|
||||
font-size: 2.7rem;
|
||||
font-size: 2.3rem;
|
||||
/* prevent automatic bolding from h2 */
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.toptoclink .stt {
|
||||
|
@ -48,7 +56,7 @@ h2 .stt {
|
|||
|
||||
.RpackageSpec .stt {
|
||||
font-weight: 300;
|
||||
font-family: 'Source Code Pro';
|
||||
font-family: 'Fira-Mono', monospace;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
|
@ -61,8 +69,11 @@ h3 .stt, h4 .stt, h5 .stt {
|
|||
|
||||
/* Serif: */
|
||||
.main, .refcontent, .tocview, .tocsub, .sroman, i {
|
||||
font-family: 'Charter', serif;
|
||||
font-family: 'Charter-Racket', serif;
|
||||
font-size: 1.18rem;
|
||||
/* Don't use font-feature-settings with Charter,
|
||||
it fouls up loading for reasons mysterious */
|
||||
/* font-feature-settings: 'tnum' 1, 'liga' 0; */
|
||||
}
|
||||
|
||||
|
||||
|
@ -70,9 +81,10 @@ h3 .stt, h4 .stt, h5 .stt {
|
|||
.version, .versionNoNav, .ssansserif {
|
||||
font-family: 'Fira', sans-serif;
|
||||
}
|
||||
|
||||
/* used mostly for DrRacket menu commands */
|
||||
.ssansserif {
|
||||
font-family: 'Fira';
|
||||
font-weight: 500;
|
||||
font-family: 'Fira', sans-serif;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
|
@ -98,19 +110,13 @@ li {
|
|||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6, h7, h8 {
|
||||
font-family: 'Fira';
|
||||
font-family: 'Fira', sans-serif;
|
||||
font-weight: 300;
|
||||
font-size: 1.6rem;
|
||||
color: #333;
|
||||
margin-top: inherit;
|
||||
margin-bottom: 1rem;
|
||||
line-height: 1.25;
|
||||
-moz-font-feature-settings: 'tnum=1';
|
||||
-moz-font-feature-settings: 'tnum' 1;
|
||||
-webkit-font-feature-settings: 'tnum' 1;
|
||||
-o-font-feature-settings: 'tnum' 1;
|
||||
-ms-font-feature-settings: 'tnum' 1;
|
||||
font-feature-settings: 'tnum' 1;
|
||||
|
||||
}
|
||||
|
||||
|
@ -121,12 +127,15 @@ h3, h4, h5, h6, h7, h8 {
|
|||
|
||||
|
||||
h2 { /* per-page main title */
|
||||
font-family: 'Miso';
|
||||
font-weight: bold;
|
||||
font-family: 'Cooper-Hewitt';
|
||||
margin-top: 4rem;
|
||||
font-size: 3rem;
|
||||
line-height: 1.1;
|
||||
font-size: 2.3rem;
|
||||
font-weight: bold;
|
||||
line-height: 1.2;
|
||||
width: 90%;
|
||||
/* a little nudge to make text visually lower than 4rem rule in left margin */
|
||||
position: relative;
|
||||
top: 6px;
|
||||
}
|
||||
|
||||
h3, h4, h5, h6, h7, h8 {
|
||||
|
@ -174,7 +183,7 @@ a:hover {
|
|||
left: 0;
|
||||
width: 15rem;
|
||||
height: 6rem;
|
||||
font-family: 'Fira';
|
||||
font-family: 'Fira', sans-serif;
|
||||
font-size: 0.9rem;
|
||||
border-bottom: 0px solid hsl(216, 15%, 70%);
|
||||
background-color: inherit;
|
||||
|
@ -251,16 +260,20 @@ a:hover {
|
|||
}
|
||||
|
||||
.searchbox {
|
||||
font-size: 1rem;
|
||||
font-size: 0.9rem;
|
||||
width: 12rem;
|
||||
margin: 1rem;
|
||||
padding: 0.25rem;
|
||||
padding: 0.25rem 0.4rem ;
|
||||
vertical-align: middle;
|
||||
background-color: white;
|
||||
font-family: 'Fira-Mono', monospace;
|
||||
}
|
||||
|
||||
|
||||
#search_box {
|
||||
font-size: 0.8rem;
|
||||
font-family: 'Fira-Mono', monospace;
|
||||
font-size: 1rem;
|
||||
padding: 0.25rem 0.3rem ;
|
||||
}
|
||||
|
||||
/* Default to local view. Global will specialize */
|
||||
|
@ -366,7 +379,7 @@ a:hover {
|
|||
}
|
||||
|
||||
.refcontent {
|
||||
font-family: 'Fira';
|
||||
font-family: 'Fira', sans-serif;
|
||||
font-size: 1rem;
|
||||
line-height: 1.6;
|
||||
margin: 0 0 0 0;
|
||||
|
@ -413,14 +426,7 @@ a:hover {
|
|||
padding-bottom: 0.4rem;
|
||||
padding-left: 0.2rem;
|
||||
line-height: 1.1;
|
||||
font-family: 'Fira';
|
||||
-moz-font-feature-settings: 'tnum=1';
|
||||
-moz-font-feature-settings: 'tnum' 1;
|
||||
-webkit-font-feature-settings: 'tnum' 1;
|
||||
-o-font-feature-settings: 'tnum' 1;
|
||||
-ms-font-feature-settings: 'tnum' 1;
|
||||
font-feature-settings: 'tnum' 1;
|
||||
|
||||
font-family: 'Fira', sans-serif;
|
||||
}
|
||||
|
||||
.tocset td a {
|
||||
|
@ -490,11 +496,23 @@ table.tocsublist {
|
|||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.tocviewsublist td, .tocviewsublistbottom td, .tocviewsublisttop td, .tocsub td,
|
||||
.tocviewsublist td,
|
||||
.tocviewsublistbottom td,
|
||||
.tocviewsublisttop td,
|
||||
.tocsub td,
|
||||
.tocviewsublistonly td {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* shrink the monospaced text (`stt`) within nav */
|
||||
.tocviewsublist td .stt,
|
||||
.tocviewsublistbottom td .stt,
|
||||
.tocviewsublisttop td .stt,
|
||||
.tocsub td .stt,
|
||||
.tocviewsublistonly td .stt {
|
||||
font-size: 95%;
|
||||
}
|
||||
|
||||
|
||||
.tocviewtoggle {
|
||||
font-size: 75%; /* looks better, and avoids bounce when toggling sub-sections due to font alignments */
|
||||
|
@ -532,7 +550,7 @@ table.tocsublist {
|
|||
.tocsubtitle {
|
||||
display: block;
|
||||
font-size: 62%;
|
||||
font-family: 'Fira';
|
||||
font-family: 'Fira', sans-serif;
|
||||
font-weight: bolder;
|
||||
font-style: normal;
|
||||
letter-spacing: 2px;
|
||||
|
@ -586,20 +604,27 @@ blockquote {
|
|||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
/* put a little air between lines of code sample */
|
||||
/* Fira Mono appears taller than Source Code Pro */
|
||||
.SCodeFlow td {
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.boxed {
|
||||
margin: 0;
|
||||
margin-top: 2em;
|
||||
padding: 0.25em;
|
||||
padding-bottom: 0.5em;
|
||||
padding-top: 0.3em;
|
||||
padding-bottom: 0.4em;
|
||||
background: #f3f3f3;
|
||||
box-sizing:border-box;
|
||||
border-top: 1px solid #99b;
|
||||
background: hsl(216, 78%, 95%);
|
||||
background: -moz-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 78%, 95%) 100%);
|
||||
background: -webkit-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 78%, 95%) 100%);
|
||||
background: -o-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 78%, 95%) 100%);
|
||||
background: -ms-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 78%, 95%) 100%);
|
||||
background: linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 78%, 95%) 100%);
|
||||
background: -moz-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%);
|
||||
background: -webkit-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%);
|
||||
background: -o-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%);
|
||||
background: -ms-linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%);
|
||||
background: linear-gradient(to bottom left, hsl(0, 0%, 99%) 0%, hsl(216, 62%, 95%) 100%);
|
||||
}
|
||||
|
||||
blockquote > blockquote.SVInsetFlow {
|
||||
|
@ -614,7 +639,6 @@ blockquote > blockquote.SVInsetFlow {
|
|||
|
||||
.SVInsetFlow a, .SCodeFlow a {
|
||||
color: #07A;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.SubFlow {
|
||||
|
@ -632,11 +656,11 @@ blockquote > blockquote.SVInsetFlow {
|
|||
.SAuthorListBox {
|
||||
position: static;
|
||||
float: none;
|
||||
font-family: 'Fira';
|
||||
font-family: 'Fira', sans-serif;
|
||||
font-weight: 300;
|
||||
font-size: 110%;
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 3rem;
|
||||
margin-bottom: 2rem;
|
||||
width: 30rem;
|
||||
height: auto;
|
||||
}
|
||||
|
|
62
scribble-lib/scribble/private/latex-index.rkt
Normal file
62
scribble-lib/scribble/private/latex-index.rkt
Normal file
|
@ -0,0 +1,62 @@
|
|||
#lang racket/base
|
||||
(require "../core.rkt"
|
||||
"../html-properties.rkt")
|
||||
|
||||
(provide same-index-entry?
|
||||
extract-index-link-targets)
|
||||
|
||||
(define (same-index-entry? a-blocks b-blocks)
|
||||
(and (= (length a-blocks) (length b-blocks))
|
||||
;; We expect an index entry to have a single paragraph, but
|
||||
;; allow a list:
|
||||
(for/and ([a (in-list a-blocks)]
|
||||
[b (in-list b-blocks)])
|
||||
(and (paragraph? a)
|
||||
(paragraph? b)
|
||||
;; Compare paragraph content, paying attention to style,
|
||||
;; but not paying attention to link targets:
|
||||
(let loop ([a (paragraph-content a)]
|
||||
[b (paragraph-content b)])
|
||||
(cond
|
||||
[(equal? a b) #t]
|
||||
[(alpha-anchor-content a) => (lambda (a) (loop a b))]
|
||||
[(alpha-anchor-content b) => (lambda (b) (loop a b))]
|
||||
[(and (pair? a) (pair? b))
|
||||
(and (loop (car a) (car b))
|
||||
(loop (cdr a) (cdr b)))]
|
||||
[(and (element? a)
|
||||
(element? b))
|
||||
(and (equal? (element-content a)
|
||||
(element-content b))
|
||||
(equal? (element-style a)
|
||||
(element-style b)))]
|
||||
[else #f]))))))
|
||||
|
||||
(define (alpha-anchor-content e)
|
||||
(and (element? e)
|
||||
(let ([s (element-style e)])
|
||||
(and s
|
||||
(style? s)
|
||||
(not (style-name s))
|
||||
(= 1 (length (style-properties s)))
|
||||
(url-anchor? (car (style-properties s)))))
|
||||
(let ([c (element-content e)])
|
||||
(cond
|
||||
[(and (pair? c) (null? (cdr c))) (car c)]
|
||||
[else c]))))
|
||||
|
||||
(define (extract-index-link-targets blockss)
|
||||
(apply
|
||||
append
|
||||
(for*/list ([blocks (in-list blockss)]
|
||||
[b (in-list blocks)])
|
||||
(cond
|
||||
[(paragraph? b)
|
||||
(let content-loop ([c (paragraph-content b)])
|
||||
(cond
|
||||
[(null? c) null]
|
||||
[(pair? c) (append (content-loop (car c))
|
||||
(content-loop (cdr c)))]
|
||||
[(link-element? c) (list c)]
|
||||
[else null]))]
|
||||
[else null]))))
|
|
@ -15,4 +15,3 @@
|
|||
\newcommand{\doHypersetup}{\hypersetup{bookmarks=true,bookmarksopen=true,bookmarksnumbered=true}}
|
||||
\newcommand{\packageTocstyle}{\IfFileExists{tocstyle.sty}{\usepackage{tocstyle}\usetocstyle{standard}}{}}
|
||||
\newcommand{\packageCJK}{\IfFileExists{CJK.sty}{\usepackage{CJK}}{}}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
\packageTocstyle
|
||||
\packageCJK
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Configuration that is especially meant to be overridden:
|
||||
|
||||
|
@ -68,6 +69,11 @@
|
|||
|
||||
\newcommand{\SectionNumberLink}[2]{\hyperref[#1]{#2}}
|
||||
|
||||
% Enabled with a 'enable-index-merge part style property. This default
|
||||
% implementation isn't good enough, because the argument is a
|
||||
% comma-separated sequence of labels:
|
||||
\newcommand{\Smanypageref}[1]{\pageref{#1}}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Fonts
|
||||
|
||||
|
|
|
@ -264,8 +264,8 @@
|
|||
[(date<? b a) #f]
|
||||
[else (string-ci<? (auto-bib-key a) (auto-bib-key b))]))))
|
||||
(define (ambiguous? a b)
|
||||
(and (string-ci=? (author-element-cite (extract-bib-author a))
|
||||
(author-element-cite (extract-bib-author b)))
|
||||
(and (string-ci=? (content->string (author-element-cite (extract-bib-author a)))
|
||||
(content->string (author-element-cite (extract-bib-author b))))
|
||||
(auto-bib-date a)
|
||||
(auto-bib-date b)
|
||||
(date=? a b)))
|
||||
|
@ -593,8 +593,8 @@
|
|||
(make-other-author-element
|
||||
#f
|
||||
(list "Alia")
|
||||
"al."
|
||||
"al."))
|
||||
(list "al" ._)
|
||||
(list "al" ._)))
|
||||
|
||||
(define (authors name . names*)
|
||||
(define names (map parse-author (cons name names*)))
|
||||
|
@ -603,11 +603,12 @@
|
|||
(case (length names)
|
||||
[(1) (author-element-cite (car names))]
|
||||
[(2) (if (other-author-element? (cadr names))
|
||||
(format "~a et al." (author-element-cite (car names)))
|
||||
(format "~a and ~a"
|
||||
(author-element-cite (car names))
|
||||
(author-element-cite (cadr names))))]
|
||||
[else (format "~a et al." (author-element-cite (car names)))]))
|
||||
(list (author-element-cite (car names)) " et al" @._)
|
||||
(list
|
||||
(author-element-cite (car names))
|
||||
" and "
|
||||
(author-element-cite (cadr names))))]
|
||||
[else (list (author-element-cite (car names)) " et al" ._)]))
|
||||
(make-author-element
|
||||
#f
|
||||
(let loop ([names names] [prefix 0])
|
||||
|
@ -615,10 +616,10 @@
|
|||
(case prefix
|
||||
[(0) names]
|
||||
[(1) (if (other-author-element? (car names))
|
||||
(list " et al.")
|
||||
(list " et al" ._)
|
||||
(list " and " (car names)))]
|
||||
[else (if (other-author-element? (car names))
|
||||
(list ", et al.")
|
||||
(list ", et al" ._)
|
||||
(list ", and " (car names)))])]
|
||||
[else
|
||||
(case prefix
|
||||
|
|
12
scribble-lib/scriblib/book-index.rkt
Normal file
12
scribble-lib/scriblib/book-index.rkt
Normal file
|
@ -0,0 +1,12 @@
|
|||
#lang racket/base
|
||||
(require racket/runtime-path
|
||||
scribble/latex-properties)
|
||||
|
||||
(provide book-index-style-properties)
|
||||
|
||||
(define-runtime-path book-index.tex "book-index.tex")
|
||||
|
||||
(define book-index-style-properties
|
||||
(list
|
||||
(tex-addition book-index.tex)
|
||||
'enable-index-merge))
|
8
scribble-lib/scriblib/book-index.tex
Normal file
8
scribble-lib/scriblib/book-index.tex
Normal file
|
@ -0,0 +1,8 @@
|
|||
\usepackage{cleveref}
|
||||
|
||||
\newcommand{\crefrangeconjunction}{, }
|
||||
\newcommand{\crefpairconjunction}{, }
|
||||
\newcommand{\crefmiddleconjunction}{, }
|
||||
\newcommand{\creflastconjunction}{, }
|
||||
|
||||
\renewcommand{\Smanypageref}[1]{\labelcpageref{#1}}
|
|
@ -150,8 +150,8 @@
|
|||
(counter-ref figures tag (string-append initial "igure")
|
||||
#:link-render-style link-style))]
|
||||
[(null? (cdr tags))
|
||||
(define tag1 (car tags))
|
||||
(define tag2 (cadr tags))
|
||||
(define tag1 tag)
|
||||
(define tag2 (car tags))
|
||||
(make-element #f (list (counter-ref figures tag1 (string-append initial "igures")
|
||||
#:link-render-style link-style)
|
||||
" and "
|
||||
|
|
|
@ -91,3 +91,8 @@
|
|||
@examples[
|
||||
(eval:alts (/ 100 0) (eval:results (list "(/ 1 0)" "'=") "getting +inf.0" "oops"))
|
||||
]
|
||||
|
||||
@examples[
|
||||
#:no-prompt
|
||||
(eval:alts (define x 42) (define x 42))
|
||||
]
|
||||
|
|
|
@ -98,3 +98,7 @@ Example:
|
|||
oops
|
||||
(/ 1 0)
|
||||
'=
|
||||
|
||||
Example:
|
||||
|
||||
(define x 42)
|
||||
|
|
Loading…
Reference in New Issue
Block a user