diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss index 1f1a0c77b9..060a7f22e8 100644 --- a/collects/scribble/html-render.ss +++ b/collects/scribble/html-render.ss @@ -789,15 +789,13 @@ [style (if (with-attributes? raw-style) (with-attributes-style raw-style) raw-style)]) - (if (and (pair? style) (eq? (car style) 'div-hack)) - `((div ,(cdr style) ,@contents)) - `((,(if (string? style) 'div 'p) - ,(append - (if (string? style) - `([class ,style]) - `()) - (style->attribs raw-style)) - ,@contents))))) + `((,(if (eq? style 'div) 'div 'p) + ,(append + (if (string? style) + `([class ,style]) + `()) + (style->attribs raw-style)) + ,@contents)))) (define/override (render-element e part ri) (cond diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss index 26542cbfe6..bbc5d2febf 100644 --- a/collects/scribble/latex-render.ss +++ b/collects/scribble/latex-render.ss @@ -79,14 +79,24 @@ (define/override (render-paragraph p part ri) (printf "\n\n") - (let ([margin? (and (styled-paragraph? p) - (equal? "refpara" (styled-paragraph-style p)))]) - (when margin? - (printf "\\marginpar{\\footnotesize ")) + (let ([style (and (styled-paragraph? p) + (let ([s (flatten-style + (styled-paragraph-style p))]) + (if (with-attributes? s) + (let ([base (with-attributes-style s)]) + (if (eq? base 'div) + (let ([a (assq 'class (with-attributes-assoc s))]) + (if a + (cdr a) + base)) + base)) + s)))]) + (when (string? style) + (printf "\\~a{" style)) (if (toc-paragraph? p) (printf "\\newpage \\tableofcontents \\newpage") (super render-paragraph p part ri)) - (when margin? (printf "}"))) + (when (string? style) (printf "}"))) (printf "\n\n") null) diff --git a/collects/scribble/scribble.tex b/collects/scribble/scribble.tex index 32120b8240..b5a89457c1 100644 --- a/collects/scribble/scribble.tex +++ b/collects/scribble/scribble.tex @@ -68,6 +68,7 @@ \newcommand{\noborder}[1]{#1} \newcommand{\imageleft}[1]{} % drop it \newcommand{\smaller}[1]{{\footnotesize #1}} +\newcommand{\refpara}[1]{\marginpar{\footnotesize #1}} \newcommand{\titleAndVersion}[2]{\title{#1\\{\normalsize Version #2}}\maketitle} diff --git a/collects/scribblings/gui/editor-canvas-class.scrbl b/collects/scribblings/gui/editor-canvas-class.scrbl index 41f75c2874..00946cdbfd 100644 --- a/collects/scribblings/gui/editor-canvas-class.scrbl +++ b/collects/scribblings/gui/editor-canvas-class.scrbl @@ -150,8 +150,8 @@ Calls a thunk and returns the value. While the thunk is being called, void?])]{ Enables or disables force-focus mode. In force-focus mode, the caret - of the editor displayed in this canvas will always be visible, even - when the canvas does not actually have the keyboard focus. + or selection of the editor displayed in this canvas is drawn even + when the canvas does not have the keyboard focus. } diff --git a/collects/scribblings/main/private/make-search.ss b/collects/scribblings/main/private/make-search.ss index fa9ea602da..7d548443bb 100644 --- a/collects/scribblings/main/private/make-search.ss +++ b/collects/scribblings/main/private/make-search.ss @@ -188,4 +188,5 @@ (script-ref "search.js") (make-render-element null null (lambda (r s i) (make-script user-dir? r s i))))) - (make-styled-paragraph '() '(div-hack [id "plt_search_container"]))))) + (make-styled-paragraph '() + (make-with-attributes 'div '([id . "plt_search_container"])))))) diff --git a/collects/scribblings/reference/threads.scrbl b/collects/scribblings/reference/threads.scrbl index 71d3c1d358..3d8c5d2be4 100644 --- a/collects/scribblings/reference/threads.scrbl +++ b/collects/scribblings/reference/threads.scrbl @@ -12,10 +12,10 @@ When a thread is created, it is placed into the management of the managers added through @scheme[thread-resume]. A thread that has not terminated can be garbage collected (see -@secref["gc-model"]) if it is unreachable and suspended, or if it -is unreachable and blocked on a set of unreachable events through -@scheme[semaphore-wait] or @scheme[semaphore-wait/enable-break], -@scheme[channel-put] or @scheme[channel-get], @scheme[sync] or +@secref["gc-model"]) if it is unreachable and suspended or if it is +unreachable and blocked on only unreachable events through +@scheme[semaphore-wait], @scheme[semaphore-wait/enable-break], +@scheme[channel-put], @scheme[channel-get], @scheme[sync], @scheme[sync/enable-break], or @scheme[thread-wait]. @margin-note{In MrEd, a handler thread for an eventspace is blocked on diff --git a/collects/scribblings/scribble/struct.scrbl b/collects/scribblings/scribble/struct.scrbl index ef77a8cd66..7096bfda2e 100644 --- a/collects/scribblings/scribble/struct.scrbl +++ b/collects/scribblings/scribble/struct.scrbl @@ -330,12 +330,22 @@ A @techlink{paragraph} has a list of @tech{elements}. @defstruct[(styled-paragraph paragraph) ([style any/c])]{ -The @scheme[style] is normally a string that corresponds to a CSS -class for HTML output, in which case a @tt{
} block is generated -instead of a @tt{

} block. A base style can also be a -@scheme[with-attributes] instance to add arbitrary HTML attributes. +The @scheme[style] can be -} +@itemize[ + + @item{A string that corresponds to a CSS class for HTML output or a + macro for Latex output.} + + @item{An instance of @scheme[with-attributes], which combines a base + style with a set of additional HTML attributes.} + + @item{The symbol @scheme['div], which generates @tt{

} HTML + output instead of @tt{

}. For Latex output, a string for a + macro name is extracted from the @scheme['class] mapping of a + @scheme[with-attributes] wrapper, if one is present.} + +]} @defstruct[table ([style any/c] @@ -379,7 +389,7 @@ The @scheme[style] can be any of the following: ]} - @item{an instance of @scheme[with-attributes], which combines a base + @item{An instance of @scheme[with-attributes], which combines a base style with a set of additional HTML attributes.} ]}