scribble/sigplan: add `subtitle'
Based on David Van Horn's suggestion. Also, make both `author' and `authorinfo' work (even when mixed). original commit: c9c4d33a2f93cac296c43d0ba04663a870d31664
This commit is contained in:
parent
835ef02800
commit
871a61581c
|
@ -12,6 +12,9 @@
|
||||||
[abstract
|
[abstract
|
||||||
(->* () () #:rest (listof pre-content?)
|
(->* () () #:rest (listof pre-content?)
|
||||||
block?)]
|
block?)]
|
||||||
|
[subtitle
|
||||||
|
(->* () () #:rest (listof pre-content?)
|
||||||
|
content?)]
|
||||||
[authorinfo
|
[authorinfo
|
||||||
(-> pre-content? pre-content? pre-content?
|
(-> pre-content? pre-content? pre-content?
|
||||||
block?)]
|
block?)]
|
||||||
|
@ -83,9 +86,12 @@
|
||||||
;; Authors and conference info:
|
;; Authors and conference info:
|
||||||
|
|
||||||
(define (authorinfo name affiliation e-mail)
|
(define (authorinfo name affiliation e-mail)
|
||||||
|
;; The \SAuthor macro in "style.tex" looks specifically
|
||||||
|
;; for an \SAuthorinfo as its argument, and handles it
|
||||||
|
;; specially in that case:
|
||||||
(author
|
(author
|
||||||
(make-multiarg-element
|
(make-multiarg-element
|
||||||
(make-style "SAuthorinfo"sigplan-extras)
|
(make-style "SAuthorinfo" sigplan-extras)
|
||||||
(list
|
(list
|
||||||
(make-element #f (decode-content (list name)))
|
(make-element #f (decode-content (list name)))
|
||||||
(make-element (make-style "SAuthorPlace" sigplan-extras)
|
(make-element (make-style "SAuthorPlace" sigplan-extras)
|
||||||
|
@ -93,6 +99,10 @@
|
||||||
(make-element (make-style "SAuthorEmail" sigplan-extras)
|
(make-element (make-style "SAuthorEmail" sigplan-extras)
|
||||||
(decode-content (list e-mail)))))))
|
(decode-content (list e-mail)))))))
|
||||||
|
|
||||||
|
(define (subtitle . str)
|
||||||
|
(make-element (make-style "SSubtitle" (append '(aux) sigplan-extras))
|
||||||
|
(decode-content str)))
|
||||||
|
|
||||||
(define (conferenceinfo what where)
|
(define (conferenceinfo what where)
|
||||||
(make-paragraph
|
(make-paragraph
|
||||||
(make-style 'pretitle null)
|
(make-style 'pretitle null)
|
||||||
|
|
|
@ -6,3 +6,8 @@
|
||||||
.SCategory, .SCategoryPlus, .STerms, .SKeywords {
|
.SCategory, .SCategoryPlus, .STerms, .SKeywords {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.SSubtitle {
|
||||||
|
display: block;
|
||||||
|
font-size: smaller;
|
||||||
|
}
|
|
@ -16,3 +16,6 @@
|
||||||
\newcommand{\SCategoryPlus}[4]{}
|
\newcommand{\SCategoryPlus}[4]{}
|
||||||
\newcommand{\STerms}[1]{}
|
\newcommand{\STerms}[1]{}
|
||||||
\newcommand{\SKeywords}[1]{}
|
\newcommand{\SKeywords}[1]{}
|
||||||
|
|
||||||
|
% Normally gets re-written by the title macro:
|
||||||
|
\newcommand{\SSubtitle}[1]{{\bf #1}}
|
||||||
|
|
|
@ -1,11 +1,28 @@
|
||||||
|
|
||||||
\renewcommand{\titleAndVersionAndAuthors}[3]{\title{#1}#3\maketitle}
|
% Define \SXtitle to lift \SSubtitle out:
|
||||||
|
\def\SXtitle#1{\title{\let\SSubtitle\SSubtitleDrop#1}\SExtractSubtitle#1\SExtractSubtitleDone}
|
||||||
|
\def\SSubtitleDrop#1{}
|
||||||
|
\def\SExtractSubtitleDone {}
|
||||||
|
\def\SExtractSubtitle{\futurelet\next\SExtractSubtitleX}
|
||||||
|
\def\SExtractSubtitleX#1{\ifx#1\SSubtitle \let\Snext\SWithSubtitle \else \let\Snext\SExtractSubtitleY \fi \Snext}
|
||||||
|
\def\SExtractSubtitleY{\ifx\next\SExtractSubtitleDone \let\Snext\relax \else \let\Snext\SExtractSubtitle \fi \Snext}
|
||||||
|
\def\SWithSubtitle#1{\subtitle{#1}\SExtractSubtitle}
|
||||||
|
|
||||||
|
\renewcommand{\titleAndVersionAndAuthors}[3]{\SXtitle{#1}#3\maketitle}
|
||||||
\renewcommand{\titleAndEmptyVersionAndAuthors}[3]{\titleAndVersionAndAuthors{#1}{#2}{#3}}
|
\renewcommand{\titleAndEmptyVersionAndAuthors}[3]{\titleAndVersionAndAuthors{#1}{#2}{#3}}
|
||||||
\renewcommand{\titleAndVersionAndEmptyAuthors}[3]{\title{#1}\authorinfo{Anonymous}{}{}\maketitle}
|
\renewcommand{\titleAndVersionAndEmptyAuthors}[3]{\SXtitle{#1}\authorinfo{Anonymous}{}{}\maketitle}
|
||||||
\renewcommand{\titleAndEmptyVersionAndEmptyAuthors}[3]{\titleAndVersionAndEmptyAuthors{#1}{#2}{#3}}
|
\renewcommand{\titleAndEmptyVersionAndEmptyAuthors}[3]{\titleAndVersionAndEmptyAuthors{#1}{#2}{#3}}
|
||||||
|
|
||||||
% Disable plain `author', enable `authorinfo:'
|
% Support plain `author' while enabling `authorinfo': for each
|
||||||
\renewcommand{\SAuthor}[1]{#1}
|
% use of \SAuthor, check whether it contains an \SAuthorinfo form:
|
||||||
|
\def\SAuthor#1{\SAutoAuthor#1\SAutoAuthorDone{#1}}
|
||||||
|
\def\SAutoAuthorDone#1{}
|
||||||
|
\def\SAutoAuthor{\futurelet\next\SAutoAuthorX}
|
||||||
|
\def\SAutoAuthorX{\ifx\next\SAuthorinfo \let\Snext\relax \else \let\Snext\SToAuthorDone \fi \Snext}
|
||||||
|
\def\SToAuthorDone{\futurelet\next\SToAuthorDoneX}
|
||||||
|
\def\SToAuthorDoneX#1{\ifx\next\SAutoAuthorDone \let\Snext\SAddAuthorInfo \else \let\Snext\SToAuthorDone \fi \Snext}
|
||||||
|
\newcommand{\SAddAuthorInfo}[1]{\authorinfo{#1}{}{}}
|
||||||
|
|
||||||
\renewcommand{\SAuthorinfo}[3]{\authorinfo{#1}{#2}{#3}}
|
\renewcommand{\SAuthorinfo}[3]{\authorinfo{#1}{#2}{#3}}
|
||||||
\renewcommand{\SAuthorSep}[1]{}
|
\renewcommand{\SAuthorSep}[1]{}
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,10 @@ Similar to @racket[include-section], but incorporates the document in the
|
||||||
specified module as an abstract. The document must have no title or
|
specified module as an abstract. The document must have no title or
|
||||||
sub-parts.}
|
sub-parts.}
|
||||||
|
|
||||||
|
@defproc[(subtitle [pre-content pre-content?] ...) element?]{
|
||||||
|
|
||||||
|
Use as the last argument to @racket[title] to specify a subtitle.}
|
||||||
|
|
||||||
@defproc[(authorinfo [name pre-content?]
|
@defproc[(authorinfo [name pre-content?]
|
||||||
[affiliation pre-content?]
|
[affiliation pre-content?]
|
||||||
[email pre-content?])
|
[email pre-content?])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user