latex output, especially margin notes

svn: r6496

original commit: 0b9493032b3a6d55d85c291ad54e84a513d6fb80
This commit is contained in:
Matthew Flatt 2007-06-06 01:20:49 +00:00
parent c049ea87f0
commit 5a0cc3d55f

View File

@ -88,17 +88,24 @@
(define/override (render-paragraph p part ht)
(printf "\n\n")
(let ([margin? (and (styled-paragraph? p)
(equal? "refpara" (styled-paragraph-style p)))])
(when margin?
(printf "\\marginpar{\\footnotesize "))
(if (toc-paragraph? p)
(printf "\\newpage \\tableofcontents \\newpage")
(super render-paragraph p part ht))
(when margin?
(printf "}")))
(printf "\n\n")
null)
(define/override (render-element e part ht)
(when (and (link-element? e)
(let ([part-label? (and (link-element? e)
(pair? (link-element-tag e))
(eq? 'part (car (link-element-tag e)))
(null? (element-content e)))
(null? (element-content e)))])
(when part-label?
(printf "\\S")
(render-content (let ([dest (lookup part ht (link-element-tag e))])
(if dest
@ -106,7 +113,7 @@
(list "???")))
part
ht)
(printf " "))
(printf " ``"))
(let ([style (and (element? e)
(element-style e))]
[wrap (lambda (e s tt?)
@ -138,6 +145,8 @@
(let ([fn (install-file (image-file-path style))])
(printf "\\includegraphics{~a}" fn))]
[else (super render-element e part ht)]))
(when part-label?
(printf "''")))
null)
(define/override (render-table t part ht)