From 51c1c2ed474df586b98585860c844040b613cf45 Mon Sep 17 00:00:00 2001 From: Leif Andersen Date: Wed, 10 Apr 2019 13:14:07 -0400 Subject: [PATCH 1/8] Minor typo: each expression is are duplicated -> each expression is duplicated --- scribble-doc/scribblings/scribble/manual.scrbl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scribble-doc/scribblings/scribble/manual.scrbl b/scribble-doc/scribblings/scribble/manual.scrbl index 41ada18e..b18e7faa 100644 --- a/scribble-doc/scribblings/scribble/manual.scrbl +++ b/scribble-doc/scribblings/scribble/manual.scrbl @@ -1,4 +1,4 @@ -#lang scribble/doc +s are #lang scribble/doc @(require scribble/manual "utils.rkt" (for-syntax racket/base) (for-label scribble/manual-struct @@ -686,7 +686,7 @@ specified explicitly with @racket[#:packages]. Each @racket[pkg-expr] result is passed on to a function like @racket[tt] for typesetting. Provide an empty sequence after @racket[#:packages] to suppress any package name in the output. Each @racket[pkg-expr] -expression is are duplicated for a @racket[declare-exporting] form, +expression is duplicated for a @racket[declare-exporting] form, unless @racket[#:no-declare] is specified. Each @racket[option] form can appear at most once, and @racket[#:lang] From 0905c3d6a357410494aeb1bb362db809feb65d59 Mon Sep 17 00:00:00 2001 From: Leif Andersen Date: Wed, 10 Apr 2019 13:17:51 -0400 Subject: [PATCH 2/8] Line 1 got messed up during the commit, reverting. --- scribble-doc/scribblings/scribble/manual.scrbl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scribble-doc/scribblings/scribble/manual.scrbl b/scribble-doc/scribblings/scribble/manual.scrbl index b18e7faa..a1bffa2b 100644 --- a/scribble-doc/scribblings/scribble/manual.scrbl +++ b/scribble-doc/scribblings/scribble/manual.scrbl @@ -1,4 +1,4 @@ -s are #lang scribble/doc +#lang scribble/doc @(require scribble/manual "utils.rkt" (for-syntax racket/base) (for-label scribble/manual-struct From 441e97ec274a3c815e940344cc095fcdbb11743d Mon Sep 17 00:00:00 2001 From: Ben Greenman Date: Wed, 1 May 2019 23:34:52 -0400 Subject: [PATCH 3/8] doc: use 'scribble/acmart' as Getting Started example (#193) Chagne the Getting Started guide to suggest `scribble/acmart` instead of `scribble/sigplan` for a PL workshop paper. --- .../scribblings/scribble/how-to-paper.scrbl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scribble-doc/scribblings/scribble/how-to-paper.scrbl b/scribble-doc/scribblings/scribble/how-to-paper.scrbl index e6d6bfcc..0704c3b1 100644 --- a/scribble-doc/scribblings/scribble/how-to-paper.scrbl +++ b/scribble-doc/scribblings/scribble/how-to-paper.scrbl @@ -1,7 +1,7 @@ #lang scribble/doc @(require scribble/manual scribble/bnf "utils.rkt" pict - (for-label scriblib/figure scribble/base scribble/sigplan + (for-label scriblib/figure scribble/base (only-in scribble/acmart abstract) (except-in pict table))) @(define-syntax-rule (samplemod . text) (codeblock . text)) @@ -176,7 +176,7 @@ probably need a different topic. But you can start making the current content look right by changing the first line to @samplemod|{ - #lang scribble/sigplan + #lang scribble/acmart }| If you're instead working toward Racket library documentation, @@ -192,15 +192,15 @@ top-level sections turned into chapters that each start on a new page. If you have split the document into multiple files, the first line of the main document file determines the output format. -Using @racketmodname[scribble/sigplan] or +Using @racketmodname[scribble/acmart] or @racketmodname[scribble/manual] does not change the rendered HTML for a document---aside from @racketmodname[scribble/manual] adding a version number---but it changes the set of bindings available in the -document body. For example, with @racketmodname[scribble/sigplan], the +document body. For example, with @racketmodname[scribble/acmart], the introductory text can be marked as an abstract: @samplemod|{ - #lang scribble/sigplan + #lang scribble/acmart @title{On the Cookie-Eating Habits of Mice} @@ -221,7 +221,7 @@ When a document is implemented across multiple files, changing the language of the main document can set the style for all of the parts, but it does not introduce bindings into the other part files. For example, if you change the language of @filepath{mouse.scrbl} to -@racketmodname[scribble/sigplan], then @racket[abstract] becomes +@racketmodname[scribble/acmart], then @racket[abstract] becomes available in @filepath{mouse.scrbl} but not in @filepath{milk.scrbl} or @filepath{straw.scrbl}. In other words, operator names are lexically scoped. @@ -230,7 +230,7 @@ lexically scoped. @section{More Functions} The @racketmodname[scribble/base] language provides a collection of -basic operations (and The @racketmodname[scribble/sigplan] and +basic operations (both @racketmodname[scribble/acmart] and @racketmodname[scribble/manual] are supersets of @racketmodname[scribble/base]). Many of the operations are style variations that you can apply to text: @@ -573,7 +573,7 @@ and @litchar{'} to suitable curly quotes. The decoding process for document's stream is ultimately determined by the @hash-lang[] line that starts the document. The @racketmodname[scribble/base], @racketmodname[scribble/manual], and -@racketmodname[scribble/sigplan] languages all use the same +@racketmodname[scribble/acmart] languages all use the same @racket[decode] operation. The @racketmodname[scribble/text] language, however, acts more like a plain-text generator and preprocessor, and it does not perform any such decoding rules. (For more on From 7635f21788b978beb1614e993968278003e73afb Mon Sep 17 00:00:00 2001 From: Ben Greenman Date: Wed, 1 May 2019 23:35:18 -0400 Subject: [PATCH 4/8] search box: change '"s" for search' behavior (#202) 1. Focus on the search box for either "s" or "S" ... accepting only "s" makes sense to me, but the comment said it accepted "S" and well why not 2. Look for a "keyup" event instead of key press, so that pressing "s" ONLY focuses on the box and does not focus-and-write-the-letter-"s" "keyup" events apparently don't have a useful `charCode` field so this PR looks at the `keyCode` field instead --- scribble-lib/scribble/scribble-common.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scribble-lib/scribble/scribble-common.js b/scribble-lib/scribble/scribble-common.js index 976298e6..dd3c23c4 100644 --- a/scribble-lib/scribble/scribble-common.js +++ b/scribble-lib/scribble/scribble-common.js @@ -169,10 +169,10 @@ AddOnLoad(function(){ indicator.style.display = "block"; }); -// Pressing "S" focuses on the "...search manuals..." text field +// Pressing "S" or "s" focuses on the "...search manuals..." text field AddOnLoad(function(){ - window.addEventListener("keypress", function(event) { - if (event && event.charCode == 115 && event.target == document.body) { + window.addEventListener("keyup", function(event) { + if (event && (event.keyCode == 83 || event.keyCode == 115) && event.target == document.body) { var field = document.getElementsByClassName("searchbox")[0]; field.focus(); } From dce36bfc1857c57a3a52a0ccdf92e280ca2fee1b Mon Sep 17 00:00:00 2001 From: mlemmer Date: Wed, 1 May 2019 23:36:11 -0400 Subject: [PATCH 5/8] Add book-chapter-location to autobib (#182) --- .../scriblib/scribblings/autobib.scrbl | 11 +++++++++ scribble-lib/scriblib/autobib.rkt | 23 +++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/scribble-doc/scriblib/scribblings/autobib.scrbl b/scribble-doc/scriblib/scribblings/autobib.scrbl index d9f6f5c4..b63076cc 100644 --- a/scribble-doc/scriblib/scribblings/autobib.scrbl +++ b/scribble-doc/scriblib/scribblings/autobib.scrbl @@ -236,6 +236,17 @@ Combines elements to generate an element that is suitable for describing a dissertation.} +@defproc[(book-chapter-location [title any/c] + [#:pages pages (or (list/c any/c any/c) #f) #f] + [#:section section any/c #f] + [#:volume volume any/c #f] + [#:publisher publisher any/c #f]) + element?]{ + +Combines elements to generate an element that is suitable for +describing a paper's location within a chapter or part of a book.} + + @defproc[(author-name [first any/c] [last any/c] [#:suffix suffix any/c #f]) diff --git a/scribble-lib/scriblib/autobib.rkt b/scribble-lib/scriblib/autobib.rkt index dc812f3b..8fa4c44b 100644 --- a/scribble-lib/scriblib/autobib.rkt +++ b/scribble-lib/scriblib/autobib.rkt @@ -29,6 +29,8 @@ (-> #:institution any/c #:number any/c element?)] [dissertation-location (->* [#:institution any/c] [#:degree any/c] element?)]) + [book-chapter-location + (->* [any/c] [#:pages (or/c (list/c any/c any/c) #f) #:section any/c #:volume any/c #:publisher any/c] element?)] other-authors editor abbreviate-given-names) @@ -563,6 +565,27 @@ #:degree [degree "PhD"]) @elem{@to-string[degree] dissertation, @to-string[org]}) +(define (book-chapter-location + location + #:pages [pages #f] + #:series [series #f] + #:volume [volume #f] + #:publisher [publisher #f]) + (let* ([s @elem{In @italic{@elem{@|location|}}}] + [s (if series + @elem{@|s|, @(format "~a" series)} + s)] + [s (if volume + @elem{@|s| volume @(format "~a" volume)} + s)] + [s (if pages + @elem{@|s|, pp. @(to-string (car pages))--@(to-string (cadr pages))} + s)] + [s (if publisher + @elem{@|s| @(format "~a" publisher)} + s)]) + s)) + ;; ---------------------------------------- (define (author-name first last #:suffix [suffix #f]) From 4a88753757201c030f3db4c939280bf7f5b59fb9 Mon Sep 17 00:00:00 2001 From: Ben Greenman Date: Thu, 2 May 2019 00:05:55 -0400 Subject: [PATCH 6/8] autobib: book-chapter fixes - move `)` for contract-out - fix keyword in contract - add `to-string` uses --- scribble-lib/scriblib/autobib.rkt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scribble-lib/scriblib/autobib.rkt b/scribble-lib/scriblib/autobib.rkt index 8fa4c44b..ea23af09 100644 --- a/scribble-lib/scriblib/autobib.rkt +++ b/scribble-lib/scriblib/autobib.rkt @@ -28,9 +28,9 @@ [techrpt-location (-> #:institution any/c #:number any/c element?)] [dissertation-location - (->* [#:institution any/c] [#:degree any/c] element?)]) + (->* [#:institution any/c] [#:degree any/c] element?)] [book-chapter-location - (->* [any/c] [#:pages (or/c (list/c any/c any/c) #f) #:section any/c #:volume any/c #:publisher any/c] element?)] + (->* [any/c] [#:pages (or/c (list/c any/c any/c) #f) #:series any/c #:volume any/c #:publisher any/c] element?)]) other-authors editor abbreviate-given-names) @@ -571,18 +571,18 @@ #:series [series #f] #:volume [volume #f] #:publisher [publisher #f]) - (let* ([s @elem{In @italic{@elem{@|location|}}}] + (let* ([s @elem{In @italic{@elem{@to-string[location]}}}] [s (if series - @elem{@|s|, @(format "~a" series)} + @elem{@|s|, @to-string[series]} s)] [s (if volume - @elem{@|s| volume @(format "~a" volume)} + @elem{@|s| volume @to-string[volume]} s)] [s (if pages @elem{@|s|, pp. @(to-string (car pages))--@(to-string (cadr pages))} s)] [s (if publisher - @elem{@|s| @(format "~a" publisher)} + @elem{@|s| @to-string[publisher]} s)]) s)) From 7e2bce57ad2708ccd7823616b0f39bd6b888098f Mon Sep 17 00:00:00 2001 From: Ilnar Salimzianov Date: Mon, 25 Mar 2019 13:56:21 +0300 Subject: [PATCH 7/8] Add https://blog.racket-lang.org/2012/06/submodules.html as an example for in-source documentation I couldn't locate gif.rkt in the `file' collection. See a complete working example was helpful to get started. I think it will be as useful for other Racketeers .(especially beginners like myself). If gif.rkt is indeed gone due to refactorings, I guess the reference to it should removed. --- scribble-doc/scribblings/scribble/srcdoc.scrbl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scribble-doc/scribblings/scribble/srcdoc.scrbl b/scribble-doc/scribblings/scribble/srcdoc.scrbl index 1e24a5d9..f8984f11 100644 --- a/scribble-doc/scribblings/scribble/srcdoc.scrbl +++ b/scribble-doc/scribblings/scribble/srcdoc.scrbl @@ -26,7 +26,9 @@ same way that the module system keeps expansion-time code separate from run-time code, and documentation information is recorded in a submodule to be separately loadable from the enclosing module. -For an example use, see the @filepath{file} collection's +For an example use, see +@hyperlink["https://blog.racket-lang.org/2012/06/submodules.html"]{this} +post at @tt{blog.racket-lang.org} or the @filepath{file} collection's @filepath{gif.rkt} source file and the corresponding extraction in @filepath{scribblings/gif.scrbl}. As that example illustrates, starting the module declaration with From 77b26d736ace7d2abd211c6ba590c58dea7a8459 Mon Sep 17 00:00:00 2001 From: Ben Greenman Date: Wed, 5 Jun 2019 17:18:06 -0400 Subject: [PATCH 8/8] doc: remove srcdoc reference to 'gif.rkt' --- scribble-doc/scribblings/scribble/srcdoc.scrbl | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/scribble-doc/scribblings/scribble/srcdoc.scrbl b/scribble-doc/scribblings/scribble/srcdoc.scrbl index f8984f11..7402f32e 100644 --- a/scribble-doc/scribblings/scribble/srcdoc.scrbl +++ b/scribble-doc/scribblings/scribble/srcdoc.scrbl @@ -27,18 +27,9 @@ from run-time code, and documentation information is recorded in a submodule to be separately loadable from the enclosing module. For an example use, see -@hyperlink["https://blog.racket-lang.org/2012/06/submodules.html"]{this} -post at @tt{blog.racket-lang.org} or the @filepath{file} collection's -@filepath{gif.rkt} source file and the corresponding extraction in -@filepath{scribblings/gif.scrbl}. As that example illustrates, -starting the module declaration with +@hyperlink["https://blog.racket-lang.org/2012/06/submodules.html"]{this post} +at @url{blog.racket-lang.org}. -@racketblock[ - @#,hash-lang[] @#,racketmodname[at-exp] -] - -enables the @"@"-reader, which is handy for writing documentation -expressions. @; ----------------------------------------