diff --git a/collects/scribble/latex-properties.rkt b/collects/scribble/latex-properties.rkt index 5ad7a87c37..58e56c1dc3 100644 --- a/collects/scribble/latex-properties.rkt +++ b/collects/scribble/latex-properties.rkt @@ -6,4 +6,5 @@ [tex-addition ([path (or/c path-string? (cons/c 'collects (listof bytes?)) bytes?)])] [latex-defaults ([prefix (or/c bytes? path-string? (cons/c 'collects (listof bytes?)))] [style (or/c bytes? path-string? (cons/c 'collects (listof bytes?)))] - [extra-files (listof (or/c path-string? (cons/c 'collects (listof bytes?))))])]) + [extra-files (listof (or/c path-string? (cons/c 'collects (listof bytes?))))])] + [command-extras ([arguments (listof string?)])]) diff --git a/collects/scribble/latex-render.rkt b/collects/scribble/latex-render.rkt index 5388286491..f12ebf1154 100644 --- a/collects/scribble/latex-render.rkt +++ b/collects/scribble/latex-render.rkt @@ -418,6 +418,10 @@ (color->string (background-color-property-color v))) (loop (cdr l) tt?) (printf "}")] + [(command-extras? (car l)) + (loop (cdr l) tt?) + (for ([l (in-list (command-extras-arguments (car l)))]) + (printf "{~a}" l))] [else (loop (cdr l) tt?)])))))) (when part-label? (printf "}")) diff --git a/collects/scribblings/scribble/core.scrbl b/collects/scribblings/scribble/core.scrbl index 38112b451e..87ab530624 100644 --- a/collects/scribblings/scribble/core.scrbl +++ b/collects/scribblings/scribble/core.scrbl @@ -823,6 +823,9 @@ The following @tech{style properties} are currently recognized: name} is a string, render the elements content exactly (without escapes).} + @item{@racket[command-extras] structure --- For Latex output, + adds strings as arguments to the Latex command.} + ]} @@ -1502,14 +1505,7 @@ rendering. See also @racketmodname[scribble/latex-prefix].} -@defstruct[latex-auto-extra-files ([paths (listof (or/c path-string? - (cons/c 'collects (listof bytes?))))])]{ +@defstruct[command-extras ([arguments (listof string?)])]{ -Used as a @tech{style property} for the main @racket[part] of a -document to supply extra files needed to build the document via the -@exec{scribble} command-line tool (for @DFlag{latex} and @DFlag{pdf} -mode). - -Languages (used with @hash-lang[]) like -@racketmodname[scribble/sigplan] add this property to a document to specify -appropriate extra files.} +Used as a @tech{style property} on an @racket[element] to add extra +arguments to the element's command in Latex output.} diff --git a/doc/release-notes/racket/HISTORY.txt b/doc/release-notes/racket/HISTORY.txt index 95708cdd41..b2a697b5ea 100644 --- a/doc/release-notes/racket/HISTORY.txt +++ b/doc/release-notes/racket/HISTORY.txt @@ -1,5 +1,6 @@ Version 5.3.2.2 Added file-truncate +scribble/latex-properties: added command-extras Version 5.3.2.1 srfi/19: made compatible with date* structs, produces