From d9e0462393f12db9f011949cd84c44b86b92db17 Mon Sep 17 00:00:00 2001 From: Leif Andersen Date: Wed, 12 Sep 2018 22:03:04 -0400 Subject: [PATCH] Add an identifier for acmart's nonacm flag. (#181) * Add an identifier for acmart's nonacm flag. * Add defidform of nonacm to docs. * Add the rest of the missing flags * Forgot one more line. --- .../scribblings/scribble/acmart.scrbl | 7 ++- scribble-lib/scribble/acmart/lang.rkt | 50 +++++++++++++++++-- 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/scribble-doc/scribblings/scribble/acmart.scrbl b/scribble-doc/scribblings/scribble/acmart.scrbl index da4cef12..657af313 100644 --- a/scribble-doc/scribblings/scribble/acmart.scrbl +++ b/scribble-doc/scribblings/scribble/acmart.scrbl @@ -58,6 +58,10 @@ all mutually exclusive.} @defidform[natbib] @defidform[anonymous] @defidform[authorversion] +@defidform[nonacm] +@defidform[timestamp] +@defidform[authordraft] +@defidform[acmthm] @defidform[9pt] @defidform[10pt] @defidform[11pt] @@ -101,7 +105,6 @@ Veytsman) provides these defaults and descriptions: for the authors’ personal use or posting") ;; these options are documented in ACM docs but don't ;; appear to exist in the scribble acmart format: - #;( (list "nonacm" "false" "Use the class typesetting options for a non-ACM\ document, which will not include the conference/journal\ @@ -112,7 +115,7 @@ Veytsman) provides these defaults and descriptions: (list "authordraft" "false" "Whether author’s-draft mode is enabled") (list "acmthm" "true" - "Whether to define theorem-like environments")))] + "Whether to define theorem-like environments"))] Further details for some of these are provided by the full documentation for the acmart LaTeX class. diff --git a/scribble-lib/scribble/acmart/lang.rkt b/scribble-lib/scribble/acmart/lang.rkt index 80708a12..743f51a3 100644 --- a/scribble-lib/scribble/acmart/lang.rkt +++ b/scribble-lib/scribble/acmart/lang.rkt @@ -22,12 +22,17 @@ [natbib? #f] [anonymous? #f] [authorversion? #f] - [font-size #f]) + [font-size #f] + [nonacm? #f] + [timestamp? #f] + [author-draft? #f] + [acmthm? #f]) (let loop ([stuff #'body]) (syntax-parse stuff #:datum-literals (manuscript acmsmall acmlarge acmtog sigconf siggraph sigplan sigchi sigchi-a dtrap pacmcgit tiot tdsci review screen natbib - anonymous authorversion 9pt 10pt 11pt 12pt) + anonymous authorversion 9pt 10pt 11pt 12pt nonacm timestamp + authordraft acmthm) ;; Skip intraline whitespace to find options: [(ws . body) @@ -94,7 +99,42 @@ [(12pt . body) (set! font-size "12pt") (loop #'body)] - + [((nonacm #t) . body) + (set! nonacm? "nonacm=true") + (loop #'body)] + [((nonacm #f) . body) + (set! nonacm? "nonacm=false") + (loop #'body)] + [(nonacm . body) + (set! nonacm? "nonacm=true") + (loop #'body)] + [(timestamp . body) + (set! timestamp? "timestamp=true") + (loop #'body)] + [((timestamp #t) . body) + (set! timestamp? "timestamp=true") + (loop #'body)] + [((timestamp #f) . body) + (set! timestamp? "timestamp=false") + (loop #'body)] + [(authordraft . body) + (set! author-draft? "authordraft=true") + (loop #'body)] + [((authordraft #t) . body) + (set! author-draft? "authordraft=true") + (loop #'body)] + [((authordraft #f) . body) + (set! author-draft? "authordraft=false") + (loop #'body)] + [(acmthm . body) + (set! acmthm? "acmthm=true") + (loop #'body)] + [((acmthm #t) . body) + (set! acmthm? "acmthm=true") + (loop #'body)] + [((acmthm #f) . body) + (set! acmthm? "acmthm=false") + (loop #'body)] ; format options [((~and fmt @@ -116,7 +156,9 @@ (loop #'body)] [body - #`(#%module-begin id (post-process #,review? #,screen? #,natbib? #,anonymous? #,authorversion? #,font-size #,format?) () . body)])))])) + #`(#%module-begin id (post-process #,review? #,screen? #,natbib? #,anonymous? + #,authorversion? #,font-size #,nonacm? #,timestamp? + #,author-draft? #,acmthm? #,format?) () . body)])))])) (define ((post-process . opts) doc) (let ([options