commit 2c8cfdb3e9a2f91a67b0a1296fb1af4c01d8367a
parent 4563ae1d7b559c1b384d3b1b1dba6ad7e78faa45
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Sun, 1 Mar 2009 03:30:44 +0000
Scribble Latex rendering of table styles
svn: r13887
original commit: 955f2e3441d4c6ad7488cdeff1958da73c32e537
Diffstat:
6 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/collects/scribble/latex-render.ss b/collects/scribble/latex-render.ss
@@ -273,7 +273,10 @@
[index? (printf "\\begin{list}{}{\\parsep=0pt \\itemsep=1pt \\leftmargin=2ex \\itemindent=-2ex}\n")]
[inline? (void)]
[else
- (printf "\n\n\\begin{~a}~a{@{}~a}\n~a"
+ (printf "\n\n~a\\begin{~a}~a{@{}~a}\n~a"
+ (if (string? (table-style t))
+ (format "\\begin{~a}" (table-style t))
+ "")
tableform
opt
(string-append*
@@ -325,9 +328,12 @@
(unless (null? (cdr flowss))
(loop (cdr flowss) (cdr row-styles)))))
(unless inline?
- (printf "~a\n\n\\end{~a}\n"
- "" ; (if (equal? tableform "bigtabular") "\n\\\\" "")
- tableform)))))
+ (printf "~a\n\n\\end{~a}~a\n"
+ ""
+ tableform
+ (if (string? (table-style t))
+ (format "\\end{~a}" (table-style t))
+ ""))))))
null)
(define/private (render-table-flow p part ri twidth vstyle)
diff --git a/collects/scribble/private/manual-bib.ss b/collects/scribble/private/manual-bib.ss
@@ -64,7 +64,7 @@
(make-flow
(list
(make-table
- "bibliography"
+ "SBibliography"
(map (lambda (c)
(let ([key (a-bib-entry-key c)]
[val (a-bib-entry-val c)])
diff --git a/collects/scribble/scribble.css b/collects/scribble/scribble.css
@@ -506,7 +506,7 @@ i {
.techinside:hover { color: blue; }
.techoutside:hover>.techinside { color: inherit; }
-.bibliography td {
+.SBibliography td {
vertical-align: text-top;
}
diff --git a/collects/scribble/scribble.tex b/collects/scribble/scribble.tex
@@ -78,6 +78,16 @@
\newenvironment{bigtabular}{\begin{longtable}}{\end{longtable}\vspace{-3ex}}
+\newenvironment{schemeblock}{}{}
+\newenvironment{defmodule}{}{}
+\newenvironment{prototype}{}{}
+\newenvironment{argcontract}{}{}
+\newenvironment{together}{}{}
+\newenvironment{SBibliography}{}{}
+
+\newenvironment{compact}{\begin{itemize}}{\end{itemize}}
+\newcommand{\compactItem}[1]{\item #1}
+
\newcommand{\SecRef}[2]{\S#1 ``#2''}
\newcommand{\sectionhidden}[1]{\section{#1}}
diff --git a/collects/scribblings/scribble/config.scrbl b/collects/scribblings/scribble/config.scrbl
@@ -40,11 +40,12 @@ extend or configure Scribble fall into two groups:
#:style `((css "inbox.css") (tex "inbox.tex"))]{Adding a Style}
When a string is uses as a style in an @scheme[element],
-@scheme[styled-paragraph], @scheme[styled-itemization], or
-@scheme[blockquote], it corresponds to a CSS class for HTML output or
-a Tex macro/environment for Latex output. In Latex output, the string
-is used as a macro name for a @scheme[styled-paragraph] and an
-environment name for a @scheme[itemization] or @scheme[blockquote]. In
+@scheme[styled-paragraph], @scheme[table],
+@scheme[styled-itemization], or @scheme[blockquote], it corresponds to
+a CSS class for HTML output or a Tex macro/environment for Latex
+output. In Latex output, the string is used as a macro name for a
+@scheme[styled-paragraph] and an environment name for a
+@scheme[table], @scheme[itemization], or @scheme[blockquote]. In
addition, for an itemization, the style string is suffixed with
@scheme["Item"] and used as a CSS class or Tex macro name to use for
the itemization's items (in place of @tt{item} in the case of Latex).
diff --git a/collects/scribblings/scribble/struct.scrbl b/collects/scribblings/scribble/struct.scrbl
@@ -399,8 +399,8 @@ The @scheme[style] can be any of the following:
@itemize[
- @item{A string that corresponds to a CSS class for
- HTML output (see @secref["extra-style"]).}
+ @item{A string that corresponds to a CSS class for HTML output or an
+ environment for Latex output (see @secref["extra-style"]).}
@item{@scheme['boxed] to render as a definition.}