Scrible latex output: fix (mostly) interaction of tables and itemization; DrScheme doc improvements

svn: r15072
This commit is contained in:
Matthew Flatt 2009-06-04 03:20:39 +00:00
parent ab8d99f5b4
commit e96941407c
5 changed files with 178 additions and 33 deletions

View File

@ -252,10 +252,9 @@
[index? (eq? 'index (table-style t))]
[tableform
(cond [index? "list"]
[(and (not (current-table-mode)) (not inline-table?))
"bigtabular"]
[(not (current-table-mode)) "bigtabular"]
[else "tabular"])]
[opt (cond [(equal? tableform "bigtabular") "[l]"]
[opt (cond [(equal? tableform "bigtabular") ""]
[(equal? tableform "tabular") "[t]"]
[else ""])]
[flowss (if index? (cddr (table-flowss t)) (table-flowss t))]
@ -285,12 +284,18 @@
[index? (printf "\\begin{list}{}{\\parsep=0pt \\itemsep=1pt \\leftmargin=2ex \\itemindent=-2ex}\n")]
[inline? (void)]
[else
(printf "~a\\begin{~a}~a{@{}~a}\n~a"
(printf "~a~a\\begin{~a}~a{@{~a}~a}\n~a"
(if (and inline-table? (equal? tableform "bigtabular"))
"\\bigtableinlinecorrect"
"")
(if (string? (table-style t))
(format "\\begin{~a}" (table-style t))
"")
tableform
opt
(if (equal? tableform "bigtabular")
"\\bigtableleftpad"
"")
(string-append*
(map (lambda (i align)
(format "~a@{}"
@ -397,7 +402,7 @@
(eq? (styled-itemization-style t) 'ordered))
"enumerate"
"itemize"))])
(printf "\\begin{~a}" mode)
(printf "\\begin{~a}\\atItemizeStart" mode)
(for ([flow (itemization-flows t)])
(printf "\n\n\\~a" (if style-str
(format "~aItem{" style-str)
@ -469,6 +474,9 @@
[(#\# #\% #\& #\$) (format "\\~a" c)]
[(#\uA0) "~"]
[(#\uDF) "{\\ss}"]
[else
(if ((char->integer c) . > . 127)
(case c
[(#\u039A) "K"] ; kappa
[(#\u0391) "A"] ; alpha
[(#\u039F) "O"] ; omicron
@ -485,8 +493,133 @@
[(#\u03BC) "$\\mu$"]
[(#\u03C0) "$\\pi$"]
[(#\∞) "$\\infty$"]
[(#\⇓) "$\\Downarrow$"]
[(#\↖) "$\\nwarrow$"]
[(#\↓) "$\\downarrow$"]
[(#\⇒) "$\\Rightarrow$"]
[(#\→) "$\\rightarrow$"]
[(#\↘) "$\\searrow$"]
[(#\↙) "$\\swarrow$"]
[(#\←) "$\\leftarrow$"]
[(#\↑) "$\\uparrow$"]
[(#\⇐) "$\\Leftarrow$"]
[(#\) "$\\longrightarrow$"]
[(#\⇑) "$\\Uparrow$"]
[(#\⇔) "$\\Leftrightarrow$"]
[(#\↕) "$\\updownarrow$"]
[(#\↔) "$\\leftrightarrow$"]
[(#\↗) "$\\nearrow$"]
[(#\⇕) "$\\Updownarrow$"]
[(#\א) "$\\aleph$"]
[(#\) "$\\prime$"]
[(#\∅) "$\\emptyset$"]
[(#\∇) "$\\nabla$"]
[(#\♦) "$\\diamondsuit$"]
[(#\♠) "$\\spadesuit$"]
[(#\♣) "$\\clubsuit$"]
[(#\♥) "$\\heartsuit$"]
[(#\♯) "$\\sharp$"]
[(#\♭) "$\\flat$"]
[(#\♮) "$\\natural$"]
[(#\√) "$\\surd$"]
[(#\¬) "$\\neg$"]
[(#\△) "$\\triangle$"]
[(#\∀) "$\\forall$"]
[(#\∃) "$\\exists$"]
[(#\∘) "$\\circ$"]
[(#\θ) "$\\theta$"]
[(#\τ) "$\\tau$"]
[(#\υ) "$\\upsilon$"]
[(#\φ) "$\\phi$"]
[(#\δ) "$\\delta$"]
[(#\ρ) "$\\rho$"]
[(#\ε) "$\\epsilon$"]
[(#\χ) "$\\chi$"]
[(#\ψ) "$\\psi$"]
[(#\ζ) "$\\zeta$"]
[(#\ν) "$\\nu$"]
[(#\ω) "$\\omega$"]
[(#\η) "$\\eta$"]
[(#\ξ) "$\\xi$"]
[(#\Γ) "$\\Gamma$"]
[(#\Ψ) "$\\Psi$"]
[(#\∆) "$\\Delta$"]
[(#\Ξ) "$\\Xi$"]
[(#\Υ) "$\\Upsilon$"]
[(#\Ω) "$\\Omega$"]
[(#\Θ) "$\\Theta$"]
[(#\Π) "$\\Pi$"]
[(#\Φ) "$\\Phi$"]
[(#\±) "$\\pm$"]
[(#\∩) "$\\cap$"]
[(#\◇) "$\\diamond$"]
[(#\⊕) "$\\oplus$"]
[(#\∓) "$\\mp$"]
[(#\) "$\\cup$"]
[(#\△) "$\\bigtriangleup$"]
[(#\⊖) "$\\ominus$"]
[(#\×) "$\\times$"]
[(#\⊎) "$\\uplus$"]
[(#\▽) "$\\bigtriangledown$"]
[(#\⊗) "$\\otimes$"]
[(#\÷) "$\\div$"]
[(#\⊓) "$\\sqcap$"]
[(#\▹) "$\\triangleleft$"]
[(#\⊘) "$\\oslash$"]
[(#\) "$\\ast$"]
[(#\⊔) "$\\sqcup$"]
[(#\) "$\\vee$"]
[(#\∧) "$\\wedge$"]
[(#\◃) "$\\triangleright$"]
[(#\⊙) "$\\odot$"]
[(#\★) "$\\star$"]
[(#\†) "$\\dagger$"]
[(#\•) "$\\bullet$"]
[(#\‡) "$\\ddagger$"]
[(#\≀) "$\\wr$"]
[(#\⨿) "$\\amalg$"]
[(#\≤) "$\\leq$"]
[(#\≥) "$\\geq$"]
[(#\≡) "$\\equiv$"]
[(#\⊨) "$\\models$"]
[(#\≺) "$\\prec$"]
[(#\≻) "$\\succ$"]
[(#\) "$\\sim$"]
[(#\⊥) "$\\perp$"]
[(#\≼) "$\\preceq$"]
[(#\≽) "$\\succeq$"]
[(#\≃) "$\\simeq$"]
[(#\≪) "$\\ll$"]
[(#\≫) "$\\gg$"]
[(#\≍) "$\\asymp$"]
[(#\∥) "$\\parallel$"]
[(#\⊂) "$\\subset$"]
[(#\⊃) "$\\supset$"]
[(#\≈) "$\\approx$"]
[(#\⋈) "$\\bowtie$"]
[(#\⊆) "$\\subseteq$"]
[(#\⊇) "$\\supseteq$"]
[(#\≌) "$\\cong$"]
[(#\⊏) "$\\sqsubset$"]
[(#\⊐) "$\\sqsupset$"]
[(#\≠) "$\\neq$"]
[(#\⌣) "$\\smile$"]
[(#\⊑) "$\\sqsubseteq$"]
[(#\⊒) "$\\sqsupseteq$"]
[(#\≐) "$\\doteq$"]
[(#\⌢) "$\\frown$"]
[(#\∈) "$\\in$"]
[(#\∋) "$\\ni$"]
[(#\∝) "$\\propto$"]
[(#\⊢) "$\\vdash$"]
[(#\⊣) "$\\dashv$"]
[(#\☠) "$\\skull$"]
[(#\☺) "$\\smiley$"]
[(#\☻) "$\\blacksmiley$"]
[(#\☹) "$\\frownie$"]
[(#\à) "\\`{a}"]
[else c])))
[else c])
c)])))
(loop (add1 i)))))))
;; ----------------------------------------

View File

@ -3,6 +3,7 @@
\parskip=10pt
\parindent=0pt
\partopsep=0pt
% Adjust margins to match HTML width for
% fixed-width font

View File

@ -5,6 +5,8 @@
\renewcommand{\rmdefault}{ptm}
\usepackage{stabular}
\usepackage{relsize}
\usepackage{wasysym}
\usepackage{skull}
\usepackage[htt]{hyphenat}
\usepackage[usenames,dvipsnames]{color}
\hypersetup{bookmarks=true,bookmarksopen=true,bookmarksnumbered=true}
@ -77,12 +79,21 @@
\newcommand{\bibentry}[1]{\parbox[t]{0.8\linewidth}{#1}}
\newenvironment{bigtabular}{\vspace{0ex}
\begin{stabular}}{\end{stabular}
\vspace{0ex}}
% stabular seems to be the lesser of all page-breaking table evironments
\newenvironment{bigtabular}{\begin{stabular}}{\end{stabular}}
% used to keep the horizontal line for a definition on the same page:
\newcommand{\SEndFirstHead}[0]{ \nopagebreak \\ }
% attempts to correct weirdness when a table is the first thing in
% an itemization:
\newcommand{\bigtableinlinecorrect}[0]{~
\vspace{-\baselineskip}\vspace{\parskip}}
% used to indent the table correctly in an itemization, since that's
% one of the things stabular gets wrong
\newlength{\stabLeft}
\newcommand{\bigtableleftpad}{\hspace{\stabLeft}}
\newcommand{\atItemizeStart}[0]{\addtolength{\stabLeft}{\labelsep}
\addtolength{\stabLeft}{\labelwidth}}
\newenvironment{schemeblock}{}{}
\newenvironment{defmodule}{}{}

View File

@ -16,7 +16,7 @@
The DrScheme window has three parts: a row of buttons at the top, two
editing panels in the middle, and a status line at the bottom.
@image["example.png"]
@centerline{@image[#:scale 0.7 "example.png"]}
The top editing panel, called the @deftech{definitions window}, is for
defining programs. The above figure shows a program that defines the
@ -404,7 +404,7 @@ expressions and results. For example, evaluating
in the interactions window produces a special box for entering input:
@image["io.png"]
@centerline{@image[#:scale 0.6 "io.png"]}
Type a number into the box and hit Enter, and that number becomes the
result of the @scheme[(read)] expression. Once text is submitted for
@ -686,7 +686,7 @@ execution is currently paused. The expression's return value is
displayed at the left of the button bar, and the value of @scheme[n]
is displayed in the stack view pane.
@image["debugger1.png"]
@centerline{@image[#:scale 0.5 "debugger1.png"]}
@subsection{Debugging Multiple Files}

View File

@ -185,7 +185,7 @@ These are the currently supported macro names and the keys they map into:
[char (list-ref line 1)])
(list (make-flow (list (make-paragraph (list (index (format "\\~a keyboard shortcut" macro))
(tt (format " \\~a" macro))))))
(make-flow (list (make-paragraph (list char)))))))
(make-flow (list (make-paragraph (list (hspace 1) char)))))))
tex-shortcut-table))
}
]