Add @onecolumn option to scribble/sigplan
original commit: 2dbbd1b58e558b029a170258f944d61a253573c3
This commit is contained in:
parent
2af3c0c8b7
commit
1f37c2230a
|
@ -35,7 +35,7 @@
|
||||||
(->* () () #:rest (listof pre-content?)
|
(->* () () #:rest (listof pre-content?)
|
||||||
content?)])
|
content?)])
|
||||||
|
|
||||||
(provide preprint 10pt nocopyright
|
(provide preprint 10pt nocopyright onecolumn
|
||||||
include-abstract)
|
include-abstract)
|
||||||
|
|
||||||
(define-syntax-rule (defopts name ...)
|
(define-syntax-rule (defopts name ...)
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
stx))
|
stx))
|
||||||
...
|
...
|
||||||
(provide name ...)))
|
(provide name ...)))
|
||||||
(defopts preprint 10pt nocopyright)
|
(defopts preprint 10pt nocopyright onecolumn)
|
||||||
|
|
||||||
(define sigplan-extras
|
(define sigplan-extras
|
||||||
(let ([abs (lambda (s)
|
(let ([abs (lambda (s)
|
||||||
|
|
|
@ -17,9 +17,10 @@
|
||||||
[(_ id . body)
|
[(_ id . body)
|
||||||
(let ([preprint? #f]
|
(let ([preprint? #f]
|
||||||
[10pt? #f]
|
[10pt? #f]
|
||||||
|
[onecolumn? #f]
|
||||||
[nocopyright? #f])
|
[nocopyright? #f])
|
||||||
(let loop ([stuff #'body])
|
(let loop ([stuff #'body])
|
||||||
(syntax-case* stuff (preprint 10pt nocopyright) (lambda (a b) (eq? (syntax-e a) (syntax-e b)))
|
(syntax-case* stuff (onecolumn preprint 10pt nocopyright) (lambda (a b) (eq? (syntax-e a) (syntax-e b)))
|
||||||
[(ws . body)
|
[(ws . body)
|
||||||
;; Skip intraline whitespace to find options:
|
;; Skip intraline whitespace to find options:
|
||||||
(and (string? (syntax-e #'ws))
|
(and (string? (syntax-e #'ws))
|
||||||
|
@ -28,6 +29,9 @@
|
||||||
[(preprint . body)
|
[(preprint . body)
|
||||||
(set! preprint? "preprint")
|
(set! preprint? "preprint")
|
||||||
(loop #'body)]
|
(loop #'body)]
|
||||||
|
[(onecolumn . body)
|
||||||
|
(set! onecolumn? "onecolumn")
|
||||||
|
(loop #'body)]
|
||||||
[(nocopyright . body)
|
[(nocopyright . body)
|
||||||
(set! nocopyright? "nocopyrightspace")
|
(set! nocopyright? "nocopyrightspace")
|
||||||
(loop #'body)]
|
(loop #'body)]
|
||||||
|
@ -35,7 +39,7 @@
|
||||||
(set! 10pt? "10pt")
|
(set! 10pt? "10pt")
|
||||||
(loop #'body)]
|
(loop #'body)]
|
||||||
[body
|
[body
|
||||||
#`(#%module-begin id (post-process #,preprint? #,10pt? #,nocopyright?) () . body)])))]))
|
#`(#%module-begin id (post-process #,preprint? #,10pt? #,nocopyright? #,onecolumn?) () . body)])))]))
|
||||||
|
|
||||||
(define ((post-process . opts) doc)
|
(define ((post-process . opts) doc)
|
||||||
(let ([options
|
(let ([options
|
||||||
|
|
|
@ -39,8 +39,19 @@ same line as @hash-lang[], with only whitespace between
|
||||||
#lang scribble/sigplan @nocopyright
|
#lang scribble/sigplan @nocopyright
|
||||||
}|}
|
}|}
|
||||||
|
|
||||||
The @racket[10pt], @racket[preprint], and @racket[nocopyright] options can be
|
@defidform[onecolumn]{
|
||||||
used together and may appear in any order.
|
|
||||||
|
Enables the @tt{onecolumn} option. Use @racket[onecolumn] only on the
|
||||||
|
same line as @hash-lang[], with only whitespace between
|
||||||
|
@racketmodname[scribble/sigplan] and @racket[onecolumn]:
|
||||||
|
|
||||||
|
@codeblock{
|
||||||
|
#lang scribble/sigplan @onecolumn
|
||||||
|
}}
|
||||||
|
|
||||||
|
The @racket[10pt], @racket[preprint], @racket[nocopyright], and
|
||||||
|
@racket[onecolumn] options can be used together and may appear in any
|
||||||
|
order.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user