From 43dae63615785435f1b05b4efab41954aa0fb6af Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 2 Apr 2008 11:58:49 +0000 Subject: [PATCH] fix PDF doc build svn: r9135 original commit: 81e54f9049587d009ba6e24e6d2e7745314db11e --- collects/scribble/latex-render.ss | 40 ++++++++++++++++--------------- collects/scribble/scribble.tex | 7 ++---- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss index a78cee47..d0be8874 100644 --- a/collects/scribble/latex-render.ss +++ b/collects/scribble/latex-render.ss @@ -51,19 +51,21 @@ (pair? number)) (when (part-style? d 'index) (printf "\\twocolumn\n\\parskip=0pt\n\\addcontentsline{toc}{section}{Index}\n")) - (printf "\\~a~a~a{" - (case (length number) - [(0 1) "sectionNewpage\n\n\\section"] - [(2) "subsection"] - [(3) "subsubsection"] - [else "subsubsection*"]) - (if (part-style? d 'hidden) - "hidden" - "") - (if (and (pair? number) - (not (car number))) - "*" - "")) + (let ([no-number? (and (pair? number) + (not (car number)))]) + (printf "\\~a~a~a{" + (case (length number) + [(0 1) "sectionNewpage\n\n\\section"] + [(2) "subsection"] + [(3) "subsubsection"] + [else "subsubsection*"]) + (if (and (part-style? d 'hidden) + (not no-number?)) + "hidden" + "") + (if no-number? + "*" + ""))) (render-content (part-title-content d) d ri) (printf "}") (when (part-style? d 'index) @@ -193,16 +195,16 @@ (= 1 (length (car (table-flowss t))))) (let ([m (current-table-mode)]) (and m - (equal? "supertabular" (car m)) + (equal? "bigtabular" (car m)) (= 1 (length (car (table-flowss (cadr m))))))))] [tableform (cond [index? "list"] [(and (not (current-table-mode)) (not inline-table?)) - "supertabular"] + "bigtabular"] [else "tabular"])] [opt (cond - [(equal? tableform "supertabular") "[l]"] + [(equal? tableform "bigtabular") "[l]"] [(equal? tableform "tabular") "[t]"] [else ""])] [flowss (if index? @@ -223,8 +225,8 @@ (if boxed? (format "{~a\\begin{picture}(1,0)\\put(0,0){\\line(1,0){1}}\\end{picture}}~a\n\\nopagebreak\n" "\\setlength{\\unitlength}{\\linewidth}" - (if (equal? tableform "supertabular") - "\\supertabline" + (if (equal? tableform "bigtabular") + "\\bigtabline" "\n\n")) "") tableform @@ -274,7 +276,7 @@ (loop (cdr flowss) (cdr row-styles))))) (unless inline? (printf "~a\n\n\\end{~a}\n" - (if (equal? tableform "supertabular") + (if (equal? tableform "bigtabular") "\n\\\\" "") tableform))))) diff --git a/collects/scribble/scribble.tex b/collects/scribble/scribble.tex index b2a6e46e..645a52d1 100644 --- a/collects/scribble/scribble.tex +++ b/collects/scribble/scribble.tex @@ -77,15 +77,12 @@ \newenvironment{leftindent}{\begin{quote}}{\end{quote}} \newenvironment{insetpara}{\begin{quote}}{\end{quote}} -\newenvironment{supertabular}{\begin{longtable}}{\end{longtable}\vspace{-3ex}} -\newcommand{\supertabline}{\vspace{-2ex}} +\newenvironment{bigtabular}{\begin{longtable}}{\end{longtable}\vspace{-3ex}} +\newcommand{\bigtabline}{\vspace{-2ex}} \newcommand{\sectionhidden}[1]{\section{#1}} \newcommand{\subsectionhidden}[1]{\subsection{#1}} \newcommand{\subsubsectionhidden}[1]{\subsubsection{#1}} -\newcommand{\sectionhidden*}[1]{\section*{#1}} -\newcommand{\subsectionhidden*}[1]{\subsection*{#1}} -\newcommand{\subsubsectionhidden*}[1]{\subsubsection*{#1}} % Scribble then generates the following: %