adjust Scribble para/div style handling
svn: r10910
This commit is contained in:
parent
949032b03e
commit
4092392e5a
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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"]))))))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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{<div>} block is generated
|
||||
instead of a @tt{<p>} 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{<div>} HTML
|
||||
output instead of @tt{<p>}. 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.}
|
||||
|
||||
]}
|
||||
|
|
Loading…
Reference in New Issue
Block a user