add `margin-note*' for putting a single-para note in the middle of a para
This commit is contained in:
parent
141a37e50d
commit
18b06a9297
|
@ -495,6 +495,7 @@
|
|||
element?)]
|
||||
[url (-> string? element?)]
|
||||
[margin-note (->* () () #:rest (listof pre-flow?) block?)]
|
||||
[margin-note* (->* () () #:rest (listof pre-content?) element?)]
|
||||
[centered (->* () () #:rest (listof pre-flow?) block?)]
|
||||
[verbatim (->* (string?) (#:indent exact-nonnegative-integer?) #:rest (listof string?) block?)])
|
||||
|
||||
|
@ -528,6 +529,15 @@
|
|||
(make-style "refcontent" null)
|
||||
(decode-flow c)))))))
|
||||
|
||||
(define (margin-note* . c)
|
||||
(make-element
|
||||
(make-style "refelem" null)
|
||||
(make-element
|
||||
(make-style "refcolumn" null)
|
||||
(make-element
|
||||
(make-style "refcontent" null)
|
||||
(decode-content c)))))
|
||||
|
||||
(define (verbatim #:indent [i 0] s . more)
|
||||
(define indent
|
||||
(if (zero? i)
|
||||
|
|
|
@ -152,16 +152,19 @@ table td {
|
|||
/* ---------------------------------------- */
|
||||
/* Margin notes */
|
||||
|
||||
.refpara {
|
||||
.refpara, .refelem {
|
||||
position: relative;
|
||||
float: right;
|
||||
left: 2em;
|
||||
top: -1em;
|
||||
height: 0em;
|
||||
width: 13em;
|
||||
margin: 0em -13em 0em 0em;
|
||||
}
|
||||
|
||||
.refpara {
|
||||
top: -1em;
|
||||
}
|
||||
|
||||
.refcolumn {
|
||||
background-color: #F5F5DC;
|
||||
display: block;
|
||||
|
|
|
@ -101,6 +101,7 @@
|
|||
% refcolumn and refcontent environments also wrap the note,
|
||||
% because they simplify the CSS side.
|
||||
\newcommand{\refpara}[1]{\marginpar{\raggedright \footnotesize #1}}
|
||||
\newcommand{\refelem}[1]{\refpara{#1}}
|
||||
\newenvironment{refcolumn}{}{}
|
||||
\newenvironment{refcontent}{}{}
|
||||
|
||||
|
|
|
@ -168,12 +168,20 @@ address-harvesting robots.}
|
|||
Produces a @tech{nested flow} whose content is centered.}
|
||||
|
||||
|
||||
@defproc[(margin-note [pre-content pre-content?] ...) blockquote?]{
|
||||
@defproc[(margin-note [pre-flow pre-flow?] ...) block?]{
|
||||
|
||||
Produces a @tech{nested flow} that is typeset in the margin, instead
|
||||
of inlined.}
|
||||
|
||||
|
||||
@defproc[(margin-note* [pre-content pre-content?] ...) element?]{
|
||||
|
||||
Produces an @tech{element} that is typeset in the margin, instead of
|
||||
inlined. Unlike @racket[margin-note], @racket[margin-note*] can be
|
||||
used in the middle of a paragraph; at the same time, its content is
|
||||
constrained to form a single paragraph in the margin.}
|
||||
|
||||
|
||||
@defproc[(itemlist [itm item?] ...
|
||||
[#:style style (or/c style? string? symbol? #f) #f])
|
||||
itemization?]{
|
||||
|
|
Loading…
Reference in New Issue
Block a user