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

This commit is contained in:
Suzanne Soy 2021-07-06 03:07:11 +01:00
commit a7a8bcd015
32 changed files with 1783 additions and 1669 deletions

10
LICENSE Normal file
View File

@ -0,0 +1,10 @@
This component of Racket is distributed under the under the Apache 2.0
and MIT licenses. The user can choose the license under which they
will be using the software. There may be other licenses within the
distribution with which the user must also comply.
See the files
https://github.com/racket/racket/blob/master/racket/src/LICENSE-APACHE.txt
and
https://github.com/racket/racket/blob/master/racket/src/LICENSE-MIT.txt
for the full text of the licenses.

24
README.md Normal file
View File

@ -0,0 +1,24 @@
# scribble-text-lib
This the source for the Racket packages: "scribble", "scribble-doc", "scribble-html-lib", "scribble-lib", "scribble-test", "scribble-text-lib".
### Contributing
Contribute to Racket by submitting a [pull request], reporting an
[issue], joining the [development mailing list], or visiting the
IRC or Slack channels.
### License
Racket, including these packages, is free software, see [LICENSE]
for more details.
By making a contribution, you are agreeing that your contribution
is licensed under the [Apache 2.0] license and the [MIT] license.
[MIT]: https://github.com/racket/racket/blob/master/racket/src/LICENSE-MIT.txt
[Apache 2.0]: https://www.apache.org/licenses/LICENSE-2.0.txt
[pull request]: https://github.com/racket/scribble-text-lib/pulls
[issue]: https://github.com/racket/scribble-text-lib/issues
[development mailing list]: https://lists.racket-lang.org
[LICENSE]: LICENSE

View File

@ -1,11 +0,0 @@
scribble-doc
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

View File

