Skip to content
113 changes: 50 additions & 63 deletions scribble-lib/scribble/acmart.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -28,68 +28,55 @@
#:name author-institution
#:transparent)

(provide/contract
[title (->* ()
(#:short pre-content?
#:tag (or/c string? (listof string?) #f)
#:tag-prefix (or/c string? module-path? #f)
#:style (or/c style? string? symbol? #f)
#:version (or/c string? #f)
#:date (or/c string? #f))
#:rest (listof pre-content?)
title-decl?)]
[author (->* ()
(#:orcid (or/c pre-content? #f)
#:affiliation (or/c pre-content?
affiliation?
(listof affiliation?)
#f)
#:email (or/c pre-content? email? (listof email?)))
#:rest (listof pre-content?)
block?)]
[authorsaddresses (->* ()
()
#:rest (listof pre-content?)
block?)]
[shortauthors (->* ()
()
#:rest (listof pre-content?)
element?)]
[institution (->* ()
(#:departments (listof (or/c pre-content? institution?)))
#:rest pre-content?
institution?)]
[institution? (-> any/c boolean?)]
[email (-> pre-content? ... email?)]
[email-string (-> string? ... email?)]
[email? (-> any/c boolean?)]
[affiliation (->* ()
(#:position (or/c pre-content? #f)
#:institution (or/c pre-content? institution? (listof institution?) #f)
#:street-address (or/c pre-content? #f)
#:city (or/c pre-content? #f)
#:state (or/c pre-content? #f)
#:postcode (or/c pre-content? #f)
#:country (or/c pre-content? #f))
affiliation?)]
[affiliation? (-> any/c boolean?)]
[abstract
(->* () () #:rest (listof pre-content?)
block?)]
[acmConference
(-> string? string? string? block?)]
[grantsponsor
(-> string? string? string? content?)]
[grantnum
(->* (string? string?) (#:url string?) content?)]
[acmBadgeR (->* (string?) (#:url string?) block?)]
[acmBadgeL (->* (string?) (#:url string?) block?)]
[received (->* (string?) (#:stage string?) block?)]
[citestyle (-> content? block?)]
[ccsdesc (->* (string?) (#:number exact-integer?) block?)]
[CCSXML
(->* () () #:rest (listof pre-content?)
any/c)])
(provide (contract-out [title
(->* ()
(#:short pre-content?
#:tag (or/c string? (listof string?) #f)
#:tag-prefix (or/c string? module-path? #f)
#:style (or/c style? string? symbol? #f)
#:version (or/c string? #f)
#:date (or/c string? #f))
#:rest (listof pre-content?)
title-decl?)]
[author
(->* ()
(#:orcid (or/c pre-content? #f)
#:affiliation (or/c pre-content? affiliation? (listof affiliation?) #f)
#:email (or/c pre-content? email? (listof email?)))
#:rest (listof pre-content?)
block?)]
[authorsaddresses (->* () () #:rest (listof pre-content?) block?)]
[shortauthors (->* () () #:rest (listof pre-content?) element?)]
[institution
(->* ()
(#:departments (listof (or/c pre-content? institution?)))
#:rest pre-content?
institution?)]
[institution? (-> any/c boolean?)]
[email (-> pre-content? ... email?)]
[email-string (-> string? ... email?)]
[email? (-> any/c boolean?)]
[affiliation
(->* ()
(#:position (or/c pre-content? #f)
#:institution (or/c pre-content? institution? (listof institution?) #f)
#:street-address (or/c pre-content? #f)
#:city (or/c pre-content? #f)
#:state (or/c pre-content? #f)
#:postcode (or/c pre-content? #f)
#:country (or/c pre-content? #f))
affiliation?)]
[affiliation? (-> any/c boolean?)]
[abstract (->* () () #:rest (listof pre-content?) block?)]
[acmConference (-> string? string? string? block?)]
[grantsponsor (-> string? string? string? content?)]
[grantnum (->* (string? string?) (#:url string?) content?)]
[acmBadgeR (->* (string?) (#:url string?) block?)]
[acmBadgeL (->* (string?) (#:url string?) block?)]
[received (->* (string?) (#:stage string?) block?)]
[citestyle (-> content? block?)]
[ccsdesc (->* (string?) (#:number exact-integer?) block?)]
[CCSXML (->* () () #:rest (listof pre-content?) any/c)]))
(provide
invisible-element-to-collect-for-acmart-extras
include-abstract)
Expand Down Expand Up @@ -335,7 +322,7 @@
(decode-content name))]
[else (make-element (make-style "department"
(append
(if (> level 0)
(if (positive? level)
(list (command-optional (list (number->string level))))
(list))
command-props))
Expand Down
5 changes: 2 additions & 3 deletions scribble-lib/scribble/bnf.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@
[(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))])
(for/list ([i (in-list more-rhs)])
(list (as-flow spacer) (as-flow " ") (as-flow alt) (as-flow i))))])
defns))))

;; interleave : (listof content?) element? -> element?
Expand Down
Loading