From 52334a508b2cc90d1fec9999bf11b1aa67f884bb Mon Sep 17 00:00:00 2001 From: Ben Greenman Date: Sat, 28 Jul 2018 16:39:07 -0400 Subject: [PATCH] acmart: add 'shortauthors' function --- scribble-doc/scribblings/scribble/acmart.scrbl | 5 +++++ scribble-lib/info.rkt | 2 +- scribble-lib/scribble/acmart.rkt | 8 ++++++++ scribble-lib/scribble/acmart/acmart.tex | 5 ++++- scribble-lib/scribble/acmart/style.tex | 6 ++++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/scribble-doc/scribblings/scribble/acmart.scrbl b/scribble-doc/scribblings/scribble/acmart.scrbl index e70bbf2c..da4cef12 100644 --- a/scribble-doc/scribblings/scribble/acmart.scrbl +++ b/scribble-doc/scribblings/scribble/acmart.scrbl @@ -271,6 +271,11 @@ screen version of the image links to the badge authority. @history[#:added "1.26"]} +@defproc[(shortauthors [name pre-content?] ...) element?]{ + Sets the text for the names of the authors in the running header. + + @history[#:added "1.29"]} + @deftogether[( @defproc[(terms [content pre-content?] ...) content?] @defproc[(keywords [content pre-content?] ...) content?] diff --git a/scribble-lib/info.rkt b/scribble-lib/info.rkt index 948bd3ea..2135010a 100644 --- a/scribble-lib/info.rkt +++ b/scribble-lib/info.rkt @@ -23,4 +23,4 @@ (define pkg-authors '(mflatt eli)) -(define version "1.28") +(define version "1.29") diff --git a/scribble-lib/scribble/acmart.rkt b/scribble-lib/scribble/acmart.rkt index 80416d02..103ce33c 100644 --- a/scribble-lib/scribble/acmart.rkt +++ b/scribble-lib/scribble/acmart.rkt @@ -50,6 +50,10 @@ () #:rest (listof pre-content?) block?)] + [shortauthors (->* () + () + #:rest (listof pre-content?) + element?)] [institution (->* () (#:departments (listof (or/c pre-content? institution?))) #:rest pre-content? @@ -310,6 +314,10 @@ (make-element (make-style "authorsaddresses" command-props) (decode-content content)))) +(define (shortauthors . content) + (make-element (make-style "Sshortauthors" command-props) + (decode-content content))) + (define (institution #:departments [departments '()] . name) (author-institution name departments)) diff --git a/scribble-lib/scribble/acmart/acmart.tex b/scribble-lib/scribble/acmart/acmart.tex index f306bc88..57f807c4 100644 --- a/scribble-lib/scribble/acmart/acmart.tex +++ b/scribble-lib/scribble/acmart/acmart.tex @@ -1,4 +1,5 @@ - +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BEGIN acmart/acmart.tex % Support for styles in scribble/acmart % These are replaced by scribble/acmart/style.tex, @@ -26,3 +27,5 @@ % Use ACM color; it would be better to use `citecolor` here somehow, % but I can't figure out how to do that \newcommand{\AutobibLink}[1]{\color{ACMPurple}{#1}} +% END acmart/acmart.tex +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/scribble-lib/scribble/acmart/style.tex b/scribble-lib/scribble/acmart/style.tex index 19f281a1..4d5a4d4a 100644 --- a/scribble-lib/scribble/acmart/style.tex +++ b/scribble-lib/scribble/acmart/style.tex @@ -1,3 +1,5 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% BEGIN acmart/style.tex \renewcommand{\titleAndVersionAndAuthors}[3]{\title{#1}#3\maketitle} \renewcommand{\titleAndEmptyVersionAndAuthors}[3]{\titleAndVersionAndAuthors{#1}{#2}{#3}} @@ -37,6 +39,8 @@ \newcommand{\StitleShort}[2]{\title[#1]{#2}} +\newcommand{\Sshortauthors}[1]{\renewcommand{\shortauthors}{#1}} + \newcommand{\SacmBadgeRURL}[2]{\acmBadgeR[#1]{#2}} \newcommand{\SacmBadgeLURL}[2]{\acmBadgeL[#1]{#2}} @@ -45,3 +49,5 @@ \newcommand{\SreceivedStage}[2]{\received[#1]{#2}} \newcommand{\SccsdescNumber}[2]{\ccsdesc[#1]{#2}} +% END acmart/style.tex +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%