@ -467,7 +467,9 @@ gets progressively smaller.}
gets progressively larger.}
@defproc[(emph [pre-content pre-content?] ...) element?]{
The same as @racket[italic].}
Like @racket[elem], but emphasised. Typically, italics are used for
emphasis. Uses of @racket[emph] can be nested; typically this causes
the text to alternate between italic and upright.}
@defproc[(literal [str string?] ...+) element?]{

View File

@ -332,7 +332,7 @@ The style classes:
[@css{versionbox} @elem{Outer wrapper for version}]
[@css{version} @elem{Inner wrapper for version in the case of search box and/or navigation.}]
[@css{versionNoNav} @elem{Inner wrapper for version in the acse of no search box and navigation.}]
[@css{versionNoNav} @elem{Inner wrapper for version in the case of no search box and navigation.}]
[@spacer @spacer]

View File

@ -441,6 +441,14 @@ The recognized @tech{style properties} are as follows:
listing except when those sub-parts are top-level entries in
the listing.}
@item{@indexed-racket['no-toc+aux] --- As a @tech{style property} for
the main part of a rendered page, causes the HTML output to not
include a margin box for the main table of contents, ``on this
page'', or tables with the @racket['aux] style property. The
@racket['no-toc+aux] property effectively implies
@racket['no-toc] and @racket['no-sidebar], but also suppresses
@racket['aux] tables.}
@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
for the main table of contents; the ``on this page'' box that
@ -541,7 +549,8 @@ 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.}]}
#:changed "1.26" @elem{Added @racket[link-render-style] support.}
#:changed "1.27" @elem{Added @racket['no-toc+aux] support.}]}
@defstruct[paragraph ([style style?] [content content?])]{
@ -590,10 +599,6 @@ The currently recognized @tech{style properties} are as follows:
@item{@racket[attributes] structure --- Provides additional HTML
attributes for the @tt{<p>}, @tt{<div>}, or alternate tag.}
@item{@racket[body-id] structure --- For HTML, uses the given string
as an @tt{id} attribute of the @tt{<p>}, @tt{<div>}, or
alternate tag.}
@item{@indexed-racket['never-indents] --- For Latex and @tech{compound
paragraphs}; see @racket[compound-paragraph].}
@ -649,9 +654,6 @@ The following @tech{style properties} are currently recognized:
@item{@racket[attributes] structure --- Provides additional HTML
attributes for the @tt{<table>} tag.}
@item{@racket[body-id] structure --- For HTML, uses the given string
as an @tt{id} attribute of the @tt{<table>} tag.}
@item{@indexed-racket['aux] --- For HTML, include the table in the
table-of-contents display for the enclosing part.}
@ -698,9 +700,6 @@ The following @tech{style properties} are currently recognized:
@item{@racket[attributes] structure --- Provides additional HTML
attributes for the @tt{<ul>} or @tt{<ol>} tag.}
@item{@racket[body-id] structure --- For HTML, uses the given string
as an @tt{id} attribute of the @tt{<ul>} or @tt{<ol>} tag.}
@item{@indexed-racket['never-indents] --- For Latex and @tech{compound
paragraphs}; see @racket[compound-paragraph].}
@ -749,9 +748,6 @@ The following @tech{style properties} are currently recognized:
@item{@racket[attributes] structure --- Provides additional HTML
attributes for the @tt{<blockquote>} tag.}
@item{@racket[body-id] structure --- For HTML, uses the given string
as an @tt{id} attribute of the @tt{<blockquote>} tag.}
@item{@indexed-racket['never-indents] --- For Latex and @tech{compound
paragraphs}; see @racket[compound-paragraph].}
@ -802,9 +798,6 @@ for Latex output (see @secref["extra-style"]). The following
@item{@racket[attributes] structure --- Provides additional HTML
attributes for the @tt{<p>} or alternate tag.}
@item{@racket[body-id] structure --- For HTML, uses the given string
as an @tt{id} attribute of the @tt{<p>} or alternate tag.}
@item{@indexed-racket['never-indents] --- For Latex within another
@tech{compound paragraph}; see above.}
@ -914,9 +907,6 @@ The following @tech{style properties} are currently recognized:
@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.}
@item{@indexed-racket['aux] --- Intended for use in titles, where the
auxiliary part of the title can be omitted in hyperlinks. See,
for example, @racket[secref].}
@ -1818,7 +1808,7 @@ Like @racket[css-style-addition], but for a JavaScript file instead of a CSS fil
@defstruct[body-id ([value string?])]{
Used as a @tech{style property} to associate an @tt{id} attribute with
an HTML tag.}
an HTML tag within a main @racket[part].}
@defstruct[document-source ([module-path module-path?])]{
@ -1958,7 +1948,7 @@ arguments to the element's command in Latex output.}
@defstruct[command-optional ([arguments (listof string?)])]{
Used as a @tech{style property} on a @racket[element] to add
a optional arguments to the element's command in Latex output.
optional arguments to the element's command in Latex output.
@history[#:added "1.20"]
}

View File

@ -1714,9 +1714,8 @@ Typesets the given combination of a GUI's menu and item name.}
@tech{decode}d @racket[pre-content] as a file name (e.g., in
typewriter font and in quotes).}
@defproc[(exec [pre-content pre-content?] ...) element?]{Typesets the
@tech{decode}d @racket[pre-content] as a command line (e.g., in
typewriter font).}
@defproc[(exec [content content?] ...) element?]{Typesets the
@racket[content] as a command line (e.g., in typewriter font).}
@defproc[(envvar [pre-content pre-content?] ...) element?]{Typesets the given
@tech{decode}d @racket[pre-content] as an environment variable (e.g.,
@ -2028,7 +2027,7 @@ that is hyperlinked to an explanation.}
@defthing[undefined-const element?]{Returns an element for @|undefined-const|.}
@defproc[(commandline [pre-content pre-content?] ...) paragraph?]{Produces
@defproc[(commandline [content content?] ...) paragraph?]{Produces
an inset command-line example (e.g., in typewriter font).}
@defproc[(inset-flow [pre-flow pre-flow?] ...) nested-flow?]{
@ -2201,7 +2200,7 @@ For HTML rendering:
@filepath{manual-style.css} from the @filepath{scribble}
collection in @racket[html-defaults].}
@item{The file @filepath{manual-files.css} from the
@item{The file @filepath{manual-fonts.css} from the
@filepath{scribble} collection is designated as an additional
accompanying file in @racket[html-defaults].}

View File

@ -607,6 +607,13 @@ Code blocks are marked using the
"Github convention"] @verbatim{```racket} so that they are lexed and
formatted as Racket code.}}
@defboolparam[current-markdown-link-sections enabled?]{
Determines whether section links within an output document are
rendered as a section link. The default is @racket[#f].
@history[#:added "1.31"]}
@; ----------------------------------------
@section{HTML Renderer}

View File

@ -1,5 +1,6 @@
#lang scribble/manual
@(require (for-label scribble/struct
@(require (for-label (only-in scribble/core content?)
scribble/struct
scriblib/autobib
scheme/base
scheme/contract))
@ -228,7 +229,7 @@ Both arguments are optional, but at least one must be supplied.}
Combines elements to generate an element that is suitable for
describing a technical report's location.}
@defproc[(dissertation-location [#:institution institution edition any/c]
@defproc[(dissertation-location [#:institution institution any/c]
[#:degree degree any/c "PhD"])
element?]{
@ -264,7 +265,7 @@ alphabetized appropriately. Any of @racket[name] or @racket[names]
that are strings are
parsed in the same way as by @racket[make-bib].}
@defproc[(org-author-name [name any/c]) element?]{
@defproc[(org-author-name [name (or/c element? string?)]) element?]{
Converts an element for an organization name to one suitable for use
as a bib-value author.}
@ -275,7 +276,7 @@ Generates an element that is suitable for use as a ``others'' author.
When combined with another author element via @racket[authors], the
one created by @racket[other-authors] renders as ``et al.''}
@defproc[(editor [name name/c]) element?]{
@defproc[(editor [name (or/c element? string?)]) element?]{
Takes an author-name element and create one that represents the editor
of a collection. If a @racket[name] is a string, it is parsed in the

View File

@ -1,11 +0,0 @@
scribble-text-lib
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

View File

@ -33,7 +33,7 @@
(let loop ([xs xs] [as '()])
(define a (and (pair? xs) (attribute->symbol (car xs))))
(cond [(not a) (values (reverse as) xs)]
[(null? (cdr xs)) (error 'attriubtes+body
[(null? (cdr xs)) (error 'attributes+body
"missing attribute value for `~s:'" a)]
[else (loop (cddr xs) (cons (cons a (cadr xs)) as))])))

View File

@ -1,11 +0,0 @@
scribble-lib
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

View File

@ -23,4 +23,4 @@
(define pkg-authors '(mflatt eli))
(define version "1.30")
(define version "1.32")

View File

@ -258,7 +258,7 @@
(make-element 'larger (decode-content str)))
(define (emph . str)
(make-element 'italic (decode-content str)))
(make-element 'emph (decode-content str)))
(define (tt . str)
(let* ([l (decode-content str)]

View File

@ -1,121 +1,122 @@
(module bnf racket
(require scribble/decode
(except-in scribble/struct
element?)
(only-in scribble/core
content?
element?
make-style
make-table-columns)
)
#lang racket
(provide (contract-out
[BNF (-> (cons/c (or/c block? content?)
(non-empty-listof (or/c block? content?)))
...
table?)]
[BNF-etc element?]
;; operate on content
[BNF-seq (-> content? ...
(or/c element? ""))]
[BNF-seq-lines (-> (listof content?) ...
block?)]
[BNF-alt (-> content? ...
element?)]
[BNF-alt/close (-> content? ...
element?)]
;; operate on pre-content
[BNF-group (-> pre-content? ...
element?)]
[nonterm (-> pre-content? ...
element?)]
[optional (-> pre-content? ...
element?)]
[kleenestar (-> pre-content? ...
element?)]
[kleeneplus (-> pre-content? ...
element?)]
[kleenerange (-> any/c any/c pre-content? ...
(require scribble/decode
(except-in scribble/struct
element?)
(only-in scribble/core
content?
element?
make-style
make-table-columns)
)
(provide (contract-out
[BNF (-> (cons/c (or/c block? content?)
(non-empty-listof (or/c block? content?)))
...
table?)]
[BNF-etc element?]
;; operate on content
[BNF-seq (-> content? ...
(or/c element? ""))]
[BNF-seq-lines (-> (listof content?) ...
block?)]
[BNF-alt (-> content? ...
element?)]
[BNF-alt/close (-> content? ...
element?)]
))
(define spacer (make-element 'hspace (list " ")))
(define equals (make-element 'tt (list spacer "::=" spacer)))
(define alt (make-element 'tt (list spacer spacer "|" spacer spacer)))
(define (as-flow i) (make-flow (list (if (block? i)
i
(make-paragraph (list i))))))
;; operate on pre-content
[BNF-group (-> pre-content? ...
element?)]
[nonterm (-> pre-content? ...
element?)]
[optional (-> pre-content? ...
element?)]
[kleenestar (-> pre-content? ...
element?)]
[kleeneplus (-> pre-content? ...
element?)]
[kleenerange (-> any/c any/c pre-content? ...
element?)]
))
(define baseline (make-style #f '(baseline)))
(define spacer (make-element 'hspace (list " ")))
(define equals (make-element 'tt (list spacer "::=" spacer)))
(define alt (make-element 'tt (list spacer spacer "|" spacer spacer)))
(define (BNF . defns)
(make-table
(make-style #f
(list
(make-table-columns
(list baseline baseline baseline baseline))))
(apply
append
(map (match-lambda
[(cons lhs (cons rhs0 more-rhs))
(cons
(list (as-flow spacer) (as-flow lhs) (as-flow equals) (as-flow rhs0))
(map (lambda (i)
(list (as-flow spacer) (as-flow " ") (as-flow alt) (as-flow i)))
more-rhs))])
defns))))
(define (as-flow i) (make-flow (list (if (block? i)
i
(make-paragraph (list i))))))
;; interleave : (listof content?) element? -> element?
(define (interleave l spacer)
(make-element #f (cons (car l)
(apply append
(map (lambda (i)
(list spacer i))
(cdr l))))))
(define (BNF-seq . l)
(if (null? l)
""
(interleave l spacer)))
(define baseline (make-style #f '(baseline)))
(define (BNF-seq-lines . l)
(make-table #f (map (lambda (row) (list (as-flow (apply BNF-seq row))))
l)))
(define (BNF . defns)
(make-table
(make-style #f
(list
(make-table-columns
(list baseline baseline baseline baseline))))
(apply
append
(map (match-lambda
[(cons lhs (cons rhs0 more-rhs))
(cons
(list (as-flow spacer) (as-flow lhs) (as-flow equals) (as-flow rhs0))
(map (lambda (i)
(list (as-flow spacer) (as-flow " ") (as-flow alt) (as-flow i)))
more-rhs))])
defns))))
(define (BNF-alt . l)
(interleave l alt))
;; interleave : (listof content?) element? -> element?
(define (interleave l spacer)
(make-element #f (cons (car l)
(apply append
(map (lambda (i)
(list spacer i))
(cdr l))))))
(define (BNF-alt/close . l)
(interleave l (make-element 'roman " | ")))
(define (BNF-seq . l)
(if (null? l)
""
(interleave l spacer)))
(define BNF-etc (make-element 'roman "..."))
(define (BNF-seq-lines . l)
(make-table #f (map (lambda (row) (list (as-flow (apply BNF-seq row))))
l)))
(define (nonterm . s)
(make-element 'roman (append (list 'lang)
(list (make-element 'italic (decode-content s)))
(list 'rang))))
(define (BNF-alt . l)
(interleave l alt))
(define (optional . s)
(make-element #f (append (list (make-element 'roman "["))
(decode-content s)
(list (make-element 'roman "]")))))
(define (BNF-alt/close . l)
(interleave l (make-element 'roman " | ")))
(define (BNF-group . s)
(make-element #f (append (list (make-element 'roman "{"))
(list (apply BNF-seq (decode-content s)))
(list (make-element 'roman "}")))))
(define BNF-etc (make-element 'roman "..."))
(define (kleenestar . s)
(make-element #f (append (decode-content s) (list (make-element 'roman "*")))))
(define (nonterm . s)
(make-element 'roman (append (list 'lang)
(list (make-element 'italic (decode-content s)))
(list 'rang))))
(define (kleeneplus . s)
(make-element #f (append (decode-content s) (list (make-element 'superscript (list "+"))))))
(define (optional . s)
(make-element #f (append (list (make-element 'roman "["))
(decode-content s)
(list (make-element 'roman "]")))))
(define (kleenerange a b . s)
(make-element #f (append (decode-content s)
(list (make-element 'roman
(make-element 'superscript
(list (format "{~a,~a}" a b)))))))))
(define (BNF-group . s)
(make-element #f (append (list (make-element 'roman "{"))
(list (apply BNF-seq (decode-content s)))
(list (make-element 'roman "}")))))
(define (kleenestar . s)
(make-element #f (append (decode-content s) (list (make-element 'roman "*")))))
(define (kleeneplus . s)
(make-element #f (append (decode-content s) (list (make-element 'superscript (list "+"))))))
(define (kleenerange a b . s)
(make-element #f (append (decode-content s)
(list (make-element 'roman
(make-element 'superscript
(list (format "{~a,~a}" a b))))))))

View File

@ -38,7 +38,7 @@
\renewcommand{\Ssubsubsubsectiongrouperstar}[1]{\setcounter{GrouperTemp}{\value{subsubsection}}\Ssubsubsectionstar{#1}\setcounter{subsubsection}{\value{GrouperTemp}}}
\renewcommand{\Ssubsubsubsubsectiongrouperstar}[1]{\Ssubsubsubsubsectionstar{#1}}
% To increments section numbers:
% To increment section numbers:
\renewcommand{\Sincpart}{\stepcounter{part}}
\renewcommand{\Sincsection}{\stepcounter{chapter}}
\renewcommand{\Sincsubsection}{\stepcounter{section}}

View File

@ -1,83 +1,84 @@
(module comment-reader scheme/base
(require (only-in racket/port peeking-input-port))
#lang scheme/base
(provide (rename-out [*read read]
[*read-syntax read-syntax])
make-comment-readtable)
(require (only-in racket/port peeking-input-port))
(define unsyntaxer (make-parameter 'unsyntax))
(provide (rename-out [*read read]
[*read-syntax read-syntax])
make-comment-readtable)
(define (*read [inp (current-input-port)])
(parameterize ([unsyntaxer (read-unsyntaxer inp)]
[current-readtable (make-comment-readtable)])
(read/recursive inp)))
(define unsyntaxer (make-parameter 'unsyntax))
(define (*read-syntax src [port (current-input-port)])
(parameterize ([unsyntaxer (read-unsyntaxer port)]
[current-readtable (make-comment-readtable)])
(read-syntax/recursive src port)))
(define (*read [inp (current-input-port)])
(parameterize ([unsyntaxer (read-unsyntaxer inp)]
[current-readtable (make-comment-readtable)])
(read/recursive inp)))
(define (*read-syntax src [port (current-input-port)])
(parameterize ([unsyntaxer (read-unsyntaxer port)]
[current-readtable (make-comment-readtable)])
(read-syntax/recursive src port)))
(define (read-unsyntaxer port)
(let ([p (peeking-input-port port)])
(if (eq? (read p) '#:escape-id)
(begin (read port) (read port))
'unsyntax)))
(define (read-unsyntaxer port)
(let ([p (peeking-input-port port)])
(if (eq? (read p) '#:escape-id)
(begin (read port) (read port))
'unsyntax)))
(define (make-comment-readtable #:readtable [rt (current-readtable)])
(make-readtable rt
#\; 'terminating-macro
(case-lambda
[(char port)
(do-comment port (lambda () (read/recursive port #\@)))]
[(char port src line col pos)
(let ([v (do-comment port (lambda () (read-syntax/recursive src port #\@)))])
(let-values ([(eline ecol epos) (port-next-location port)])
(datum->syntax
#f
v
(list src line col pos (and pos epos (- epos pos))))))])))
(define (make-comment-readtable #:readtable [rt (current-readtable)])
(make-readtable rt
#\; 'terminating-macro
(case-lambda
[(char port)
(do-comment port (lambda () (read/recursive port #\@)))]
[(char port src line col pos)
(let ([v (do-comment port (lambda () (read-syntax/recursive src port #\@)))])
(let-values ([(eline ecol epos) (port-next-location port)])
(datum->syntax
#f
v
(list src line col pos (and pos epos (- epos pos))))))])))
(define (do-comment port recur)
(let loop ()
(when (equal? #\; (peek-char port))
(read-char port)
(loop)))
(when (equal? #\space (peek-char port))
(read-char port))
`(code:comment
(,(unsyntaxer)
(t
,@(append-strings
(let loop ()
(let ([c (read-char port)])
(cond
[(or (eof-object? c)
(char=? c #\newline))
null]
[(char=? c #\@)
(cons (recur) (loop))]
[else
(cons (string c)
(loop))]))))))))
(define (do-comment port recur)
(let loop ()
(when (equal? #\; (peek-char port))
(read-char port)
(loop)))
(when (equal? #\space (peek-char port))
(read-char port))
`(code:comment
(,(unsyntaxer)
(t
,@(append-strings
(let loop ()
(let ([c (read-char port)])
(cond
[(or (eof-object? c)
(char=? c #\newline))
null]
[(char=? c #\@)
(cons (recur) (loop))]
[else
(cons (string c)
(loop))]))))))))
(define (append-strings l)
(let loop ([l l][s null])
(cond
[(null? l) (if (null? s)
null
(preserve-space (apply string-append (reverse s))))]
[(string? (car l))
(loop (cdr l) (cons (car l) s))]
[else
(append (loop null s)
(cons
(car l)
(loop (cdr l) null)))])))
(define (append-strings l)
(let loop ([l l][s null])
(cond
[(null? l) (if (null? s)
null
(preserve-space (apply string-append (reverse s))))]
[(string? (car l))
(loop (cdr l) (cons (car l) s))]
[else
(append (loop null s)
(cons
(car l)
(loop (cdr l) null)))])))
(define (preserve-space s)
(let ([m (regexp-match-positions #rx" +" s)])
(if m
(append (preserve-space (substring s 0 (caar m)))
(list `(hspace ,(- (cdar m) (caar m))))
(preserve-space (substring s (cdar m))))
(list s)))))
(define (preserve-space s)
(let ([m (regexp-match-positions #rx" +" s)])
(if m
(append (preserve-space (substring s 0 (caar m)))
(list `(hspace ,(- (cdar m) (caar m))))
(preserve-space (substring s (cdar m))))
(list s))))

View File

@ -1,6 +1,5 @@
#lang mzscheme
(module config mzscheme
(provide value-color)
(provide value-color)
(define value-color "schemevalue"))
(define value-color "schemevalue")

View File

@ -226,6 +226,7 @@
([class "searchbox"]
[style ,(sa "color: "dimcolor";")]
[type "text"]
[tabindex "1"]
[value ,emptylabel]
[title "Enter a search string to search the manuals"]
[onkeypress ,(format "return DoSearchKey(event, this, ~s, ~s);"
@ -905,7 +906,9 @@
(head-extra-xexpr p)))
(body ([id ,(or (extract-part-body-id d ri)
"scribble-racket-lang-org")])
,@(render-toc-view d ri)
,@(if (part-style? d 'no-toc+aux)
null
(render-toc-view d ri))
(div ([class "maincolumn"])
(div ([class "main"])
,@(parameterize ([current-version (extract-version d)])
@ -1607,6 +1610,7 @@
(cond
[(symbol? name)
(case name
[(emph) '([class "emph"])]
[(italic) '([style "font-style: italic"])]
[(bold) '([style "font-weight: bold"])]
[(tt) '([class "stt"])]

View File

@ -151,7 +151,9 @@
(install-file style-file))))
(when whole-doc?
(printf "\\begin{document}\n\\preDoc\n")
(when (part-title-content d)
(when (and (part-title-content d)
(not (and (part-style? d 'hidden)
(equal? "" (content->string (part-title-content d))))))
(let ([vers (extract-version d)]
[date (extract-date d)]
[pres (extract-pretitle-content d)]
@ -166,7 +168,6 @@
(do-render-nested-flow pre d ri #t #f #t)]))
(when date (printf "\\date{~a}\n" date))
(printf "\\titleAnd~aVersionAnd~aAuthors~a{"
(if (equal? vers "") "Empty" "")
(if (null? auths) "Empty" "")
(if short "AndShort" ""))
@ -471,6 +472,7 @@
(cond
[(symbol? style-name)
(case style-name
[(emph) (wrap e "emph" tt?)]
[(italic) (wrap e "textit" tt?)]
[(bold) (wrap e "textbf" tt?)]
[(tt) (wrap e "Scribtexttt" #t)]

View File

@ -4,7 +4,10 @@
"private/render-utils.rkt"
racket/class racket/port racket/list racket/string racket/match
scribble/text/wrap)
(provide render-mixin)
(provide render-mixin
current-markdown-link-sections)
(define current-markdown-link-sections (make-parameter #f))
(define current-indent (make-parameter 0))
(define (make-indent amt)
@ -17,6 +20,9 @@
(indent))
(define note-depth (make-parameter 0))
(define in-toc (make-parameter #f))
(define markdown-part-tag 'markdown-section)
(define (render-mixin %)
(class %
@ -37,6 +43,16 @@
format-number
number-depth)
(define/override (collect-part-tags d ci number)
(for ([t (part-tags d)])
(let ([t (generate-tag t ci)])
(collect-put! ci
t
(vector (or (part-title-content d) '("???"))
(add-current-tag-prefix t)
number
markdown-part-tag)))))
(define/override (render-part d ht)
(let ([number (collected-info-number (part-collected-info d ht))])
(unless (part-style? d 'hidden)
@ -153,25 +169,32 @@
(write-string (make-string (note-depth) #\>))
(unless (zero? (note-depth))
(write-string " ")))
(define o (open-output-string))
(parameterize ([current-output-port o])
(super render-paragraph p part ri))
;; 1. Remove newlines so we can re-wrap the text.
;;
;; 2. Combine adjacent code spans into one. These result from
;; something like @racket[(x y)] being treated as multiple
;; RktXXX items rather than one. (Although it would be
;; more-correct to handle them at that level, I don't easily see
;; how. As a result I'm handling it after-the-fact, at the
;; text/Markdown stage.)
(define to-wrap (regexp-replaces (get-output-string o)
'([#rx"\n" " "] ;1
[#rx"``" ""]))) ;2
(define lines (wrap-line (string-trim to-wrap) (- 72 (current-indent))))
(write-note)
(write-string (car lines))
(for ([line (in-list (cdr lines))])
(newline) (indent) (write-note) (write-string line))
(cond
[(in-toc)
(write-note)
(super render-paragraph p part ri)
;; two spaces at a line end creates a line break:
(write-string " ")]
[else
(define o (open-output-string))
(parameterize ([current-output-port o])
(super render-paragraph p part ri))
;; 1. Remove newlines so we can re-wrap the text.
;;
;; 2. Combine adjacent code spans into one. These result from
;; something like @racket[(x y)] being treated as multiple
;; RktXXX items rather than one. (Although it would be
;; more-correct to handle them at that level, I don't easily see
;; how. As a result I'm handling it after-the-fact, at the
;; text/Markdown stage.)
(define to-wrap (regexp-replaces (get-output-string o)
'([#rx"\n" " "] ;1
[#rx"``" ""]))) ;2
(define lines (wrap-line (string-trim to-wrap) (- 72 (current-indent))))
(write-note)
(write-string (car lines))
(for ([line (in-list (cdr lines))])
(newline) (indent) (write-note) (write-string line))])
(newline)
null)
@ -193,6 +216,9 @@
(define (italic? i)
(and (element? i) (eq? (element-style i) 'italic)))
(define (emph? i)
(and (element? i) (eq? (element-style i) 'emph)))
(define (code? i)
(and (element? i)
(let ([s (element-style i)])
@ -230,12 +256,18 @@
[(and (code? i) (not (in-code?)))
(recurse-wrapped "`" in-code?)]
[(and (bold? i) (not (in-bold?)))
[(and (bold? i) (not (in-bold?)) (not (in-code?)))
(recurse-wrapped "**" in-bold?)]
[(and (italic? i) (not (in-italic?)))
[(and (italic? i) (not (in-italic?)) (not (in-code?)))
(recurse-wrapped "_" in-italic?)]
[(and (emph? i) (not (in-code?)))
(display "_") ;; zero-width space, underscore
(begin0
(super render-content i part ri)
(display "_"))] ;; underscore, zero-width space
[(and (preserve-spaces? i) (not (preserving-spaces?)))
(parameterize ([preserving-spaces? #t])
(render-content i part ri))]
@ -248,15 +280,45 @@
(render-content i part ri))
(printf "](~a)" (sanitize-parens link))))]
[(and (link-element? i)
(current-markdown-link-sections)
(not (in-link?))
;; Link to a part within this document?
(let ([vec (resolve-get part ri (link-element-tag i))])
(and (vector? vec)
(= 4 (vector-length vec))
(eq? markdown-part-tag (vector-ref vec 3))
vec)))
=> (lambda (vec)
(define s (string-append
(let ([s (if (vector-ref vec 2)
(format-number (vector-ref vec 2) '() #t)
'())])
(if (null? s)
""
(string-append (car s) " ")))
(content->string (vector-ref vec 0))))
(display "[")
(begin0
(parameterize ([in-link? #t])
(super render-content i part ri))
(display "](#")
(display (regexp-replace* #" "
(regexp-replace* #rx"[^a-zA-Z0-9_ -]" (string-downcase s) "")
#"-"))
(display ")")))]
[else (super render-content i part ri)]))
(define/override (render-nested-flow i part ri starting-item?)
(define s (nested-flow-style i))
(unless (memq 'decorative (style-properties s))
(define note? (equal? (style-name s) "refcontent"))
(define toc? (equal? (style-name s) 'table-of-contents))
(when note?
(note-depth (add1 (note-depth))))
(begin0 (super render-nested-flow i part ri starting-item?)
(begin0 (parameterize ([in-toc (or toc? (in-toc))])
(super render-nested-flow i part ri starting-item?))
(when note?
(note-depth (sub1 (note-depth)))))))
@ -270,8 +332,8 @@
[(rdquo) "\U201D"]
[(lsquo) "\U2018"]
[(rsquo) "\U2019"]
[(lang) ">"]
[(rang) "<"]
[(lang) "<"]
[(rang) ">"]
[(rarr) "->"]
[(nbsp) "\uA0"]
[(prime) "'"]
@ -280,10 +342,17 @@
[else (error 'markdown-render "unknown element symbol: ~e"
i)]))]
[(string? i)
(let* ([i (if (in-code?)
(regexp-replace** i '([#rx"``" . "\U201C"]
[#rx"''" . "\U201D"]))
(regexp-replace* #px"([#_*`\\[\\(\\]\\)]{1})" i "\\\\\\1"))]
(let* ([i (cond
[(in-code?)
(regexp-replace** i '([#rx"``" . "\U201C"]
[#rx"''" . "\U201D"]))]
[(or (in-link?)
(regexp-match? #rx"^[(]" i)
(regexp-match? #rx"[]][(]" i))
(regexp-replace* #px"([#_*`\\[\\(\\]\\)]{1})" i "\\\\\\1")]
[else
;; Avoid escaping parentheses
(regexp-replace* #px"([#_*`\\[\\]]{1})" i "\\\\\\1")])]
[i (if (preserving-spaces?)
(regexp-replace* #rx" " i "\uA0")
i)])
@ -291,6 +360,26 @@
[else (write i)])
null)
(define/override (table-of-contents part ri)
(define t (super table-of-contents part ri))
(cond
[(current-markdown-link-sections)
;; Table generated by `table-of-contents` always has one
;; column, and each row has one paragraph that starts
;; with a 'hspace element to indent
(nested-flow
(style 'table-of-contents null)
(for/list ([p (map car (table-blockss t))])
(define c (paragraph-content p))
(define keep-c (cdr c))
(define (spaces->depth n)
(add1 (quotient (- n 4) 2)))
(for/fold ([p (paragraph plain keep-c)]) ([s (in-range
(spaces->depth
(string-length (car (element-content (car c))))))])
(nested-flow (style "refcontent" null) (list p)))))]
[else t]))
(super-new)))
(define (regexp-replace** str ptns&reps)
@ -298,4 +387,3 @@
([ptn (map car ptns&reps)]
[rep (map cdr ptns&reps)])
(regexp-replace* ptn str rep)))

View File

@ -4,7 +4,7 @@
"../base.rkt"
(only-in "../basic.rkt" aux-elem itemize)
"../scheme.rkt"
(only-in "../core.rkt" make-style plain
(only-in "../core.rkt" content? make-style plain
make-nested-flow nested-flow? box-mode box-mode*
[element? core:element?])
"manual-utils.rkt"
@ -31,7 +31,7 @@
(provide-styling racketmodfont racketoutput
racketerror racketfont racketplainfont racketvalfont racketidfont racketvarfont
racketcommentfont racketparenfont racketkeywordfont racketmetafont
onscreen defterm filepath exec envvar Flag DFlag PFlag DPFlag math
onscreen defterm filepath envvar Flag DFlag PFlag DPFlag math
procedure
indexed-file indexed-envvar idefterm pidefterm)
(provide
@ -59,7 +59,8 @@
[inset-flow (() () #:rest (listof pre-content?) . ->* . nested-flow?)]
[litchar (() () #:rest (listof string?) . ->* . element?)]
[t (() () #:rest (listof pre-content?) . ->* . paragraph?)]
[commandline (() () #:rest (listof pre-content?) . ->* . paragraph?)]
[exec (() () #:rest (listof content?) . ->* . element?)]
[commandline (() () #:rest (listof content?) . ->* . paragraph?)]
[menuitem (string? string? . -> . element?)])
(define PLaneT (make-element "planetName" '("PLaneT")))

File diff suppressed because it is too large Load Diff

View File

@ -106,6 +106,8 @@
(current-style-file file)]
[("--prefix") file "use given .html/.tex prefix (for doctype/documentclass)"
(current-prefix-file file)]
[("--link-section") "support section links for markdown"
(markdown:current-markdown-link-sections #t)]
#:multi
[("++extra") file "add given file"
(current-extra-files (cons file (current-extra-files)))]

View File

@ -30,6 +30,26 @@
font-weight: bold;
}
/* Emphasis: alternate italics and normal as we nest */
.emph {
font-style: italic;
}
.emph .emph {
font-style: normal;
}
.emph .emph .emph {
font-style: italic;
}
.emph .emph .emph .emph {
font-style: normal;
}
.emph .emph .emph .emph .emph {
font-style: italic;
}
.emph .emph .emph .emph .emph .emph {
font-style: normal;
}
/* ---------------------------------------- */
p, .SIntrapara {

View File

@ -83,8 +83,8 @@
\newcommand{\textsuper}[1]{$^{\hbox{\textsmaller{#1}}}$}
\newcommand{\intextcolor}[2]{\textcolor{#1}{#2}}
\newcommand{\intextrgbcolor}[2]{\textcolor[rgb]{#1}{#2}}
\newcommand{\incolorbox}[2]{{\fboxrule=0pt\fboxsep=0pt\colorbox{#1}{#2}}}
\newcommand{\inrgbcolorbox}[2]{{\fboxrule=0pt\fboxsep=0pt\colorbox[rgb]{#1}{#2}}}
\newcommand{\incolorbox}[2]{{\fboxrule=0pt\fboxsep=0pt\protect\colorbox{#1}{#2}}}
\newcommand{\inrgbcolorbox}[2]{{\fboxrule=0pt\fboxsep=0pt\protect\colorbox[rgb]{#1}{#2}}}
\newcommand{\plainlink}[1]{#1}
\newcommand{\techoutside}[1]{#1}
\newcommand{\techinside}[1]{#1}
@ -112,7 +112,7 @@
\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\message{pltstabular is a modification of stabular}
%% A renamed vsetion of:
%% A renamed version of:
%% stabular.sty
%% Copyright 1998 Sigitas Tolu\v sis
%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
@ -372,7 +372,7 @@
% For hidden parts with an empty title:
\newcommand{\notitlesection}{\vspace{2ex}\phantomsection\noindent}
% To increments section numbers:
% To increment section numbers:
\newcommand{\Sincpart}{\stepcounter{part}}
\newcommand{\Sincsection}{\stepcounter{section}}
\newcommand{\Sincsubsection}{\stepcounter{subsection}}

View File

@ -1,142 +1,143 @@
(module search racket/base
(require "struct.rkt"
"basic.rkt"
syntax/modcode)
#lang racket/base
(provide find-racket-tag
(rename-out [find-racket-tag find-scheme-tag]))
(require "struct.rkt"
"basic.rkt"
syntax/modcode)
(define module-info-cache (make-hasheq))
(provide find-racket-tag
(rename-out [find-racket-tag find-scheme-tag]))
(define (module-path-index-rejoin mpi rel-to)
(let-values ([(name base) (module-path-index-split mpi)])
(cond
[(not name) rel-to]
[(not base) mpi]
[else
(module-path-index-join name
(module-path-index-rejoin base rel-to))])))
(define module-info-cache (make-hasheq))
(define (try thunk fail-thunk)
(with-handlers* ([exn:fail? (lambda (exn) (fail-thunk))])
(thunk)))
(define (module-path-index-rejoin mpi rel-to)
(let-values ([(name base) (module-path-index-split mpi)])
(cond
[(not name) rel-to]
[(not base) mpi]
[else
(module-path-index-join name
(module-path-index-rejoin base rel-to))])))
(define (find-racket-tag part ri stx/binding phase-level)
;; The phase-level argument is used only when `stx/binding'
;; is an identifier.
;;
;; Note: documentation keys currently don't distinguish different
;; phase definitions of an identifier from a source module.
;; That is, there's no way to document (define x ....) differently
;; from (define-for-syntax x ...). This isn't a problem in practice,
;; because no one uses the same name for different-phase exported
;; bindings.
;;
;; Formerly, we assumed that bindings are defined as originating from some
;; module at phase 0. [Maybe it's defined at phase 1 and re-exported
;; later for phase 0 (after a require-for-template), in which case the
;; re-exporting module is the one we find.] That assumption has been
;; lifted, however; search for "GONE" below.
(let ([b (cond
[(identifier? stx/binding)
(identifier-binding stx/binding phase-level)]
[(and (list? stx/binding)
(= 7 (length stx/binding)))
stx/binding]
[else
(and (not (symbol? (car stx/binding)))
(list #f
(cadr stx/binding)
(car stx/binding)
(cadr stx/binding)
(if (= 2 (length stx/binding))
0
(caddr stx/binding))
(if (= 2 (length stx/binding))
0
(cadddr stx/binding))
(if (= 2 (length stx/binding))
0
(cadddr (cdr stx/binding)))))])])
(and
(pair? b)
(let ([seen (make-hash)]
[search-key #f])
(let loop ([queue (list (list (caddr b) (cadddr b) (list-ref b 4) (list-ref b 5) (list-ref b 6)))]
[rqueue null]
[need-result? #t])
(cond
[(null? queue)
(if (null? rqueue)
;; Not documented
#f
(loop (reverse rqueue) null need-result?))]
[else
(let ([mod (list-ref (car queue) 0)]
[id (list-ref (car queue) 1)]
[defn-phase (list-ref (car queue) 2)]
[import-phase (list-ref (car queue) 3)]
[export-phase (list-ref (car queue) 4)]
[queue (cdr queue)])
(let* ([rmp (module-path-index-resolve mod)]
[eb (and ;; GONE: (equal? 0 export-phase) ;; look for the phase-0 export; good idea?
(list (module-path-index->taglet mod)
id))])
(when (and eb
(not search-key))
(set! search-key eb))
(let ([v (and eb (resolve-search search-key part ri `(dep ,eb)))])
(let* ([here-result
(and need-result?
v
(let ([v (resolve-get/tentative part ri `(form ,eb))])
(or (and v `(form ,eb))
`(def ,eb))))]
[need-result? (and need-result? (not here-result))]
[rmp-name (resolved-module-path-name rmp)])
;; Even if we've found `here-result', look deeper so that we have
;; consistent `dep' results.
(let ([nest-result
;; Maybe it's re-exported from this module...
;; Try a shortcut:
(if (eq? rmp (and (car b) (module-path-index-resolve (car b))))
;; Not defined through this path, so keep looking
(loop queue rqueue need-result?)
;; Check parents, if we can get the source:
(if (and (or (path? rmp-name)
(and (list? rmp-name)
(path? (car rmp-name))))
(not (hash-ref seen (cons export-phase rmp) #f)))
(let ([exports
(hash-ref
module-info-cache
rmp
(lambda ()
(let-values ([(valss stxess)
(try
(lambda ()
;; First, try using bytecode:
(module-compiled-exports
(get-module-code (if (list? rmp-name)
(car rmp-name)
rmp-name)
#:submodule-path (if (list? rmp-name)
(cdr rmp-name)
'())
#:choose (lambda (src zo so) 'zo))))
(lambda ()
(try
(lambda ()
;; Bytecode not available. Declaration in the
;; current namespace?
(module->exports rmp))
(lambda ()
(values null null)))))])
(let ([t
;; Merge the two association lists:
(let loop ([base valss]
[stxess stxess])
(cond
(define (try thunk fail-thunk)
(with-handlers* ([exn:fail? (lambda (exn) (fail-thunk))])
(thunk)))
(define (find-racket-tag part ri stx/binding phase-level)
;; The phase-level argument is used only when `stx/binding'
;; is an identifier.
;;
;; Note: documentation keys currently don't distinguish different
;; phase definitions of an identifier from a source module.
;; That is, there's no way to document (define x ....) differently
;; from (define-for-syntax x ...). This isn't a problem in practice,
;; because no one uses the same name for different-phase exported
;; bindings.
;;
;; Formerly, we assumed that bindings are defined as originating from some
;; module at phase 0. [Maybe it's defined at phase 1 and re-exported
;; later for phase 0 (after a require-for-template), in which case the
;; re-exporting module is the one we find.] That assumption has been
;; lifted, however; search for "GONE" below.
(let ([b (cond
[(identifier? stx/binding)
(identifier-binding stx/binding phase-level)]
[(and (list? stx/binding)
(= 7 (length stx/binding)))
stx/binding]
[else
(and (not (symbol? (car stx/binding)))
(list #f
(cadr stx/binding)
(car stx/binding)
(cadr stx/binding)
(if (= 2 (length stx/binding))
0
(caddr stx/binding))
(if (= 2 (length stx/binding))
0
(cadddr stx/binding))
(if (= 2 (length stx/binding))
0
(cadddr (cdr stx/binding)))))])])
(and
(pair? b)
(let ([seen (make-hash)]
[search-key #f])
(let loop ([queue (list (list (caddr b) (cadddr b) (list-ref b 4) (list-ref b 5) (list-ref b 6)))]
[rqueue null]
[need-result? #t])
(cond
[(null? queue)
(if (null? rqueue)
;; Not documented
#f
(loop (reverse rqueue) null need-result?))]
[else
(let ([mod (list-ref (car queue) 0)]
[id (list-ref (car queue) 1)]
[defn-phase (list-ref (car queue) 2)]
[import-phase (list-ref (car queue) 3)]
[export-phase (list-ref (car queue) 4)]
[queue (cdr queue)])
(let* ([rmp (module-path-index-resolve mod)]
[eb (and ;; GONE: (equal? 0 export-phase) ;; look for the phase-0 export; good idea?
(list (module-path-index->taglet mod)
id))])
(when (and eb
(not search-key))
(set! search-key eb))
(let ([v (and eb (resolve-search search-key part ri `(dep ,eb)))])
(let* ([here-result
(and need-result?
v
(let ([v (resolve-get/tentative part ri `(form ,eb))])
(or (and v `(form ,eb))
`(def ,eb))))]
[need-result? (and need-result? (not here-result))]
[rmp-name (resolved-module-path-name rmp)])
;; Even if we've found `here-result', look deeper so that we have
;; consistent `dep' results.
(let ([nest-result
;; Maybe it's re-exported from this module...
;; Try a shortcut:
(if (eq? rmp (and (car b) (module-path-index-resolve (car b))))
;; Not defined through this path, so keep looking
(loop queue rqueue need-result?)
;; Check parents, if we can get the source:
(if (and (or (path? rmp-name)
(and (list? rmp-name)
(path? (car rmp-name))))
(not (hash-ref seen (cons export-phase rmp) #f)))
(let ([exports
(hash-ref
module-info-cache
rmp
(lambda ()
(let-values ([(valss stxess)
(try
(lambda ()
;; First, try using bytecode:
(module-compiled-exports
(get-module-code (if (list? rmp-name)
(car rmp-name)
rmp-name)
#:submodule-path (if (list? rmp-name)
(cdr rmp-name)
'())
#:choose (lambda (src zo so) 'zo))))
(lambda ()
(try
(lambda ()
;; Bytecode not available. Declaration in the
;; current namespace?
(module->exports rmp))
(lambda ()
(values null null)))))])
(let ([t
;; Merge the two association lists:
(let loop ([base valss]
[stxess stxess])
(cond
[(null? stxess) base]
[(assoc (caar stxess) base)
=> (lambda (l)
@ -148,40 +149,40 @@
[else (loop (cons (car stxess)
base)
(cdr stxess))]))])
(hash-set! module-info-cache rmp t)
t))))])
(hash-set! seen (cons export-phase rmp) #t)
(let ([a (assq id (let ([a (assoc export-phase exports)])
(if a
(cdr a)
null)))])
(if a
(loop queue
(append (map (lambda (m)
(if (pair? m)
(list (module-path-index-rejoin (car m) mod)
(list-ref m 2)
defn-phase
(list-ref m 1)
(list-ref m 3))
(list (module-path-index-rejoin m mod)
id
defn-phase
import-phase
export-phase)))
(reverse (cadr a)))
rqueue)
need-result?)
(begin
;; A dead end may not be our fault: the files could
;; have changed in inconsistent ways. So just say #f
;; for now.
#;
(error 'find-racket-tag
"dead end when looking for binding source: ~e"
id)
(loop queue rqueue need-result?)))))
;; Can't get the module source, so continue with queue:
(loop queue rqueue need-result?)))])
(or here-result
nest-result))))))])))))))
(hash-set! module-info-cache rmp t)
t))))])
(hash-set! seen (cons export-phase rmp) #t)
(let ([a (assq id (let ([a (assoc export-phase exports)])
(if a
(cdr a)
null)))])
(if a
(loop queue
(append (map (lambda (m)
(if (pair? m)
(list (module-path-index-rejoin (car m) mod)
(list-ref m 2)
defn-phase
(list-ref m 1)
(list-ref m 3))
(list (module-path-index-rejoin m mod)
id
defn-phase
import-phase
export-phase)))
(reverse (cadr a)))
rqueue)
need-result?)
(begin
;; A dead end may not be our fault: the files could
;; have changed in inconsistent ways. So just say #f
;; for now.
#;
(error 'find-racket-tag
"dead end when looking for binding source: ~e"
id)
(loop queue rqueue need-result?)))))
;; Can't get the module source, so continue with queue:
(loop queue rqueue need-result?)))])
(or here-result
nest-result))))))]))))))

View File

@ -621,7 +621,7 @@
(define (authors name . names*)
(define names (map parse-author (cons name names*)))
(define slash-names (string-join (map author-element-names names) " / "))
(define slash-names (string-join (map (compose1 content->string author-element-names) names) " / "))
(define cite
(case (length names)
[(1) (author-element-cite (car names))]

View File

@ -1,11 +0,0 @@
scribble-test
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

View File

@ -55,7 +55,6 @@
(check-equal? (book-location #:edition "4th")
(mk-bookloc-elem/ed "4th")))
(test-case "techrpt-location"
(check-not-exn
(λ () (techrpt-location #:institution "MIT" #:number 'AIM-353)))
@ -71,3 +70,31 @@
(λ () (dissertation-location #:institution "Georgetown University" #:degree "BS")))
(check-exn exn:fail:contract?
(λ () (dissertation-location #:degree "PhD"))))
(test-case "authors"
;; Define authors, make a bibliography
;; https://github.com/racket/scribble/issues/216
(check-not-exn
(lambda ()
(define-cite cite citet gen-bib)
(define x*
(map
cite
(list
(make-bib
#:title "Histoire d'une Montagne"
#:author (authors "Elisée Reclus"))
(make-bib
#:title "The Jeffersonians"
#:author (authors "Richard B. Morris" "James Leslie Woods"))
(make-bib
#:title "Lucifer Magazine"
#:author (authors "H.P. Blavatsky" (other-authors)))
(make-bib
#:title "Dean's Electronics"
#:author (authors (org-author-name "robco") (org-author-name (authors "industries"))
(editor "mister") (editor (authors "crowley"))
(other-authors))))))
(gen-bib))))

View File

@ -1,11 +0,0 @@
scribble-text-lib
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

View File

@ -1,11 +0,0 @@
scribble
Copyright (c) 2010-2014 PLT Design Inc.
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link this package into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.