Scrible latex output: fix (mostly) interaction of tables and itemization; DrScheme doc improvements
svn: r15072
This commit is contained in:
parent
ab8d99f5b4
commit
e96941407c
|
@ -252,10 +252,9 @@
|
||||||
[index? (eq? 'index (table-style t))]
|
[index? (eq? 'index (table-style t))]
|
||||||
[tableform
|
[tableform
|
||||||
(cond [index? "list"]
|
(cond [index? "list"]
|
||||||
[(and (not (current-table-mode)) (not inline-table?))
|
[(not (current-table-mode)) "bigtabular"]
|
||||||
"bigtabular"]
|
|
||||||
[else "tabular"])]
|
[else "tabular"])]
|
||||||
[opt (cond [(equal? tableform "bigtabular") "[l]"]
|
[opt (cond [(equal? tableform "bigtabular") ""]
|
||||||
[(equal? tableform "tabular") "[t]"]
|
[(equal? tableform "tabular") "[t]"]
|
||||||
[else ""])]
|
[else ""])]
|
||||||
[flowss (if index? (cddr (table-flowss t)) (table-flowss t))]
|
[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")]
|
[index? (printf "\\begin{list}{}{\\parsep=0pt \\itemsep=1pt \\leftmargin=2ex \\itemindent=-2ex}\n")]
|
||||||
[inline? (void)]
|
[inline? (void)]
|
||||||
[else
|
[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))
|
(if (string? (table-style t))
|
||||||
(format "\\begin{~a}" (table-style t))
|
(format "\\begin{~a}" (table-style t))
|
||||||
"")
|
"")
|
||||||
tableform
|
tableform
|
||||||
opt
|
opt
|
||||||
|
(if (equal? tableform "bigtabular")
|
||||||
|
"\\bigtableleftpad"
|
||||||
|
"")
|
||||||
(string-append*
|
(string-append*
|
||||||
(map (lambda (i align)
|
(map (lambda (i align)
|
||||||
(format "~a@{}"
|
(format "~a@{}"
|
||||||
|
@ -397,7 +402,7 @@
|
||||||
(eq? (styled-itemization-style t) 'ordered))
|
(eq? (styled-itemization-style t) 'ordered))
|
||||||
"enumerate"
|
"enumerate"
|
||||||
"itemize"))])
|
"itemize"))])
|
||||||
(printf "\\begin{~a}" mode)
|
(printf "\\begin{~a}\\atItemizeStart" mode)
|
||||||
(for ([flow (itemization-flows t)])
|
(for ([flow (itemization-flows t)])
|
||||||
(printf "\n\n\\~a" (if style-str
|
(printf "\n\n\\~a" (if style-str
|
||||||
(format "~aItem{" style-str)
|
(format "~aItem{" style-str)
|
||||||
|
@ -469,6 +474,9 @@
|
||||||
[(#\# #\% #\& #\$) (format "\\~a" c)]
|
[(#\# #\% #\& #\$) (format "\\~a" c)]
|
||||||
[(#\uA0) "~"]
|
[(#\uA0) "~"]
|
||||||
[(#\uDF) "{\\ss}"]
|
[(#\uDF) "{\\ss}"]
|
||||||
|
[else
|
||||||
|
(if ((char->integer c) . > . 127)
|
||||||
|
(case c
|
||||||
[(#\u039A) "K"] ; kappa
|
[(#\u039A) "K"] ; kappa
|
||||||
[(#\u0391) "A"] ; alpha
|
[(#\u0391) "A"] ; alpha
|
||||||
[(#\u039F) "O"] ; omicron
|
[(#\u039F) "O"] ; omicron
|
||||||
|
@ -485,8 +493,133 @@
|
||||||
[(#\u03BC) "$\\mu$"]
|
[(#\u03BC) "$\\mu$"]
|
||||||
[(#\u03C0) "$\\pi$"]
|
[(#\u03C0) "$\\pi$"]
|
||||||
[(#\∞) "$\\infty$"]
|
[(#\∞) "$\\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}"]
|
[(#\à) "\\`{a}"]
|
||||||
[else c])))
|
[else c])
|
||||||
|
c)])))
|
||||||
(loop (add1 i)))))))
|
(loop (add1 i)))))))
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
\parskip=10pt
|
\parskip=10pt
|
||||||
\parindent=0pt
|
\parindent=0pt
|
||||||
|
\partopsep=0pt
|
||||||
|
|
||||||
% Adjust margins to match HTML width for
|
% Adjust margins to match HTML width for
|
||||||
% fixed-width font
|
% fixed-width font
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
\renewcommand{\rmdefault}{ptm}
|
\renewcommand{\rmdefault}{ptm}
|
||||||
\usepackage{stabular}
|
\usepackage{stabular}
|
||||||
\usepackage{relsize}
|
\usepackage{relsize}
|
||||||
|
\usepackage{wasysym}
|
||||||
|
\usepackage{skull}
|
||||||
\usepackage[htt]{hyphenat}
|
\usepackage[htt]{hyphenat}
|
||||||
\usepackage[usenames,dvipsnames]{color}
|
\usepackage[usenames,dvipsnames]{color}
|
||||||
\hypersetup{bookmarks=true,bookmarksopen=true,bookmarksnumbered=true}
|
\hypersetup{bookmarks=true,bookmarksopen=true,bookmarksnumbered=true}
|
||||||
|
@ -77,12 +79,21 @@
|
||||||
|
|
||||||
\newcommand{\bibentry}[1]{\parbox[t]{0.8\linewidth}{#1}}
|
\newcommand{\bibentry}[1]{\parbox[t]{0.8\linewidth}{#1}}
|
||||||
|
|
||||||
\newenvironment{bigtabular}{\vspace{0ex}
|
% stabular seems to be the lesser of all page-breaking table evironments
|
||||||
|
\newenvironment{bigtabular}{\begin{stabular}}{\end{stabular}}
|
||||||
\begin{stabular}}{\end{stabular}
|
% used to keep the horizontal line for a definition on the same page:
|
||||||
|
|
||||||
\vspace{0ex}}
|
|
||||||
\newcommand{\SEndFirstHead}[0]{ \nopagebreak \\ }
|
\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{schemeblock}{}{}
|
||||||
\newenvironment{defmodule}{}{}
|
\newenvironment{defmodule}{}{}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
The DrScheme window has three parts: a row of buttons at the top, two
|
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.
|
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
|
The top editing panel, called the @deftech{definitions window}, is for
|
||||||
defining programs. The above figure shows a program that defines the
|
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:
|
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
|
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
|
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]
|
displayed at the left of the button bar, and the value of @scheme[n]
|
||||||
is displayed in the stack view pane.
|
is displayed in the stack view pane.
|
||||||
|
|
||||||
@image["debugger1.png"]
|
@centerline{@image[#:scale 0.5 "debugger1.png"]}
|
||||||
|
|
||||||
@subsection{Debugging Multiple Files}
|
@subsection{Debugging Multiple Files}
|
||||||
|
|
||||||
|
|
|
@ -184,8 +184,8 @@ These are the currently supported macro names and the keys they map into:
|
||||||
(let ([macro (list-ref line 0)]
|
(let ([macro (list-ref line 0)]
|
||||||
[char (list-ref line 1)])
|
[char (list-ref line 1)])
|
||||||
(list (make-flow (list (make-paragraph (list (index (format "\\~a keyboard shortcut" macro))
|
(list (make-flow (list (make-paragraph (list (index (format "\\~a keyboard shortcut" macro))
|
||||||
(tt (format "\\~a" macro))))))
|
(tt (format " \\~a" macro))))))
|
||||||
(make-flow (list (make-paragraph (list char)))))))
|
(make-flow (list (make-paragraph (list (hspace 1) char)))))))
|
||||||
tex-shortcut-table))
|
tex-shortcut-table))
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user