From 45d5558074d24eaf8e67d90fd4872b4b1b149466 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 24 Jun 2007 00:54:29 +0000 Subject: [PATCH] drop x-ref icons in latex output svn: r6724 original commit: 199f4ebc00c8d19f9427e9f3cd7254a96b3c622b --- collects/scribble/html-render.ss | 30 ++++++++++++++++++++++++++++-- collects/scribble/latex-render.ss | 3 +-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss index 54d047d9..5f6b924e 100644 --- a/collects/scribble/html-render.ss +++ b/collects/scribble/html-render.ss @@ -64,6 +64,9 @@ ;; ---------------------------------------- + (define/public (render-toc-view d ht) + null) + (define/public (render-one-part d ht fn number) (parameterize ([current-output-file fn]) (let ([xpr `(html () @@ -78,7 +81,8 @@ (type "text/css") (href "scribble.css") (title "default")))) - (body (div ((class "main")) ,@(render-part d ht))))]) + (body (div ((class "main")) ,@(render-part d ht)) + ,@(render-toc-view d ht)))]) (install-file scribble-css) (xml:write-xml/content (xml:xexpr->xml xpr))))) @@ -263,7 +267,8 @@ (class % (inherit render-one render-one-part - render-content) + render-content + lookup) (define/override (get-suffix) #"") @@ -283,6 +288,27 @@ (error "file name too long (need a tag):" fn)) fn)) + #; + (define/override (render-toc-view d ht) + (let-values ([(top mine) + (let loop ([d d][mine d]) + (let ([p (collected-info-parent (part-collected-info d))]) + (if p + (loop p d) + (values d mine))))]) + `((div ((class "tocview")) + (div ((class "tocviewtitle")) + ,@(render-content (part-title-content top) d ht)) + (ul + ((class "tocviewlist")) + ,@(map (lambda (p) + `(li (a ((href ,(let ([dest (lookup p ht `(part ,(part-tag p)))]) + (from-root (car dest) + (get-dest-directory)))) + (class "tocviewlink")) + ,@(render-content (part-title-content p) d ht)))) + (part-parts top))))))) + (define/override (collect ds fns) (super collect ds (map (lambda (fn) (build-path fn "index.html")) diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss index 2814051c..a81dd751 100644 --- a/collects/scribble/latex-render.ss +++ b/collects/scribble/latex-render.ss @@ -63,8 +63,7 @@ (printf "\\newcommand{\\schemeinput}[1]{\\colorbox{LightGray}{\\hspace{-0.5ex}\\schemeinputcol{#1}\\hspace{-0.5ex}}}\n") (printf "\\newcommand{\\highlighted}[1]{\\colorbox{PaleBlue}{\\hspace{-0.5ex}\\schemeinputcol{#1}\\hspace{-0.5ex}}}\n") (printf "\\newcommand{\\techlink}[1]{#1}\n") - (printf "\\newcommand{\\imageleft}[1]{#1}\n") - (printf "\\newcommand{\\imageright}[1]{#1}\n") + (printf "\\newcommand{\\imageleft}[1]{} % drop it\n") (printf "\\begin{document}\n") (when (part-title-content d) (printf "\\title{")