Scribble Latex: change 'boxed to use a blue vertical bar

... to the left of a definition, instead of a horizontal line
before the definition

original commit: 378ca5ffc26168a52a03f46fd83bace49b301ead
This commit is contained in:
Matthew Flatt 2011-08-04 16:16:56 -06:00
parent b039885e46
commit 825e3fcea8
2 changed files with 16 additions and 18 deletions

View File

@ -444,8 +444,7 @@
(let ([m (current-table-mode)])
(and m
(equal? "bigtabular" (car m))
(= 1 (length (car (table-blockss (cadr m))))))))]
[boxline "{\\setlength{\\unitlength}{\\linewidth}\\begin{picture}(1,0)\\put(0,0){\\line(1,0){1}}\\end{picture}}"])
(= 1 (length (car (table-blockss (cadr m))))))))])
(if single-column?
(begin
(when (string? s-name)
@ -480,21 +479,17 @@
"\\bigtableleftpad"
"")
(string-append*
(map (lambda (i cell-style)
(format "~a@{}"
(cond
[(memq 'center (style-properties cell-style)) "c"]
[(memq 'right (style-properties cell-style)) "r"]
[else "l"])))
(car blockss)
(car cell-styless)))
(if boxed?
(if (equal? tableform "bigtabular")
(format "~a \\SEndFirstHead\n" boxline)
(format "\\multicolumn{~a}{@{}l@{}}{~a} \\\\\n"
(length (car blockss))
boxline))
""))])
(let ([l
(map (lambda (i cell-style)
(format "~a@{}"
(cond
[(memq 'center (style-properties cell-style)) "c"]
[(memq 'right (style-properties cell-style)) "r"]
[else "l"])))
(car blockss)
(car cell-styless))])
(if boxed? (cons "@{\\SBoxedLeft}" l) l)))
"")])
(let loop ([blockss blockss]
[cell-styless cell-styless])
(let ([flows (car blockss)]

View File

@ -8,6 +8,7 @@
\usepackage{wasysym}
\usepackage{skull}
\usepackage{textcomp}
\usepackage{framed}
\usepackage[htt]{hyphenat}
\usepackage[usenames,dvipsnames]{color}
\hypersetup{bookmarks=true,bookmarksopen=true,bookmarksnumbered=true}
@ -60,7 +61,9 @@
% The `stabular' environment seems to be the lesser of evils among
% page-breaking table environments:
\newenvironment{bigtabular}{\begin{stabular}}{\end{stabular}}
% Used to keep the horizontal line for a definition on the same page:
% For the 'boxed table style:
\newcommand{\SBoxedLeft}{\textcolor[rgb]{0.6,0.6,1.0}{\vrule width 3pt\hspace{3pt}}}
% Formerly used to keep the horizontal line for a definition on the same page:
\newcommand{\SEndFirstHead}[0]{ \nopagebreak \\ }
% Corrects weirdness when a table is the first thing in
% an itemization: