diff --git a/scribble-doc/scribblings/scribble/acmart.scrbl b/scribble-doc/scribblings/scribble/acmart.scrbl index babb08a8..fca73465 100644 --- a/scribble-doc/scribblings/scribble/acmart.scrbl +++ b/scribble-doc/scribblings/scribble/acmart.scrbl @@ -34,6 +34,9 @@ Example: @defidform[sigplan] @defidform[sigchi] @defidform[sigchi-a] +@defidform[dtrap] +@defidform[tiot] +@defidform[tdsci] )]{ Enables the given document format. Use the format only on the same diff --git a/scribble-doc/scribblings/scribble/base.scrbl b/scribble-doc/scribblings/scribble/base.scrbl index be57eaa4..c9832c49 100644 --- a/scribble-doc/scribblings/scribble/base.scrbl +++ b/scribble-doc/scribblings/scribble/base.scrbl @@ -261,7 +261,8 @@ Returns @racket[#t] if @racket[v] is an item produced by [#:sep sep (or/c block? content? #f) #f] [#:column-properties column-properties (listof any/c) '()] [#:row-properties row-properties (listof any/c) '()] - [#:cell-properties cell-properties (listof (listof any/c)) '()]) + [#:cell-properties cell-properties (listof (listof any/c)) '()] + [#:sep-properties sep-properties (or/c list? #f) #f]) table?]{ Creates a @tech{table} with the given @racket[cells] content, which is @@ -276,11 +277,11 @@ cell in a row. The @racket[style] argument is handled the same as @racket[para]. See @racket[table] for a list of recognized @tech{style names} and @tech{style properties}. -If @racket[sep] is not @racket[#f], it is inserted as a new column -between every column in the table; note that any -@racket[table-columns] or @racket[table-cells] property in -@racket[style] must take the added columns into account. Otherwise, -the default style places no space between table columns. When @racket[sep] +The default style places no space between table columns. If +@racket[sep] is not @racket[#f], it is inserted as a new column +between every column in the table; the new column's properties are the +same as the preceding column's, unless @racket[sep-properties] +provides a list of @tech{style properties} to use. When @racket[sep] would be placed before a @racket['cont], a @racket['cont] is inserted, instead. @@ -343,7 +344,10 @@ properties will be used from the merger into @racket[table-cells].} @racket[#:row-properties], and @racket[#:cell-properties] arguments.} #:changed "1.12" @elem{Changed @racket[sep] insertion before a - @racket['cont].}] + @racket['cont].} + #:changed "1.28" @elem{Added @racket[sep-properties] and made + the preceding column's properties used + consistently if not specified.}] Examples: @codeblock[#:keep-lang-line? #f]|{ diff --git a/scribble-doc/scribblings/scribble/lp.scrbl b/scribble-doc/scribblings/scribble/lp.scrbl index a3a5aeb0..7fc68361 100644 --- a/scribble-doc/scribblings/scribble/lp.scrbl +++ b/scribble-doc/scribblings/scribble/lp.scrbl @@ -69,6 +69,15 @@ a @racket[doc] submodule that is expanded (so that the content is effectively re-expanded). The @racketidfont{doc} submodule is declared with @racket[module*]. +To include a @racketmodname[scribble/lp2] document named + @filepath{file.scrbl} into another Scribble document, + import the @racketidfont{doc} submodule: + +@codeblock[#:keep-lang-line? #false]|{ + #lang scribble/manual + @include-section[(submod "file.scrbl" doc)] +}| + @history[#:added "1.8" #:changed "1.17" @elem{Declared the @racketidfont{doc} submodule with @racket[module*] instead of @racket[module].}] @@ -127,8 +136,8 @@ used. @defmodule[scribble/lp-include]{The @racketmodname[scribble/lp-include] library is normally used within a Scribble document---that is, a module that starts with something like -@racket[#, @hash-lang[] @racketmodname[scribble/base]] or @racket[#, @hash-lang[] -@racketmodname[scribble/manual]], instead of @racket[#, @hash-lang[] @racketmodname[racket]].} +@hash-lang[] @racketmodname[scribble/base] or @hash-lang[] @racketmodname[scribble/manual], +instead of @hash-lang[] @racketmodname[racket].} @defform[(lp-include filename)]{ Includes the source of @racket[filename] as the typeset version of the literate diff --git a/scribble-doc/scribblings/scribble/manual.scrbl b/scribble-doc/scribblings/scribble/manual.scrbl index ff039dd7..6c9cbb3c 100644 --- a/scribble-doc/scribblings/scribble/manual.scrbl +++ b/scribble-doc/scribblings/scribble/manual.scrbl @@ -106,7 +106,7 @@ for-label bindings in the lexical environment of the syntax object provided by @racket[context-expr]. The default @racket[context-expr] has the same lexical context as the first @racket[str-expr]. When @racket[line-number-expr] is true, line number is enabled starting -from @racket[line-number-expr], and @racket[line-number-sep] controls +from @racket[line-number-expr], and @racket[line-number-sep-expr] controls the separation (in spaces; defaults to 1) between the line numbers and code. diff --git a/scribble-doc/scribblings/scribble/reader-internals.scrbl b/scribble-doc/scribblings/scribble/reader-internals.scrbl index a46cdeec..c23a4727 100644 --- a/scribble-doc/scribblings/scribble/reader-internals.scrbl +++ b/scribble-doc/scribblings/scribble/reader-internals.scrbl @@ -163,7 +163,7 @@ reports @racket["Hello, friend."]. In addition to configuring the reader for a module body, @racketmodname[at-exp] attaches a run-time configuration annotation to -the module, so that it if it used as the main module, the +the module, so that if it used as the main module, the @racket[current-read-interaction] parameter is adjusted to use the @seclink["reader"]{@"@"-reader} readtable extension. diff --git a/scribble-lib/info.rkt b/scribble-lib/info.rkt index c7ec9bf9..948bd3ea 100644 --- a/scribble-lib/info.rkt +++ b/scribble-lib/info.rkt @@ -23,4 +23,4 @@ (define pkg-authors '(mflatt eli)) -(define version "1.27") +(define version "1.28") diff --git a/scribble-lib/scribble/acmart.rkt b/scribble-lib/scribble/acmart.rkt index 53cb64c5..80416d02 100644 --- a/scribble-lib/scribble/acmart.rkt +++ b/scribble-lib/scribble/acmart.rkt @@ -9,6 +9,7 @@ scribble/html-properties scribble/latex-properties scribble/private/tag + scribble/private/lang-parameters (for-syntax racket/base)) (struct affiliation (position institution street-address city state postcode country) @@ -86,7 +87,8 @@ (->* () () #:rest (listof pre-content?) any/c)]) (provide - invisible-element-to-collect-for-acmart-extras) + invisible-element-to-collect-for-acmart-extras + include-abstract) (define-syntax-rule (defopts name ...) (begin (define-syntax (name stx) @@ -131,7 +133,8 @@ ...)) ; format options -(defopts manuscript acmsmall acmlarge acmtog sigconf siggraph sigplan sigchi sigchi-a) +(defopts manuscript acmsmall acmlarge acmtog sigconf siggraph sigplan sigchi sigchi-a + dtrap pacmcgit tiot tdsci) ; boolean options (defopts review screen natbib anonymous authorversion 9pt 10pt 11pt 12pt) @@ -159,6 +162,20 @@ abstract-style (decode-flow strs))) +(define (extract-abstract p) + (unless (part? p) + (error 'include-abstract "doc binding is not a part: ~e" p)) + (unless (null? (part-parts p)) + (error 'include-abstract "abstract part has sub-parts: ~e" (part-parts p))) + (when (part-title-content p) + (error 'include-abstract "abstract part has title content: ~e" (part-title-content p))) + (part-blocks p)) + +(define-syntax-rule (include-abstract mp) + (begin + (require (only-in mp [doc abstract-doc])) + (make-nested-flow abstract-style (extract-abstract abstract-doc)))) + (define (acmConference name date venue) (make-paragraph (make-style 'pretitle '()) (make-multiarg-element (make-style "acmConference" multicommand-props) @@ -392,3 +409,7 @@ ; FIXME: theorem styles +(default-figure-label-text (make-element 'sf "Fig.")) +(default-figure-label-sep ". ") +(default-figure-caption-style 'sf) +(default-figure-counter-style 'sf) diff --git a/scribble-lib/scribble/acmart/acmart-load.tex b/scribble-lib/scribble/acmart/acmart-load.tex index 80764311..36996658 100644 --- a/scribble-lib/scribble/acmart/acmart-load.tex +++ b/scribble-lib/scribble/acmart/acmart-load.tex @@ -3,6 +3,8 @@ % Avoid package option conflict \renewcommand\packageColor\relax \renewcommand\packageTocstyle\relax +\renewcommand\packageMathabx{\ifx\bigtimes\undefined \usepackage{mathabx} \else \relax \fi} +% Both 'mathabx' and 'newtxmath' (required by the 'acmart' class) define a '\bigtimes' command. \let\Footnote\undefined \let\captionwidth\undefined \renewcommand{\renewrmdefault}{} diff --git a/scribble-lib/scribble/acmart/acmart.cls b/scribble-lib/scribble/acmart/acmart.cls index 987e3c41..7b360a98 100644 --- a/scribble-lib/scribble/acmart/acmart.cls +++ b/scribble-lib/scribble/acmart/acmart.cls @@ -37,7 +37,7 @@ %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} \ProvidesClass{acmart} -[2017/09/16 v1.48 Typesetting articles for the Association for +[2018/04/14 v1.53 Typesetting articles for the Association for Computing Machinery] \def\@classname{acmart} \InputIfFileExists{acmart-preload-hook.tex}{% @@ -199,22 +199,6 @@ Computing Machinery] \ClassInfo{\@classname}{Using fontsize \ACM@fontsize} \LoadClass[\ACM@fontsize, reqno]{amsart} \RequirePackage{microtype} -\ifcase\ACM@format@nr - \relax % manuscript - \or % acmsmall - \or % acmlarge - \or % acmtog - \RequirePackage{flushend} - \or % sigconf - \RequirePackage{flushend} - \or % siggraph - \RequirePackage{flushend} - \or % sigplan - \RequirePackage{flushend} - \or % sigchi - \RequirePackage{flushend} - \or % sigchi-a -\fi \RequirePackage{etoolbox} \RequirePackage{refcount} \RequirePackage{totpages} @@ -465,7 +449,6 @@ Computing Machinery] \let\citeANP\citeauthor \let\citeNN\citeyearpar \let\citeyearNP\citeyear - \let\citeyear\citeyearpar \let\citeNP\citealt \DeclareRobustCommand\citeA {\begingroup\NAT@swafalse @@ -477,7 +460,7 @@ Computing Machinery] \providecommand\citename[1]{#1}} \fi \newcommand\shortcite[2][]{% - \ifNAT@numbers\cite[#1]{#2}\else\citeyear[#1]{#2}\fi} + \ifNAT@numbers\cite[#1]{#2}\else\citeyearpar[#1]{#2}\fi} \def\bibliographystyle#1{% \ifx\@begindocumenthook\@undefined\else \expandafter\AtBeginDocument @@ -485,7 +468,8 @@ Computing Machinery] {\if@filesw \immediate\write\@auxout{\string\bibstyle{#1}}% \fi}} -\RequirePackage{graphicx, xcolor} +\RequirePackage{graphicx} +\RequirePackage[prologue]{xcolor} \definecolor[named]{ACMBlue}{cmyk}{1,0.1,0,0.1} \definecolor[named]{ACMYellow}{cmyk}{0,0.16,1,0} \definecolor[named]{ACMOrange}{cmyk}{0,0.42,1,0.01} @@ -499,8 +483,8 @@ Computing Machinery] \SetWatermarkFontSize{0.5in} \SetWatermarkColor[gray]{.9} \SetWatermarkText{\parbox{12em}{\centering - Unpublished working draft\\ - Not for distribution}} + Unpublished working draft.\\ + Not for distribution.}} \fi \RequirePackage{geometry} \ifcase\ACM@format@nr @@ -655,10 +639,16 @@ Computing Machinery] have the newtxmath package installed. Please upgrade your TeX}\@ACM@newfontsfalse} \if@ACM@newfonts -\RequirePackage[tt=false, type1=true]{libertine} +\ifxetex + \RequirePackage[tt=false]{libertine} +\else + \RequirePackage[tt=false, type1=true]{libertine} +\fi \RequirePackage[varqu]{zi4} \RequirePackage[libertine]{newtxmath} -\RequirePackage[T1]{fontenc} +\ifxetex\else + \RequirePackage[T1]{fontenc} +\fi \fi \let\liningnums\@undefined \AtEndPreamble{% @@ -793,6 +783,7 @@ Computing Machinery] \define@choicekey*+{ACM}{acmJournal}[\@journalCode\@journalCode@nr]{% CIE,% CSUR,% + DTRAP,% IMWUT,% JACM,% JDIQ,% @@ -800,6 +791,7 @@ Computing Machinery] JERIC,% JETC,% JOCCH,% + PACMCGIT,% PACMHCI,% PACMPL,% POMACS,% @@ -810,10 +802,12 @@ Computing Machinery] TALLIP,% TAP,% TCPS,% + TDSCI,% TEAC,% TECS,% THRI,% TIIS,% + TIOT,% TISSEC,% TIST,% TKDD,% @@ -853,6 +847,10 @@ Computing Machinery] \def\@journalName{ACM Computing Surveys}% \def\@journalNameShort{ACM Comput. Surv.}% \def\@permissionCodeOne{0360-0300}% +\or % DTRAP + \def\@journalName{Digital Threats: Research and Practice}% + \def\@journalNameShort{Digit. Threat. Res. Pract.}% + \def\@permissionCodeOne{2576-5337}% \or % IMWUT \def\@journalName{Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies}% @@ -883,6 +881,12 @@ Computing Machinery] \or % JOCCH \def\@journalName{ACM Journal on Computing and Cultural Heritage}% \def\@journalNameShort{ACM J. Comput. Cult. Herit.}% +\or % PACMCGIT + \def\@journalName{Proceedings of the ACM on Computer Graphics and Interactive Techniques}% + \def\@journalNameShort{Proc. ACM Comput. Graph. Interact. Tech.}% + \def\@permissionCodeOne{2577-6193}% + \@ACM@screentrue + \PackageInfo{\@classname}{Using screen mode due to \@journalCode}% \or % PACMHCI \def\@journalName{Proceedings of the ACM on Human-Computer Interaction}% \def\@journalNameShort{Proc. ACM Hum.-Comput. Interact.}% @@ -924,6 +928,10 @@ Computing Machinery] \def\@journalName{ACM Transactions on Applied Perception}% \or % TCPS \def\@journalName{ACM Transactions on Cyber-Physical Systems}% +\or % TDSCI + \def\@journalName{ACM Transactions on Data Science}% + \def\@journalNameShort{ACM Trans. Data Sci.}% + \def\@permissionCodeOne{2577-3224}% \or % TEAC \def\@journalName{ACM Transactions on Economics and Computation}% \or % TECS @@ -938,6 +946,10 @@ Computing Machinery] \def\@journalName{ACM Transactions on Interactive Intelligent Systems}% \def\@journalNameShort{ACM Trans. Interact. Intell. Syst.}% \def\@permissionCodeOne{2160-6455}% +\or % TIOT + \def\@journalName{ACM Transactions on Internet of Things}% + \def\@journalNameShort{ACM Trans. Internet Things}% + \def\@permissionCodeOne{2577-6207}% \or % TISSEC \def\@journalName{ACM Transactions on Information and System Security}% \def\@journalNameShort{ACM Trans. Info. Syst. Sec.}% @@ -1332,7 +1344,8 @@ Computing Machinery] \acm@copyrightinput\acm@copyrightmode]{none,% acmcopyright,acmlicensed,rightsretained,% usgov,usgovmixed,cagov,cagovmixed,licensedusgovmixed,% - licensedcagov,licensedcagovmixed,othergov,licensedothergov}{% + licensedcagov,licensedcagovmixed,othergov,licensedothergov,% + iw3c2w3,iw3c2w3g}{% \@printpermissiontrue \@printcopyrighttrue \@acmownedtrue @@ -1346,13 +1359,13 @@ Computing Machinery] \fi \ifnum\acm@copyrightmode=3\relax % rightsretained \@acmownedfalse - \acmPrice{}% + \AtBeginDocument{\acmPrice{}}% \fi \ifnum\acm@copyrightmode=4\relax % usgov \@printpermissiontrue \@printcopyrightfalse \@acmownedfalse - \acmPrice{}% + \AtBeginDocument{\acmPrice{}}% \fi \ifnum\acm@copyrightmode=6\relax % cagov \@acmownedfalse @@ -1371,6 +1384,14 @@ Computing Machinery] \fi \ifnum\acm@copyrightmode=12\relax % licensedothergov \@acmownedfalse + \fi + \ifnum\acm@copyrightmode=13\relax % iw3c2w3 + \@acmownedfalse + \AtBeginDocument{\acmPrice{}}% + \fi + \ifnum\acm@copyrightmode=14\relax % iw3c2w3g + \@acmownedfalse + \AtBeginDocument{\acmPrice{}}% \fi} \def\setcopyright#1{\setkeys{ACM@}{acmcopyrightmode=#1}} \setcopyright{acmcopyright} @@ -1380,7 +1401,7 @@ Computing Machinery] Association for Computing Machinery. \or % acmlicensed Copyright held by the owner/author(s). Publication rights licensed to - Association for Computing Machinery. + ACM\@. \or % rightsretained Copyright held by the owner/author(s). \or % usgov @@ -1392,18 +1413,24 @@ Computing Machinery] Association for Computing Machinery. \or %licensedusgovmixed Copyright held by the owner/author(s). Publication rights licensed to - Association for Computing Machinery. + ACM\@. \or % licensedcagov Crown in Right of Canada. Publication rights licensed to - Association for Computing Machinery. + ACM\@. \or %licensedcagovmixed Copyright held by the owner/author(s). Publication rights licensed to - Association for Computing Machinery. + ACM\@. \or % othergov Association for Computing Machinery. \or % licensedothergov Copyright held by the owner/author(s). Publication rights licensed to - Association for Computing Machinery. + ACM\@. + \or % ic2w3www + IW3C2 (International World Wide Web Conference Committee), published + under Creative Commons CC-BY~4.0 License. + \or % ic2w3wwwgoogle + IW3C2 (International World Wide Web Conference Committee), published + under Creative Commons CC-BY-NC-ND~4.0 License. \fi} \def\@formatdoi#1{\url{https://doi.org/#1}} \def\@copyrightpermission{% @@ -1517,7 +1544,18 @@ Computing Machinery] retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only. - \fi} + \or % iw3c2w3 + This paper is published under the Creative Commons Attribution~4.0 + International (CC-BY~4.0) license. Authors reserve their rights to + disseminate the work on their personal and corporate Web sites with + the appropriate attribution. + \or % iw3c2w3g + This paper is published under the Creative Commons + Attribution-NonCommercial-NoDerivs~4.0 International + (CC-BY-NC-ND~4.0) license. Authors reserve their rights to + disseminate the work on their personal and corporate Web sites with + the appropriate attribution. + \fi} \def\copyrightyear#1{\def\@copyrightyear{#1}} \copyrightyear{\@acmYear} \def\@teaserfigures{} @@ -1571,8 +1609,7 @@ Computing Machinery] \footnotetextcopyrightpermission{% \if@ACM@authordraft \raisebox{-2ex}[\z@][\z@]{\makebox[0pt][l]{\large\bfseries - Unpublished - working draft. Not for distribution}}% + Unpublished working draft. Not for distribution.}}% \color[gray]{0.9}% \fi \parindent\z@\parskip0.1\baselineskip @@ -1642,10 +1679,17 @@ Computing Machinery] \if@ACM@printacmref \@mkbibcitation \fi - \hypersetup{pdfauthor={\authors}, + \hypersetup{% + pdflang={English}, + pdfdisplaydoctitle, + pdfauthor={\authors}, pdftitle={\@title}, pdfsubject={\@concepts}, - pdfkeywords={\@keywords}}% + pdfkeywords={\@keywords}, + pdfcreator={LaTeX with acmart + \csname ver@acmart.cls\endcsname\space + and hyperref + \csname ver@hyperref.sty\endcsname}}% \@printendtopmatter \@afterindentfalse \@afterheading @@ -2119,7 +2163,7 @@ Computing Machinery] ACM, New York, NY, USA% \@article@string\unskip, \ref{TotPages}~\@pages@word. \fi - \@formatdoi{\@acmDOI} + \ifx\@acmDOI\@empty\else\@formatdoi{\@acmDOI}\fi \par\egroup} \def\@printendtopmatter{\par\bigskip} \def\@setthanks{\long\def\thanks##1{\par##1\@addpunct.}\thankses} @@ -2189,7 +2233,7 @@ Computing Machinery] \fancyhead[RO]{\@headfootfont\@acmArticle\if@ACM@printfolios:\thepage\fi}% \fancyhead[RE]{\@headfootfont\@shortauthors}% \fancyhead[LO]{\ACM@linecountL\@headfootfont\shorttitle}% - \fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No. + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% \or % acmlarge \fancyhead[LE]{\ACM@linecountL\@headfootfont @@ -2197,7 +2241,7 @@ Computing Machinery] \fancyhead[LO]{\ACM@linecountL}% \fancyhead[RO]{\@headfootfont \shorttitle\quad\textbullet\quad\@acmArticle\if@ACM@printfolios:\thepage\fi}% - \fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No. + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% \or % acmtog \fancyhead[LE]{\ACM@linecountL\@headfootfont @@ -2206,7 +2250,7 @@ Computing Machinery] \fancyhead[RE]{\ACM@linecountR}% \fancyhead[RO]{\@headfootfont \shorttitle\quad\textbullet\quad\@acmArticle\if@ACM@printfolios:\thepage\fi\ACM@linecountR}% - \fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No. + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% \else % Proceedings \fancyfoot[C]{\if@ACM@printfolios\footnotesize\thepage\fi}% @@ -2275,7 +2319,7 @@ Computing Machinery] \fancyfoot[RO,LE]{\if@ACM@printfolios\small\thepage\fi}% \fancyfoot[RE,LO]{\footnotesize Manuscript submitted to ACM}% \or % acmsmall - \fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No. + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% \fancyhead[LE]{\ACM@linecountL\@folioblob}% @@ -2283,7 +2327,7 @@ Computing Machinery] \fancyhead[RO]{\@folioblob}% \fancyheadoffset[RO,LE]{0.6\@folio@wd}% \or % acmlarge - \fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No. + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% \fancyhead[RO]{\@folioblob}% @@ -2291,7 +2335,7 @@ Computing Machinery] \fancyhead[LO]{\ACM@linecountL}% \fancyheadoffset[RO,LE]{1.4\@folio@wd}% \or % acmtog - \fancyfoot[RO,LE]{\footnotesize \@journalName, Vol. \@acmVolume, No. + \fancyfoot[RO,LE]{\footnotesize \@journalNameShort, Vol. \@acmVolume, No. \@acmNumber, Article \@acmArticle. Publication date: \@acmPubDate.}% \fancyhead[L]{\ACM@linecountL}% @@ -2465,8 +2509,9 @@ Computing Machinery] \@ifundefined{proposition}{% \newtheorem{proposition}[theorem]{Proposition} }{} + \@ifundefined{lemma}{% \newtheorem{lemma}[theorem]{Lemma} - \@ifundefined{lemma}{}{} + }{} \@ifundefined{corollary}{% \newtheorem{corollary}[theorem]{Corollary} }{} diff --git a/scribble-lib/scribble/acmart/acmart.css b/scribble-lib/scribble/acmart/acmart.css index e46ab8cc..8f96a8ad 100644 --- a/scribble-lib/scribble/acmart/acmart.css +++ b/scribble-lib/scribble/acmart/acmart.css @@ -1,4 +1,4 @@ -/* Support for styles in scribble/sigplan */ +/* Support for styles in scribble/acmart */ .SAuthorPlace, .SAuthorEmail, .SConferenceInfo, .SCopyrightYear, .SCopyrightData, diff --git a/scribble-lib/scribble/acmart/lang.rkt b/scribble-lib/scribble/acmart/lang.rkt index e8755f50..80708a12 100644 --- a/scribble-lib/scribble/acmart/lang.rkt +++ b/scribble-lib/scribble/acmart/lang.rkt @@ -6,7 +6,8 @@ scribble/latex-prefix racket/list "../private/defaults.rkt" - (for-syntax racket/base)) + (for-syntax racket/base + syntax/parse)) (provide (except-out (all-from-out scribble/doclang) #%module-begin) (all-from-out scribble/acmart) (all-from-out scribble/base) @@ -23,106 +24,98 @@ [authorversion? #f] [font-size #f]) (let loop ([stuff #'body]) - (syntax-case* stuff (manuscript acmsmall acmlarge acmtog sigconf siggraph sigplan sigchi sigchi-a - review screen natbib anonymous authorversion 9pt 10pt 11pt 12pt) - (lambda (a b) (eq? (syntax-e a) (syntax-e b))) + (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) + + ;; Skip intraline whitespace to find options: [(ws . body) - ;; Skip intraline whitespace to find options: - (and (string? (syntax-e #'ws)) - (regexp-match? #rx"^ *$" (syntax-e #'ws))) + #:when (and (string? (syntax-e #'ws)) + (regexp-match? #rx"^ *$" (syntax-e #'ws))) (loop #'body)] - ; boolean options - [((review #t) . body) - (set! review? "review=true") - (loop #'body)] - [((review #f) . body) - (set! review? "review=false") - (loop #'body)] - [(review . body) - (set! review? "review=true") - (loop #'body)] - [((screen #t) . body) - (set! screen? "screen=true") - (loop #'body)] - [((screen #f) . body) - (set! screen? "screen=false") - (loop #'body)] - [(screen . body) - (set! screen? "screen=true") - (loop #'body)] - [((natbib #t) . body) - (set! natbib? "natbib=true") - (loop #'body)] - [((natbib #f) . body) - (set! natbib? "natbib=false") - (loop #'body)] - [(natbib . body) - (set! natbib? "natbib=true") - (loop #'body)] + ; boolean options + [((review #t) . body) + (set! review? "review=true") + (loop #'body)] + [((review #f) . body) + (set! review? "review=false") + (loop #'body)] + [(review . body) + (set! review? "review=true") + (loop #'body)] + [((screen #t) . body) + (set! screen? "screen=true") + (loop #'body)] + [((screen #f) . body) + (set! screen? "screen=false") + (loop #'body)] + [(screen . body) + (set! screen? "screen=true") + (loop #'body)] + [((natbib #t) . body) + (set! natbib? "natbib=true") + (loop #'body)] + [((natbib #f) . body) + (set! natbib? "natbib=false") + (loop #'body)] + [(natbib . body) + (set! natbib? "natbib=true") + (loop #'body)] - [((anonymous #t) . body) - (set! anonymous? "anonymous=true") - (loop #'body)] - [((anonymous #f) . body) - (set! anonymous? "anonymous=false") - (loop #'body)] - [(anonymous . body) - (set! anonymous? "anonymous=true") - (loop #'body)] - [((authorversion #t) . body) - (set! authorversion? "authorversion=true") - (loop #'body)] - [((authorversion #f) . body) - (set! authorversion? "authorversion=false") - (loop #'body)] - [(authorversion . body) - (set! authorversion? "authorversion=true") - (loop #'body)] - [(9pt . body) - (set! font-size "9pt") - (loop #'body)] - [(10pt . body) - (set! font-size "10pt") - (loop #'body)] - [(11pt . body) - (set! font-size "11pt") - (loop #'body)] - [(12pt . body) - (set! font-size "12pt") - (loop #'body)] + [((anonymous #t) . body) + (set! anonymous? "anonymous=true") + (loop #'body)] + [((anonymous #f) . body) + (set! anonymous? "anonymous=false") + (loop #'body)] + [(anonymous . body) + (set! anonymous? "anonymous=true") + (loop #'body)] + [((authorversion #t) . body) + (set! authorversion? "authorversion=true") + (loop #'body)] + [((authorversion #f) . body) + (set! authorversion? "authorversion=false") + (loop #'body)] + [(authorversion . body) + (set! authorversion? "authorversion=true") + (loop #'body)] + [(9pt . body) + (set! font-size "9pt") + (loop #'body)] + [(10pt . body) + (set! font-size "10pt") + (loop #'body)] + [(11pt . body) + (set! font-size "11pt") + (loop #'body)] + [(12pt . body) + (set! font-size "12pt") + (loop #'body)] ; format options - [(manuscript . body) - (set! format? "manuscript") + [((~and fmt + (~or manuscript + acmsmall + acmlarge + acmtog + sigconf + siggraph + sigplan + sigchi + sigchi-a + dtrap + pacmcgit + tiot + tdsci)) + . body) + (set! format? (symbol->string (syntax->datum #'fmt))) (loop #'body)] - [(acmsmall . body) - (set! format? "acmsmall") - (loop #'body)] - [(acmlarge . body) - (set! format? "acmlarge") - (loop #'body)] - [(acmtog . body) - (set! format? "acmtog") - (loop #'body)] - [(sigconf . body) - (set! format? "sigconf") - (loop #'body)] - [(sigconf . body) - (set! format? "siggraph") - (loop #'body)] - [(sigplan . body) - (set! format? "sigplan") - (loop #'body)] - [(sigchi . body) - (set! format? "sigchi") - (loop #'body)] - [(sigchi-a . body) - (set! format? "sigchi-a") - (loop #'body)] - - [body + + [body #`(#%module-begin id (post-process #,review? #,screen? #,natbib? #,anonymous? #,authorversion? #,font-size #,format?) () . body)])))])) (define ((post-process . opts) doc) @@ -139,7 +132,7 @@ (scribble-file "acmart/style.tex") (list (scribble-file "acmart/acmart.cls")) #f - #:replacements (hash "scribble-load-replace.tex" (scribble-file "acmart/acmart-load.tex")))))) + #:replacements (hash "scribble-load-replace.tex" (scribble-file "acmart/acmart-load.tex")))))) (define (add-acmart-styles doc) (struct-copy part doc diff --git a/scribble-lib/scribble/base.rkt b/scribble-lib/scribble/base.rkt index e57ef3b7..fd2f1ed5 100644 --- a/scribble-lib/scribble/base.rkt +++ b/scribble-lib/scribble/base.rkt @@ -329,7 +329,8 @@ #:sep (or/c content? block? #f) #:column-properties (listof any/c) #:row-properties (listof any/c) - #:cell-properties (listof (listof any/c))) + #:cell-properties (listof (listof any/c)) + #:sep-properties (or/c list? #f)) table?)]) (define (convert-block-style style) @@ -352,6 +353,7 @@ (define (tabular #:style [style #f] #:sep [sep #f] + #:sep-properties [sep-props #f] #:column-properties [column-properties null] #:row-properties [row-properties null] #:cell-properties [cell-properties null] @@ -426,7 +428,7 @@ [(null? column-properties) (if (or (zero? n) (not sep)) (cons prev (loop null (add1 n) prev)) - (list* prev prev (loop null (+ n 2) prev)))] + (list* (or sep-props prev) prev (loop null (+ n 2) prev)))] [else (define (to-list v) (if (list? v) v (list v))) (define props (to-list (car column-properties))) @@ -437,7 +439,7 @@ props)) (if (or (zero? n) (not sep)) (cons props rest) - (list* null props rest))]))) + (list* (or sep-props prev) props rest))]))) (define full-column-properties (make-full-column-properties column-properties)) (define (make-full-cell-properties cell-properties) @@ -560,7 +562,7 @@ #:rest (listof pre-content?) element?)] [secref (->* (string?) - (#:doc module-path? + (#:doc (or/c #f module-path?) #:tag-prefixes (or/c #f (listof string?)) #:underline? any/c #:link-render-style (or/c #f link-render-style?)) diff --git a/scribble-lib/scribble/html-render.rkt b/scribble-lib/scribble/html-render.rkt index 7ec0a174..046b8294 100644 --- a/scribble-lib/scribble/html-render.rkt +++ b/scribble-lib/scribble/html-render.rkt @@ -1317,17 +1317,11 @@ (if (path? p) (url->string* (path->url (path->complete-path p))) p))]) - `((,(if svg? 'object 'img) - ([,(if svg? 'data 'src) ,srcref] + `((img + ([src ,srcref] [alt ,(content->string (element-content e))] - ,@(if svg? - `([type "image/svg+xml"]) - null) ,@sz - ,@(attribs)) - ,@(if svg? - `((param ([name "src"] [value ,srcref]))) - null)))))] + ,@(attribs))))))] [(element-style-property-matching e script-property?) => (lambda (v) @@ -1496,8 +1490,8 @@ (list (add-padding cvt - `(object - ([data ,(install-file "pict.svg" bstr)] + `(img + ([src ,(install-file "pict.svg" bstr)] [type "image/svg+xml"]))))))] [else #f]))) diff --git a/scribble-lib/scribble/latex-render.rkt b/scribble-lib/scribble/latex-render.rkt index 32b72a36..5aae9393 100644 --- a/scribble-lib/scribble/latex-render.rkt +++ b/scribble-lib/scribble/latex-render.rkt @@ -1112,6 +1112,16 @@ [(#\u039B) "$\\Lambda$"] [(#\u03BC) "$\\mu$"] [(#\u03C0) "$\\pi$"] + [(#\₀) "$_0$"] + [(#\₁) "$_1$"] + [(#\₂) "$_2$"] + [(#\₃) "$_3$"] + [(#\₄) "$_4$"] + [(#\₅) "$_5$"] + [(#\₆) "$_6$"] + [(#\₇) "$_7$"] + [(#\₈) "$_8$"] + [(#\₉) "$_9$"] [(#\‘) "{`}"] [(#\’) "{'}"] [(#\“) "{``}"] diff --git a/scribble-lib/scribble/lncs/lang.rkt b/scribble-lib/scribble/lncs/lang.rkt index 11ab79ba..59c98b2b 100644 --- a/scribble-lib/scribble/lncs/lang.rkt +++ b/scribble-lib/scribble/lncs/lang.rkt @@ -63,8 +63,8 @@ (unless (or (not (path? cls-file)) (file-exists? cls-file)) (log-error (format "File not found: ~a" cls-file)) - (define site "ftp.springer.de") - (define path "pub/tex/latex/llncs/latex2e") + (define site "ftp.springernature.com") + (define path "cs-proceeding/llncs") (define file "llncs2e.zip") (unless (directory-exists? (find-system-path 'addon-dir)) (make-directory (find-system-path 'addon-dir))) diff --git a/scribble-lib/scribble/lncs/lncs.css b/scribble-lib/scribble/lncs/lncs.css new file mode 100644 index 00000000..c86c2f58 --- /dev/null +++ b/scribble-lib/scribble/lncs/lncs.css @@ -0,0 +1,13 @@ +/* Support for styles in scribble/lncs */ + +.SAuthorPlace, .SAuthorEmail, +.SConferenceInfo, .SCopyrightYear, .SCopyrightData, +.Sdoi, .SPexclusivelicense, +.SCategory, .SCategoryPlus, .STerms, .SKeywords { + display: none; +} + +.SSubtitle { + display: block; + font-size: smaller; +} diff --git a/scribble-lib/scribble/private/lang-parameters.rkt b/scribble-lib/scribble/private/lang-parameters.rkt new file mode 100644 index 00000000..dc4686cf --- /dev/null +++ b/scribble-lib/scribble/private/lang-parameters.rkt @@ -0,0 +1,19 @@ +#lang racket/base + +(provide (all-defined-out)) + +;; Some latex formats have different requirements on how +;; figures, citations, etc. are displayed. This allows different +;; scribble langs to handle them. + +;; `Figure` string that appears in front of a figure caption +(define default-figure-label-text (make-parameter "Figure")) + +;; Seperator string between figure counter and caption +(define default-figure-label-sep (make-parameter ": ")) + +;; Style for the figure caption +(define default-figure-caption-style (make-parameter #f)) + +;; Style for the number in the figure counter +(define default-figure-counter-style (make-parameter #f)) diff --git a/scribble-lib/scribble/private/manual-proc.rkt b/scribble-lib/scribble/private/manual-proc.rkt index a92b3691..4fc93e10 100644 --- a/scribble-lib/scribble/private/manual-proc.rkt +++ b/scribble-lib/scribble/private/manual-proc.rkt @@ -1039,12 +1039,13 @@ #'(with-togetherable-racket-variables () () - (*defthing kind.kind - lt.expr - (list (or id-expr (quote-syntax/loc id))) (list 'id) #f - (list (racketblock0 result)) - (lambda () (list desc ...)) - (list (result-value value.value))))])) + (let ([id-val id-expr]) + (*defthing kind.kind + lt.expr + (list (or id-val (quote-syntax/loc id))) (list (if (identifier? id-val) (syntax-e id-val) 'id)) #f + (list (racketblock0 result)) + (lambda () (list desc ...)) + (list (result-value value.value)))))])) (define-syntax (defthing* stx) (syntax-parse stx diff --git a/scribble-lib/scribble/private/manual-scheme.rkt b/scribble-lib/scribble/private/manual-scheme.rkt index 67c42584..74023388 100644 --- a/scribble-lib/scribble/private/manual-scheme.rkt +++ b/scribble-lib/scribble/private/manual-scheme.rkt @@ -247,12 +247,16 @@ (define-for-syntax (strip-ellipsis-context a) (define a-ellipsis (datum->syntax a '...)) + (define a-ellipsis+ (datum->syntax a '...+)) (let loop ([a a]) (cond [(identifier? a) - (if (free-identifier=? a a-ellipsis #f) - (datum->syntax #f '... a a) - a)] + (cond + [(free-identifier=? a a-ellipsis #f) + (datum->syntax #f '... a a)] + [(free-identifier=? a a-ellipsis+ #f) + (datum->syntax #f '...+ a a)] + [else a])] [(syntax? a) (datum->syntax a (loop (syntax-e a)) a a)] [(pair? a) diff --git a/scribble-lib/scribble/scribble.tex b/scribble-lib/scribble/scribble.tex index d5c30ec8..30ae3d36 100644 --- a/scribble-lib/scribble/scribble.tex +++ b/scribble-lib/scribble/scribble.tex @@ -340,10 +340,10 @@ \newcommand{\Ssubsubsubsubsectionstar}[1]{\Ssubsubsubsectionstar{#1}} % "starx" means unnumbered but in ToC: -\newcommand{\Spartstarx}[2]{\Spartstar{#2}\addcontentsline{toc}{part}{#1}} -\newcommand{\Ssectionstarx}[2]{\Ssectionstar{#2}\addcontentsline{toc}{section}{#1}} -\newcommand{\Ssubsectionstarx}[2]{\Ssubsectionstar{#2}\addcontentsline{toc}{subsection}{#1}} -\newcommand{\Ssubsubsectionstarx}[2]{\Ssubsubsectionstar{#2}\addcontentsline{toc}{subsubsection}{#1}} +\newcommand{\Spartstarx}[2]{\Spartstar{#2}\phantomsection\addcontentsline{toc}{part}{#1}} +\newcommand{\Ssectionstarx}[2]{\Ssectionstar{#2}\phantomsection\addcontentsline{toc}{section}{#1}} +\newcommand{\Ssubsectionstarx}[2]{\Ssubsectionstar{#2}\phantomsection\addcontentsline{toc}{subsection}{#1}} +\newcommand{\Ssubsubsectionstarx}[2]{\Ssubsubsectionstar{#2}\phantomsection\addcontentsline{toc}{subsubsection}{#1}} \newcommand{\Ssubsubsubsectionstarx}[2]{\Ssubsubsubsectionstar{#2}} \newcommand{\Ssubsubsubsubsectionstarx}[2]{\Ssubsubsubsubsectionstar{#2}} diff --git a/scribble-lib/scriblib/figure.rkt b/scribble-lib/scriblib/figure.rkt index 968637b4..eb4de48b 100644 --- a/scribble-lib/scriblib/figure.rkt +++ b/scribble-lib/scriblib/figure.rkt @@ -6,7 +6,8 @@ scribble/html-properties scribble/latex-properties setup/main-collects - "private/counter.rkt") + "private/counter.rkt" + scribble/private/lang-parameters) (provide figure figure* @@ -75,11 +76,9 @@ figure-style-extras)) c)) -(define default-label-sep ": ") - (define (figure tag caption #:style [style center-figure-style] - #:label-sep [label-sep default-label-sep] + #:label-sep [label-sep (default-figure-label-sep)] #:label-style [label-style #f] #:continue? [continue? #f] . content) @@ -87,7 +86,7 @@ (define (figure-here tag caption #:style [style center-figure-style] - #:label-sep [label-sep default-label-sep] + #:label-sep [label-sep (default-figure-label-sep)] #:label-style [label-style #f] #:continue? [continue? #f] . content) @@ -95,14 +94,14 @@ (define (figure* tag caption #:style [style center-figure-style] - #:label-sep [label-sep default-label-sep] + #:label-sep [label-sep (default-figure-label-sep)] #:label-style [label-style #f] #:continue? [continue? #f] . content) (figure-helper figuremulti-style style label-sep label-style tag caption content continue?)) (define (figure** tag caption #:style [style center-figure-style] - #:label-sep [label-sep default-label-sep] + #:label-sep [label-sep (default-figure-label-sep)] #:label-style [label-style #f] #:continue? [continue? #f] . content) @@ -124,7 +123,7 @@ #:label-sep label-sep #:label-style label-style #:continue? continue?) - caption))))))) + (make-element (default-figure-caption-style) caption)))))))) (define figures (new-counter "figure" #:target-wrap make-figure-target @@ -134,7 +133,7 @@ #:label-sep [label-sep ": "] #:label-style [label-style #f]) (counter-target figures tag - "Figure" + (default-figure-label-text) #:label-suffix (list (if continue? " (continued)" "") label-sep) #:label-style label-style #:target-style figure-target-style diff --git a/scribble-lib/scriblib/footnote.css b/scribble-lib/scriblib/footnote.css index 5d9ebcdf..d406942e 100644 --- a/scribble-lib/scriblib/footnote.css +++ b/scribble-lib/scriblib/footnote.css @@ -3,7 +3,8 @@ position: relative; float: right; left: 2em; - height: 0em; + height: auto; + clear: right; width: 13em; margin: 0em -13em 0em 0em; } diff --git a/scribble-lib/scriblib/private/counter.rkt b/scribble-lib/scriblib/private/counter.rkt index 35dc1b52..69a3dc00 100644 --- a/scribble-lib/scriblib/private/counter.rkt +++ b/scribble-lib/scriblib/private/counter.rkt @@ -1,6 +1,7 @@ #lang racket/base (require scribble/core - scribble/decode) + scribble/decode + scribble/private/lang-parameters) (provide new-counter counter-target @@ -38,7 +39,8 @@ (let ([n (resolve-get part ri (tag->counter-tag counter tag "value"))]) (cons (make-element label-style - (let ([l (cons (format "~a" n) (decode-content (list label-suffix)))]) + (let ([l (cons (make-element (default-figure-counter-style) (format "~a" n)) + (decode-content (list label-suffix)))]) (if label (list* label 'nbsp l) l))) diff --git a/scribble-test/tests/scribble/docs/stxobj.txt b/scribble-test/tests/scribble/docs/stxobj.txt index bab5ef76..454e6d96 100644 --- a/scribble-test/tests/scribble/docs/stxobj.txt +++ b/scribble-test/tests/scribble/docs/stxobj.txt @@ -1,2 +1,2 @@ - > (syntax-e #'(+ 1 2)) - '(# # #) + > (syntax-e #'(+ 1 2)) + '(# # #) diff --git a/scribble-test/tests/scribble/reader.rkt b/scribble-test/tests/scribble/reader.rkt index 5b225963..fa1f69e5 100644 --- a/scribble-test/tests/scribble/reader.rkt +++ b/scribble-test/tests/scribble/reader.rkt @@ -687,30 +687,30 @@ foo --- ;; -------------------- errors --- -( -@error-> "inp:1:0: read: expected a `)' to close `('" ; check -@error-> +( -@error-> "inp:1:0: read: expected a `)` to close `(`" ; check -@error-> --- -@foo{ -@error-> #rx":1:0: missing closing `}'$" +@foo{ -@error-> #rx":1:0: missing closing `}`$" --- -\foo{ -\error-> #rx":1:0: missing closing `}'$" +\foo{ -\error-> #rx":1:0: missing closing `}`$" --- -@foo{@bar{ -@error-> #rx":1:5: missing closing `}'$" +@foo{@bar{ -@error-> #rx":1:5: missing closing `}`$" --- -\foo{\bar{ -\error-> #rx":1:5: missing closing `}'$" +\foo{\bar{ -\error-> #rx":1:5: missing closing `}`$" --- -@foo{@bar{} -@error-> #rx":1:0: missing closing `}'$" +@foo{@bar{} -@error-> #rx":1:0: missing closing `}`$" --- -@foo{@bar|{} -@error-> #rx":1:5: missing closing `}\\|'$" +@foo{@bar|{} -@error-> #rx":1:5: missing closing `}\\|`$" --- -@foo{@bar|-{} -@error-> #rx":1:5: missing closing `}-\\|'$" +@foo{@bar|-{} -@error-> #rx":1:5: missing closing `}-\\|`$" --- -@foo{@bar|-{} -@error-> #rx":1:5: missing closing `}-\\|'$" +@foo{@bar|-{} -@error-> #rx":1:5: missing closing `}-\\|`$" --- -\foo{\bar|-{} -\error-> #rx":1:5: missing closing `}-\\|'$" +\foo{\bar|-{} -\error-> #rx":1:5: missing closing `}-\\|`$" --- -@foo{@" -@error-> #rx":1:6: read: expected a closing '\"'$" +@foo{@" -@error-> #rx":1:6: read-syntax: expected a closing `\"`$" ;; " <-- (balance this file) --- -\foo{\" -\error-> #rx":1:6: read: expected a closing '\"'$" +\foo{\" -\error-> #rx":1:6: read-syntax: expected a closing `\"`$" --- @|1 2| -@error-> diff --git a/scribble-text-lib/scribble/text/output.rkt b/scribble-text-lib/scribble/text/output.rkt index 90eb78da..ed10c86d 100644 --- a/scribble-text-lib/scribble/text/output.rkt +++ b/scribble-text-lib/scribble/text/output.rkt @@ -3,6 +3,7 @@ racket/contract/base) (provide + special? outputable/c (contract-out [output (->* (outputable/c) (output-port?) void?)]))