diff --git a/collects/scribble/html-properties.rkt b/collects/scribble/html-properties.rkt index 0644a511..7d384f0e 100644 --- a/collects/scribble/html-properties.rkt +++ b/collects/scribble/html-properties.rkt @@ -1,6 +1,7 @@ #lang scheme/base (require "private/provide-structs.rkt" - racket/contract/base) + racket/contract/base + xml/xexpr) (provide-structs [body-id ([value string?])] @@ -15,4 +16,6 @@ [url-anchor ([name string?])] [alt-tag ([name (and/c string? #rx"^[a-zA-Z0-9]+$")])] [attributes ([assoc (listof (cons/c symbol? string?))])] - [column-attributes ([assoc (listof (cons/c symbol? string?))])]) + [column-attributes ([assoc (listof (cons/c symbol? string?))])] + + [head-extra ([xexpr xexpr/c])]) diff --git a/collects/scribble/html-render.rkt b/collects/scribble/html-render.rkt index 4905d6e4..a64d1a3e 100644 --- a/collects/scribble/html-render.rkt +++ b/collects/scribble/html-render.rkt @@ -664,7 +664,7 @@ (copy-port in (current-output-port))))) (parameterize ([xml:empty-tag-shorthand xml:html-empty-tags]) (xml:write-xexpr - `(html () + `(html ,(style->attribs (part-style d)) (head () (meta ([http-equiv "content-type"] [content "text-html; charset=utf-8"])) @@ -686,7 +686,10 @@ (list style-file) style-extra-files)) ,(scribble-js-contents script-file (lookup-path script-file alt-paths)) - ,(xml:comment "[if IE 6]>} tag; this style can be set separately for parts that start different HTML pages, otherwise it is effectively inherited by sub-parts; the default is @racket["scribble-racket-lang.org"], but @exec{setup-plt} installs @racket["doc-racket-lang.org"] as the @tt{id} for any document that it builds.} + @item{@racket[attributes] structure --- Provides additional HTML + attributes for the @tt{} tag when the part corresponds to + its own HTML page.} + + @item{@racket[head-extra] structure --- Provides additional HTML + content for the @tt{} tag when the part corresponds to + its own HTML page.} + ] The @racket[to-collect] field contains @techlink{content} that is @@ -1414,6 +1423,11 @@ Like @racket[latex-defaults], but use for the @DFlag{htmls} modes.} +@defstruct[head-extra ([xexpr xexpr/c])]{ + +For a @racket[part] that corresponds to an HTML page, adds content to +the @tt{} tag.} + @; ---------------------------------------- @section{Latex Style Properties}