-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbookjhconcrete.sty
972 lines (881 loc) · 36.5 KB
/
bookjhconcrete.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
\ProvidesPackage{bookjh}[2001/05/24 Material for _Linear Algebra_ (JH)]
%% bookjh.sty
% The INITIAL CODE part
% I want the booleans offered by this package
\usepackage{etoolbox}
% Are printing a hard copy or not?
\newbool{hardcopybool}
% set the default by uncommenting one or the other
% \booltrue{hardcopybool}
\boolfalse{hardcopybool} % the default
% You can cause guidelines to be shown by invoking with
% pdflatex "\def\hardcopy{}\input{book}"
% See http://stackoverflow.com/a/1466610
\ifdefined\hardcopy
\booltrue{hardcopybool}
\fi
\ifbool{hardcopybool}{\typeout{!!! PRINTING HARD COPY}}{}
% The DECLARATION OF OPTIONS part
%\DeclareOption{singleanswerfile}{}
% The EXECUTION OF OPTIONS part
%\ProcessOptions
% The PACKAGE LOADING part
% The dvidrv package allows me to specify on the command line what is
% my driver.
% \usepackage[yes]{hrefout}
% \newcommand{\dvidrv}{pdftex}
% \typeout{DVI DRIVER IN BOOKJH IS \dvidrv}
% Set page margins, etc.
\usepackage[papersize={7.5in,9.25in},
textwidth=345pt, % textheight=550pt, % LaTeX defaults
inner=.8in, top=.85in, bottom=.85in, %,bottom=1in % squeeze a lot on the paper
headsep=12pt,
bindingoffset=0.4in,
]{geometry}
% For US letterpaper, that is, for printing on a US printer
% \usepackage[paper=letterpaper,
% textwidth=345pt,textheight=598pt, % LaTeX defaults
% % top=1in,bottom=1in % squeeze a lot on the paper
% ]{geometry}
% \usepackage[\dvidrv]{xcolor}
\usepackage{xcolor}
% These are from http://kuler.adobe.com/#themeID/1538583
% clear by reisjart (lightened one color)
% \definecolor{basecolor}{rgb}{0.1686, 0.5032, 0.4118} % 43,78,105
% \definecolor{darkcolor}{rgb}{0.0824, 0.1412, 0.2157} % 21,39,55
% \definecolor{bgcolor}{rgb}{0.6627, 0.8196, 0.8784} % 165,209,224
% \definecolor{flourishcolor}{rgb}{0.4078, 0.1373, 0.1294} % 104,35,33
% These are from http://kuler.adobe.com/#themeID/19069
% read and smooth by info
% \definecolor{bgcolor}{rgb}{0.905882353, 0.91372549, 0.819607843} % 231,233,209
% \definecolor{rulecolor}{rgb}{0.82745098, 0.831372549, 0.666666667} % 211,212,170
% \definecolor{papercolor}{rgb}{0.988235294, 0.980392157, 0.901960784} % 252,250,230
% \definecolor{darkcolor}{rgb}{0.266666667, 0.266666667, 0.266666667} % 68,68,68
% \definecolor{flourishcolor}{rgb}{0.564705882, 0.094117647, 0.031372549} % 144,24,8
% These are from http://kuler.adobe.com/#themeID/1440313
% Cote Azur by Philip.Schweikert (lightened one color)
% \definecolor{darkcolor}{rgb}{0, 0.34510, 0.37255} % 0,88,95
% \definecolor{boldcolor}{rgb}{0, 0.57647, 0.57647} % 0,147,147
% \definecolor{neutralcolor}{rgb}{1.00000, 0.98824, 0.76863} % 255,252,196
% \definecolor{bgcolor}{rgb}{0.94118, 0.92941, 0.73333} % 240,237,187
% \definecolor{flourishcolor}{rgb}{1.00000, 0.21961, 0} % 255,56,0
% These are from http://www.colorcombos.com/color-scheme-20.html
% \definecolor{darkcolor}{HTML}{217C7E} %
% \definecolor{boldcolor}{HTML}{3399FF} %
% \definecolor{bgcolor}{HTML}{F3EFE0} %
% \definecolor{flourishcolor}{HTML}{9A3334} %
% From http://colorschemedesigner.com/#3M32r--..k.Yu
\definecolor{darkcolor}{HTML}{193E9A} %
\definecolor{boldcolor}{HTML}{0034B7} %
\definecolor{lightcolor}{HTML}{DAE4FC} % {799FFC} %
\definecolor{bgcolor}{HTML}{FCFFDC} %
\definecolor{flourishcolor}{HTML}{F80018} %
% From https://kuler.adobe.com/Lollapalooza-color-theme-3446379/edit/?copy=true by gabrielsssantiago
\definecolor{coverdarkcolor}{HTML}{002635} %
\definecolor{coverboldcolor}{HTML}{5C5B5A} %
\definecolor{coverlightcolor}{HTML}{013440} %
\definecolor{coverbgcolor}{HTML}{AB1A25} %
\definecolor{coverflourishcolor}{HTML}{AB1A25} %
% \usepackage[\dvidrv]{graphicx} %
\usepackage{graphicx} %
\usepackage{url}
\usepackage{microtype}
% \usepackage{color}
% \usepackage{graphicx} %
%\graphicspath{{./}{./graphics/}} %
\usepackage{ifpdf}
% \@ifundefined{pdfoutput}{}{%
% \typeout{ ABOUT TO RUN GRAPHICS RULE }
% \DeclareGraphicsRule{*}{mps}{*}{} % make pdflatex take fig.1 as metapost.
% }%
%\ifpdf
% \typeout{ ABOUT TO RUN GRAPHICS RULE }
% \DeclareGraphicsRule{*}{mps}{*}{} % make pdflatex take fig.1 as metapost.
%\fi
\DeclareGraphicsRule{*}{mps}{*}{} % make pdflatex take fig.1 as metapost.
\usepackage{linalgjh}
\usepackage{makeidx}
\usepackage{pbsi} % This font is in TeXLive so I consider it accessible at this point
\newcommand{\fancyfont}[1]{\textbsi{#1}}
% Next two are for the cover
% \usepackage{emerald}
% \usepackage{tgchorus}
\usepackage[outline]{contour}
\usepackage{rotating}
% The MAIN CODE part
%================= me
\newcommand{\myname}{Jim Hef{}feron} % The empty box prevents
% using a ligature for the ff
%=========== formatting ===================================
% HEADERS and FOOTERS
\RequirePackage{fancyhdr}
% See http://en.wikibooks.org/wiki/LaTeX/Page_Layout
\setlength{\headheight}{15.2pt}
%HEADINGS
% \lhead[lh-even]{lh-odd} \chead[ch-even]{ch-odd} \rhead[rh-even]{rh-odd}
% \lfoot[lf-even]{lf-odd} \cfoot[cf-even]{cf-odd} \rfoot[rf-even]{rf-odd}
% where
% When LaTeX wants to create a page with an empty style, it will insert the
% first argument of fancyplain, in all the other cases it will use the
% second argument
% and available are
% \thepage number of the current page
% \leftmark current chapter name printed like "CHAPTER 3. THIS IS THE CHAPTER TITLE"
% \rightmark current section name printed like "1.6. THIS IS THE SECTION TITLE"
% \chaptername the name chapter in the current language. If this is English, it will display "Chapter"
% \thechapter current chapter number
% \thesection current section number
% Main body of book
\fancypagestyle{bookbody}{%
\renewcommand{\headrulewidth}{.4pt}
\renewcommand{\footrulewidth}{0pt}
\lhead[\fancyplain{\renewcommand{\headrulewidth}{0pt}}{\thepage}]{\fancyplain{\renewcommand{\headrulewidth}{0pt}}{\textsl{\rightmark}}}
\rhead[\fancyplain{}{\textsl{\leftmark}}]{\fancyplain{}{\thepage}}
\chead{}
\lfoot{}
\rfoot{}
\cfoot{\fancyplain{\renewcommand{\footrulewidth}{.4pt}\thepage}{}}
}
% Topic sections
\fancypagestyle{booktopic}{%
\renewcommand{\headrulewidth}{.4pt}
\renewcommand{\footrulewidth}{0pt}
\lhead[\fancyplain{\renewcommand{\headrulewidth}{0pt}}{\thepage}]{\fancyplain{\renewcommand{\headrulewidth}{0pt}}{\textsl{\rightmark}}}
\rhead[\fancyplain{}{\textsl{\leftmark}}]{\fancyplain{}{\thepage}}
\chead{}
\lfoot{\fancyplain{\thepage}{}}
\rfoot{\fancyplain{\thepage}{}}
\cfoot{\fancyplain{\thepage}{}}
}
% Front matter
\fancypagestyle{bookfront}{%
\lhead{}
\rhead{}
\chead{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lfoot{}
\rfoot{}
\cfoot{}
% \cfoot{\fancyplain{}{-- \thepage{} --}}
}
% Chapters start with an empty page (includes first page of toc)
\fancypagestyle{bookemptypage}{%
\lhead{}
\rhead{}
\chead{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lfoot{}
\rfoot{}
\cfoot{}
}
% Table of contents
\fancypagestyle{booktoc}{%
\lhead{}
\rhead{}
\chead{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lfoot{}
\rfoot{}
\cfoot{}
}
\pagestyle{bookfront}
\pagenumbering{roman}
%=============== shaded and non-shaded theorems =============
% The shadethm package allows, say, \begin{theorem} .. \end{theorem}
% material to always come out shaded.
% \RequirePackage{shadethm}
% \RequirePackage{amsthm}
% \swapnumbers
% \renewcommand{\thmnote}[1]{{\bfseries #1}}
% \newtheoremstyle{text}% name of the style to be used
% {\thm@preskip}% measure of space to leave above the theorem. E.g.: 3pt
% {\thm@postskip}% measure of space to leave below the theorem. E.g.: 3pt
% {\normalfont}% name of font to use in the body of the theorem
% {0pt}% measure of space to indent
% {\bfseries}% name of head font
% {}% punctuation between head and body
% { }% space after theorem head; leave blank space (not empty) for normal interword space
% {\arabic{subsection}.\arabic{theorem}\ \thmname{#1}\thmnote{ (#3)}\ } % Manually specify head
% \theoremstyle{text} % the theorem environments below will use the `text' style
% % shaded theorems
% \newtheorem{theorem}{Theorem}[subsection]
% % \surroundwithmdframed[style=thmstyle]{theorem}\resetparens[theorem]
% \newtheorem{proposition}[theorem]{Proposition}
% \surroundwithmdframed[style=thmstyle]{proposition}
% \newtheorem{axiom}[theorem]{Axiom}
% \surroundwithmdframed[style=thmstyle]{axiom}
% \newtheorem{axioms}[theorem]{Axioms}
% \surroundwithmdframed[style=thmstyle]{axioms}
% \newtheorem{definition}[theorem]{Definition}
% \surroundwithmdframed[style=thmstyle]{definition}\resetparens[definition]
% \newtheorem{notation}[theorem]{Notation}
% \surroundwithmdframed[style=thmstyle]{notation}\resetparens[notation]
% % unshaded theorems
% \newtheorem{lemma}[theorem]{Lemma}
% \newtheorem{corollary}[theorem]{Corollary}
% \newtheorem{example}[theorem]{Example}
% \newtheorem{exercise}[theorem]{Exercise}
% \newtheorem{remark}[theorem]{Remark}
% \newtheorem{note}[theorem]{Note} %conflicts with seminar
% % I like the theorems to only list the subsection and the theorem number
% \renewcommand{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
% \definecolor{shadecolor}{rgb}{0.9412,.9412,1.0000} %
\colorlet{shadecolor}{bgcolor}
\definecolor{shaderulecolor}{rgb}{0.1529,0.2510,0.5451} % RoyalBlue
% \usepackage[framemethod=tikz]{mdframed}
% \newrobustcmd*\resetparens[1][definition]{\AtBeginEnvironment{#1}{\mdf@restoreparams}} % md says this will be incorporated in next version of mdframed
% I don't see that leftmargin and rightmargin have any effect.
% \mdfdefinestyle{thmstyle}{nobreak=true,
% leftmargin=-0.2em,innerleftmargin=0.2em,
% rightmargin=-0.2em,innerrightmargin=0.2em,
% % skipabove=.4ex,innertopmargin=-.6ex,
% skipabove=.5\thm@preskip,innertopmargin=.5\thm@preskip,
% % innerbottommargin=.6ex,skipbelow=.6ex,
% % is better in principle, but doesn't work:
% innerbottommargin=.5\thm@postskip,skipbelow=.5\thm@postskip,
% backgroundcolor=shadecolor,
% linewidth=0.4pt,
% linecolor=shaderulecolor}
\usepackage{framed}\usepackage{footnote}
\usepackage{amsthm}
% \usepackage{ntheorem}
\usepackage{thmtools}
\declaretheoremstyle[
% spaceabove=.5\thm@preskip, spacebelow=.5\thm@postskip,
headfont=\normalfont\bfseries,
notefont=\normalfont\bfseries, notebraces={ (}{)},
headformat={\NUMBER\ \NAME\NOTE\ignorespaces}, % note that \thetheorem is redefined below so \NUMBER is altered
headpunct={},
bodyfont=\normalfont,
postheadspace={.618em plus .2em minus .1em},
preheadhook={\begin{savenotes}\begin{snugshade}}, % savenotes allows appendrefs to appear as footnotes
postfoothook={\end{snugshade}\end{savenotes}}
% % for doing this with mdframed, see also http://tex.stackexchange.com/questions/34405/shaded-theorems-thmtools-spanning-pages
]{shadedtext} % for text that has a shaded box behind it TODO: make the frames not add any vertical space, add a rule to the frame
\declaretheoremstyle[
% spaceabove=.5\thm@preskip, spacebelow=.5\thm@postskip,
headfont=\normalfont\bfseries,
notefont=\normalfont\bfseries, notebraces={ (}{)},
headformat={\NUMBER\ \NAME\NOTE\ignorespaces}, % note that \thetheorem is redefined below so \NUMBER is altered
headpunct={},
bodyfont=\normalfont,
postheadspace={.618em plus .2em minus .1em},
]{text} % for text that is not shaded
\declaretheoremstyle[
% spaceabove=.5\thm@preskip, spacebelow=.5\thm@postskip,
headfont=\normalfont\small\scshape,
notefont=\normalfont\small\scshape, notebraces={ (}{)},
headformat={\NAME\NOTE\ignorespaces}, % note that \thetheorem is redefined below so \NUMBER is altered
headpunct={},
bodyfont=\normalfont,
postheadspace={.618em plus .2em minus .1em},
prefoothook={\hfill\qedsymbol}
]{pf} % for proofs, with qedsymbol at the end
\declaretheorem[name=Theorem,
style=shadedtext,
numberwithin=subsection,]{theorem}
% \surroundwithmdframed[style=thmstyle]{theorem}\resetparens[theorem]
\renewcommand{\thetheorem}{\arabic{subsection}.\arabic{theorem}}
\declaretheorem[name=Definition,
style=shadedtext,
sibling=theorem]{definition}
% \surroundwithmdframed[style=thmstyle]{definition} \resetparens[definition]
\declaretheorem[name=Lemma,
style=shadedtext,
sibling=theorem]{lemma}
% \surroundwithmdframed[style=thmstyle]{lemma}\resetparens[lemma]
\declaretheorem[name=Corollary,
style=shadedtext,
sibling=theorem]{corollary}
% \surroundwithmdframed[style=thmstyle]{corollary}\resetparens[corollary]
\declaretheorem[name=Example,
style=text,
sibling=theorem]{example}
\declaretheorem[name=Exercise,
style=text,
sibling=theorem]{exercise}
\declaretheorem[name=Remark,
style=text,
sibling=theorem]{remark}
\let\proof\@undefined % undefine \proof
\let\endproof\@undefined % undefine \endproof
\declaretheorem[name=Proof,
style=pf,
numberwithin=subsection]{proof}
% styling of proofs
\renewcommand{\proofname}{{\scshape\small Proof}}
% End of \begin{proof} ... \end{proof}
\renewcommand{\qedsymbol}{{\scshape\small QED}}
%------------------------- code listings
\usepackage{listings}
\lstset{basicstyle=\ttfamily\scriptsize,
commentstyle=\textit,
keywordstyle=\color{blue}\bfseries,
showstringspaces=false,
xleftmargin=.7em,
backgroundcolor=\color{bgcolor}
}
\lstdefinestyle{inline}{basicstyle=\ttfamily\small}
% Make single quotes correct in verbatim
\usepackage{upquote}
%================================================================
% FOOTNOTES
% Footnotes: Use footnote symbols (not numbers) on a per-page basis.
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\RequirePackage{footnpag}
% That package is only used for this purpose.
\newcommand{\appendrefs}[1]{\footnote{
More information on #1 is in the appendix.} }
% \newenvironment{inlinegraphic}{\begin{center}}{\end{center}} %
% \newcommand{\scannedpicture}[1]{%
% %\ifpdf
% % \includegraphics{#1.pdf}
% %\else
% \includegraphics{#1.jpg}
% %\fi
% }
%=========================================
% Enumeration environments
% Changed to support new kind of enumeration environment jh 90-7-10
\def\labelenumi{(\arabic{enumi})}
\def\theenumi{\arabic{enumi}}
\def\labelenumii{\(\bullet\)}
\def\theenumii{\alph{enumii}}
\def\p@enumii{\theenumi}
\def\labelenumiii{(\roman{enumiii})}
\def\theenumiii{\roman{enumiii}}
\def\p@enumiii{\theenumi(\theenumii)}
\def\labelenumiv{\bf --}
\def\theenumiv{\Alph{enumiv}}
\def\p@enumiv{\p@enumiii\theenumiii}
\def\labelitemi{$\bullet$}
\def\labelitemii{\bf --}
\def\labelitemiii{$\ast$}
\def\labelitemiv{$\cdot$}
% for various lists
\usepackage{paralist}
\setlength{\pltopsep}{.25ex plus .1ex}
\setlength{\plitemsep}{.15ex plus .08ex minus .03ex}
%================= TABLE OF CONTENTS =========================
% For table of contents
% See tocloft package documentation for info. Anything more than below should
% probably bring in that package.
\setcounter{tocdepth}{2} \setcounter{secnumdepth}{2}
% \renewcommand{\@pnumwidth}{15.85pt} %trial and error; addtolength didn't work
\renewcommand{\@pnumwidth}{18pt}
\renewcommand{\@tocrmarg}{4em}
\usepackage[titles]{tocloft}
\tocloftpagestyle{booktoc}
\cftpagenumbersoff{chapter}
\setlength{\cftchapnumwidth}{7em}
% \renewcommand*\l@chapter[2]{%
% \ifnum \c@tocdepth >\m@ne
% \addpenalty{-\@highpenalty}%
% \vskip 1.0em \@plus\p@
% \setlength\@tempdima{8.5em}% was 1.5em
% \begingroup
% \parindent \z@ \rightskip \@pnumwidth
% \parfillskip -\@pnumwidth
% \leavevmode \bfseries
% \advance\leftskip\@tempdima
% \hskip -\leftskip
% #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
% \penalty\@highpenalty
% \endgroup
% \fi}
%
\renewcommand*\l@section{\@dottedtocline{1}{2em}{1.65em}} %98XII08 was 1.5
\renewcommand*\l@subsection{\@dottedtocline{2}{3em}{2.5em}} % 98Xii05 was 1.5em
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{1.25em}}
\renewcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}}
\renewcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}}
%end PAGE LAYOUT
%===================================================
% CHAPTER
%
% The \chapter command does not take an argument. Instead, both \chapter
% and \chapter* use \secdef, with the line \secdef\@chapter\@schapter .
% The first argument to \secdef tells LaTeX what to do with \chapter while
% the second tells LaTeX what to do with \chapter* . So \chapter{Introduction}
% will use \@chapter (which does have an argument and so grabs the chapter
% name), whereas \chapter*{Acknowledgements} will use \@schapter.
%
% The \@chapter and \@schapter write to some external files and then
% use \@makechapterhead and \@makeschapterhead to do the actual formatting.
%
\renewcommand\chapter{\if@openright\clearemptydoublepage\else\clearpage\fi
% Redefine the way exercises are handled, back from
% how Topics handle them
\insidetopicfalse % Handle exercise hyperref-ing differently
\renewcommand{\announcesectioninginanswerfile}{%
\sectioninginanswerfilechapterstyle}
\renewcommand{\ansparams}{{\Englishnumber{\value{chapter}}.\Roman{section}.\arabic{subsection}.\Currentlabel}}
% renew definition of exercise formatting (perhaps undone in Topic)
\renewcommand{\exercise@makelabel}{} %
% \ifhrefout
\renewcommand{\exercise@deflabel}[1]{\hyperdef{exercise}{\Englishnumber{\value{chapter}}.\Roman{section}.\arabic{subsection}.\Currentlabel}{}\hyperref{./jhanswer.pdf}{ans}{\Englishnumber{\value{chapter}}.\Roman{section}.\arabic{subsection}.\Currentlabel}{\textbf{\arabic{subsection}.\Currentlabel}}}
% \else
% \renewcommand{\exercise@deflabel}[1]{\textbf{\arabic{subsection}.\arabic{##1}}}
% \fi
\thispagestyle{bookemptypage}%
\global\@topnum\z@
\@afterindentfalse
\secdef\@chapter\@schapter}
%\usepackage{ocm}
% Change what goes into the table of contents for chapters here.
% Copied from book.cls
\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
\refstepcounter{chapter}%
\typeout{\@chapapp\space\thechapter.}%
\addcontentsline{toc}{chapter}%
{\protect\numberline{Chapter \thechapter:}#1}
% Announce the chapter also in the answers to exercises
\Writetofile{\ans@fn}{\protect\chapter\protect{Chapter \Englishnumber{\value{chapter}}: #1\protect}}
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\else
\addcontentsline{toc}{chapter}{#1}%
\fi
\chaptermark{#1}%
\addtocontents{lof}{\protect\addvspace{10\p@}}%
\addtocontents{lot}{\protect\addvspace{10\p@}}%
\if@twocolumn
\@topnewpage[\@makechapterhead{#2}]%
\else
\@makechapterhead{#2}%
\@afterheading
\fi}
\def\@makechapterhead#1{\clearemptydoublepage
% Grab the name of the chapter. Has to go here, not in \chapter, since
% that macro does not take an argument.
\gdef\sectioningname{#1}
% Below here is where the chapter heading is formatted
\vspace*{80pt plus 10pt minus 8pt} % was 50\p@
{\parindent \z@ \raggedright \normalfont
\ifnum \c@secnumdepth >\m@ne
\if@mainmatter
% \huge\bfseries \@chapapp\space \thechapter
{\setlength{\fboxsep}{0pt}\colorbox{flourishcolor}{\makebox[\textwidth]{\rule{0em}{0.6pt}}}} \\[-4.5ex]
\selectfont\Large\textcolor{boldcolor}{\fancyfont{ \@chapapp{} \thechapter}}
\par\nobreak
\vskip 0\p@
\fi
\par
\vskip 0\p@ \fi %was 20\p@
\interlinepenalty\@M
\Huge \bfseries \usefont{T1}{fvs}{b}{n}\Huge\textcolor{black}{#1}\par\nobreak
\vspace{40pt plus 5pt minus 3pt}
% \vskip 50\p@ % was 30\p@
}}
% For starred chaters
\def\@makeschapterhead#1{%
\vspace*{75pt plus 10pt minus 8pt} % was: \vspace*{50\p@}%
{\parindent \z@ \raggedright
\normalfont
\interlinepenalty\@M
\usefont{T1}{fvs}{b}{n}\Huge\textcolor{black}{#1} \\[-1.75ex]
{\setlength{\fboxsep}{0pt}\colorbox{flourishcolor}{\makebox[\textwidth]{\rule{0em}{0.6pt}}}}\par\nobreak
\vspace{40pt plus 5pt minus 3pt}
% \vskip 40\p@
}}
%--------exparts and exparts*
% For exercises with sub-parts. The *-ed version prints them across:
% (a) xxx (b) yyy (c) zzz ..
% while the un-*-ed version prints them down:
% (a) xxx
% (b) yyy
% Use this way:
% \begin{exparts}
% \partitem % not just \item so works in *-ed version.
% \end{exparts}
\newcounter{expartscount}
\newenvironment{exparts}{%
\def\partsitem{\item\relax}%
\begin{expartslist}%
}{%
\end{expartslist}}
%
\newenvironment{exparts*}{%
\def\partsitem{\penalty-400\hskip1.25em\relax\hbox{%
\refstepcounter{expartscount}\textbf{(\alph{expartscount})}\hspace*{.5em}}\nobreak}
\begin{expartslist}
\setlength{\itemindent}{-1.25em}
\rightskip=0pt plus.25\textwidth\spaceskip=.3333em\xspaceskip=.5em\relax%
\item[]}{%
\end{expartslist}}
%
\newenvironment{expartslist}{%
\begin{list}{\textbf{(\alph{expartscount})}}{
\usecounter{expartscount}
\setlength{\leftmargin}{1em}
\setlength{\rightmargin}{0em}
\setlength{\listparindent}{\parindent}
\setlength{\itemindent}{0em}
\setlength{\labelsep}{.4em}
\setlength{\labelwidth}{0em}
\setlength{\topsep}{0ex}
\setlength{\parskip}{0ex}
\setlength{\partopsep}{0ex}
\setlength{\parsep}{.1ex}
\setlength{\itemsep}{0ex}
}%
}{%
\end{list}}
%
%...........end: exparts and exparts*
%...........
% environment: tfae
% for lists of statements that are equivalent.
\newcounter{tfaecount}
\newenvironment{tfae}{%
\begin{list}{(\arabic{tfaecount})}{\usecounter{tfaecount}
\setlength{\leftmargin}{\parindent}
\setlength{\itemsep}{0ex}
\setlength{\topsep}{.2ex}
\setlength{\partopsep}{0ex}
\setlength{\parskip}{0ex}
\setlength{\parsep}{0ex}}}{%
\end{list}}
%
\newcounter{saveshadetheorem}
\renewcommand{\theoremstyle}{\textbf{\arabic{subsection}.\arabic{theorem}}}
\newcounter{exerciselistcounter}
% ENVIRONMENT: computercode
\newcommand{\announcecomputercode}{\bigbreak\par\noindent%
\textbf{Computer Code}\par\noindent}
\RequirePackage{verbatim}
\newenvironment{computercode}{
\begingroup\small\verbatim
}{\endverbatim\endgroup\pagebreak[2]%
}
% ENVIRONMENT: indented
\newenvironment{indented}{%
\begin{list}{\exercisecounterstyle
}{%
\setlength{\leftmargin}{1.2\parindent}
\setlength{\rightmargin}{0em}
\setlength{\parsep}{\parskip}
\setlength{\itemsep}{.4ex plus .1ex minus .15ex}
\setlength{\itemindent}{0em} % \leftmargin}
\setlength{\listparindent}{\parindent}
\setlength{\topsep}{.5ex plus .1ex minus .1ex}
\setlength{\partopsep}{0ex plus .1ex}
\setlength{\labelsep}{0em}
\setlength{\labelwidth}{0em}
\setlength{\abovedisplayskip}{3pt plus2pt minus3pt}%
\setlength{\belowdisplayskip}{\abovedisplayskip}
\setlength{\abovedisplayshortskip}{\z@ plus2pt}%
\setlength{\belowdisplayshortskip}{3pt plus2pt minus3pt}
}
\item[]}{\end{list}
}
\usepackage{engnum}
%\renewcommand{\thechapter}{\Englishnumber{\value{chapter}}}
%\renewcommand{\thesection}{\thechapter.\Roman{section}}
\renewcommand{\thechapter}{\Englishnumber{\value{chapter}}}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\arabic{subsection}}
\renewcommand{\chaptermark}[1]{% docs in fancyheadings.
\markboth{\chaptername~\thechapter. #1}{}}
\renewcommand{\sectionmark}[1]{%
\markright{Section~\Roman{section}. #1}}
%\renewcommand{\thesubsection}{\arabic{subsection}}
%end headings
% PAGE LAYOUT
% (from http://theoval.cmp.uea.ac.uk/~nlct/latex/thesis/node9.html)
% \@startsection{<type>}{<level>}{<indent>}{<beforeskip>}{<afterskip>}{<style>}
% where
% <type>
% One of: section, subsection, subsubsection, paragraph or subparagraph. (Note no backslash.)
%
% <level>
% part -1
% chapter 0
% section 1
% subsection 2
% subsubsection 3
% paragraph 4
% subparagraph 5
%
% <indent>
% A length giving indentation from the left margin.
%
% <beforeskip>
% The absolute value is how much vertical distance to leave before the
% heading. If <beforeskip> is negative the first paragraph following the
% section heading will not be indented.
%
% <afterskip>
% The absolute value is how much vertical distance to leave after the
% heading. If <afterskip> is negative, the text following the sectioning
% command will appear on the same level as the section heading.
%
% <style>
% The declarations to set the style of the heading (e.g. \itshape for
% an italic heading.) The last command in <style> may be a
% command which takes a single argument but all the others must be declarations.
% \def\SetSectioningName#1{\gdef\sectioningname{#1}%
% \typeout{SUBSECTION\space START:\space\sectioningname}}
% \def\@startsection#1#2#3#4#5#6{%
% \announcesectioningtoanswerfile{#2}{#8}
% \if@noskipsec \leavevmode \fi
% \par
% \@tempskipa #4\relax
% \@afterindenttrue
% \ifdim \@tempskipa <\z@
% \@tempskipa -\@tempskipa \@afterindentfalse
% \fi
% \if@nobreak
% \everypar{}%
% \else
% \addpenalty\@secpenalty\addvspace\@tempskipa
% \fi
% \@ifstar
% {\@ssect{#3}{#4}{#5}{#6}}%
% {\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}}
%
% I grab the name of the section below and gdef it to \sectioningname.
\newcommand{\writesectiontoanswerfile}{%
% \typeout{------ Name of this section: \nameofthissection ----------}
\Writetofile{\ans@fn}{\protect\section\protect{\nameofthissection\protect}}
% \Writetofile{\ans@fn}{\protect\section*\protect{\protect}}%
}
\renewcommand{\section}{%
\@startsection%
{section}{1}{0em}{-14ex plus1ex minus2ex}{1em}%
{\usefont{T1}{fvs}{b}{n}\Large}}
% changed from this 2013 Sep 16
% \renewcommand{\section}{%
% \@startsection%
% {section}{1}{0em}{-14ex plus1ex minus2ex}{1em}%
% {\usefont{T1}{fvs}{b}{n}\Large}}
\newcommand{\topicsection}{\@startsection%
{section}{1}{0em}{-10ex plus1ex minus1ex}{3em}% was: -12ex plus1ex minus2ex
{\raggedright\makebox[0em][l]{%
\raisebox{6ex}{%
\raisebox{-.25ex}{\makebox[0em][l]{\setlength{\fboxsep}{0pt}\colorbox{flourishcolor}{\makebox[\textwidth][r]{\rule{0em}{0.8pt}}}}}%
\Large\bfseries\textcolor{boldcolor}{\fancyfont{Topic}}%
}%
}%
\usefont{T1}{fvs}{b}{n}\Large}}
% \newcommand{\jh@subsection}{\@startsection%
% {subsection}{2}{0em}{-10ex plus1ex minus1ex}{1em}%
% {\raggedright\large\bfseries}}
% \renewcommand{\subsection}{\jh@subsection}
\renewcommand{\subsection}{\@startsection
{subsection}{2}{0em}{-10ex plus1ex minus1ex}{2ex}%
{\raggedright\usefont{T1}{fvs}{b}{n}\large}}
\renewcommand{\thesubsection}{\thesection.\arabic{subsection}}
% \renewcommand{\subsection}[1]{\gdef\sectioningname{#1}\@startsection%
% {subsection}{2}{0em}{10ex plus1ex minus1ex}{1em}%
% {\raggedright\large\bfseries}}
% \renewcommand{\subsection}{%
% \refstepcounter{subsection}%
% \secdef\subseccmda\subseccmdb}
% \newcommand{\subseccmda}[2][default]{%
% \addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection} #1}%
% \subsecheader{#2}}
% \newcommand{\subseccmdb}[1]{\subsecheader{#1}}
\gdef\nameofthissection{}
% \@sect{NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}[ARG1]{ARG2}
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
\let\@svsec\@empty
\else
\refstepcounter{#1}%
\protected@edef\@svsec{\@seccntformat{#1}\relax}%
\fi
\@tempskipa #5\relax
\ifdim \@tempskipa>\z@
\begingroup
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M #8\@@par}%
\endgroup
\csname #1mark\endcsname{#7}%
% JH 2012-Oct-07 write name of book section to answer file
\ifnum #2=1
\gdef\nameofthissection{#8}
\Writetofile{\ans@fn}{\protect\section\protect{#8\protect}}
\fi
% JH 2012-Mar-10 define sectioningname for answer file; it is actually the
% subsection name and gets written to the answer file when \begin{exercises}
% is called
% \Writetofile{\ans@fn}{\expandafter\protect\csname #1\endcsname\protect{#8\protect}}
\gdef\sectioningname{#8}
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
\fi
#7}%
\else
\def\@svsechd{%
#6{\hskip #3\relax
\@svsec #8}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
\protect\numberline{\csname the#1\endcsname}%
\fi
#7}}%
\fi
\@xsect{#5}}
\usepackage{trimspaces}
% \newcommand{\subsecheader}[1]{\pagebreak[3]%
% \vspace{10ex plus1ex minus1ex}%
% \gdef\sectioningname{#1}% grab the subsec's name
% {\raggedright\large\bfseries\thesection.\thesubsection\ #1}%
% \nopagebreak\vspace*{1em}\par\noindent\trim@spaces}
% --------OPTIONAL SUBSECTION
%
% JH 2012-Jan-28 \newcommand{\subsectionoptional}[1]{\subsection[#1\protect$^*\protect$]{#1}}
\newcommand{\subsectionoptional}[1]{\subsection[#1\texorpdfstring{\protect\raisebox{1pt}{*}}{}]{#1}}
%
% for clearing out (needs twoside document option).
\newcommand{\clearemptydoublepage}{%
\clearpage{\pagestyle{empty}\cleardoublepage}}
%==================== TOPICS ============================
% For applications sections.
%
\newcommand{\topic}[1]{\clearpage\vspace*{.25in}\topicsection*{#1}
\stepcounter{section} % increment the section so exercises can have unique hyper reference
\renewcommand{\announcesectioninginanswerfile}{%
\sectioninginanswerfiletopicstyle}
\insidetopictrue % Handle hyperref-ing of exercise in topic way
% renew definition of exercise formatting (perhaps undone in Chapter)
\setcounter{theorem}{0} % hack to make exercise numbering correct
\renewcommand{\exercise@makelabel}{} %
% JH testing 2012-Oct-05 \renewcommand{\exercise@deflabel}[1]{\textbf{\arabic{##1}}}
\renewcommand{\exercise@deflabel}[1]{\hyperdef{exercise}{\Englishnumber{\value{chapter}}.\Roman{section}.\arabic{subsection}.\Currentlabel}{}\hyperref{./jhanswer.pdf}{ans}{\Englishnumber{\value{chapter}}.\Roman{section}.\arabic{subsection}.\Currentlabel}{\textbf{\Currentlabel}}%
% \typeout{!!! in Topic next exercise defed \Englishnumber{\value{chapter}}.\Roman{section}.\arabic{subsection}.\Currentlabel !!!!}
}
\renewcommand{\ansparams}{{\Currentlabel}}
\thispagestyle{empty}
\gdef\sectioningname{#1}%
\markright{Topic: #1}
\addcontentsline{toc}{section}{Topic: #1}
% \vspace*{15pt}\noindent\fancyfont{Topic}\par
% \vspace*{10pt}\noindent{\Large\bfseries #1}\vspace{20pt}
% \par\@afterindentfalse\nobreak
% \typeout{+++++++++ value of the chapter section subsection is \thechapter.\thesection +++++++}
}
%============ Spacing and dashes
% from ltugboat.cls 2000-Apr-27 for making dashes (It is Robin's).
% Really for 10 pt only.
\def\thinskip{\hskip 0.16667em\relax}
\def\endash{--}
\def\emdash{\endash-}
\def\d@sh#1#2{\unskip#1\thinskip#2\thinskip\ignorespaces}
\def\dash{\d@sh\nobreak\endash}
\def\Dash{\d@sh\nobreak\emdash}
\def\ldash{\d@sh\empty{\hbox{\endash}\nobreak}}
\def\rdash{\d@sh\nobreak\endash}
\def\Ldash{\d@sh\empty{\hbox{\emdash}\nobreak}}
\def\Rdash{\d@sh\nobreak\emdash}
%============ Cross References
% The reference should know what type of object it is. That is,
% I should be able to say \ref[named]{#1} instead of what's below.
% But I can't find a style file that does that. So this is a hack.
\newcommand{\nearbydefinition}[1]{Definition~\ref{#1}}
\newcommand{\nearbyfigure}[1]{Figure~\ref{#1}}
\newcommand{\nearbylemma}[1]{Lemma~\ref{#1}}
\newcommand{\nearbyexample}[1]{Example~\ref{#1}}
\newcommand{\nearbycounterexample}[1]{Counterexample~\ref{#1}}
\newcommand{\nearbytheorem}[1]{Theorem~\ref{#1}}
\newcommand{\nearbycorollary}[1]{Corollary~\ref{#1}}
\newcommand{\nearbyexercise}[1]{Exercise~\ref{#1}}
\newcommand{\nearbyremark}[1]{Remark~\ref{#1}}
\newcommand{\nearbynotice}[1]{Notice~\ref{#1}}
\newcommand{\nearbynote}[1]{Note~\ref{#1}}
% (`appendrefs' is elsewhere, in the footnote material.)
%============ Appendix
% the word under discussion
\newcommand{\startword}[1]{\medskip\par\noindent\textbf{#1}\hspace*{.5em plus .2em minus .05em}}
%=========== Cover
% space between graphics and determinants on the cover
\newcommand{\covgraphsep}{2.5ex}
% The hrefout package allows me to specify on the command line if I want
% to have hyperreffed output.
% Note: I am unable to figure out how to get the index page links to point to
% the correct page. Hence I turned the links off.
% \ifhrefout %
\usepackage[
colorlinks=true,
\ifbool{hardcopybool}{linkcolor=black,citecolor=black,filecolor=black,urlcolor=black}{linkcolor=darkcolor,citecolor=darkcolor,filecolor=darkcolor,urlcolor=darkcolor}, % usual colors for online version of book is links are blue. but for hard copy links are black
naturalnames=false,
hypertexnames=false, % if true, index links works but a chapter 3 link to 2.6 will go to chapter 1's 2.6
hyperindex=false, % if true, page numbers are correct but links are to a page ten too early.
% backref=false,
plainpages=false, % These three from http://stackoverflow.com/a/1455672/238366
pdfpagelabels,
% pagebackref, % HO says on ctt 2001-dec, to make page links in index point to the same-numbered page in mainmatter
pdfpagemode=UseNone,pdfstartview=FitH,
pdftitle={Linear Algebra},
pdfauthor={Jim Hefferon, Saint Michael's College, Vermont USA,
http://joshua.smcvt.edu/linearalgebra},
pdfsubject={linear algebra},
pdfkeywords={linear algebra, mathematics, free, textbook, hefferon}]{hyperref}
% Elimminate annoying warning from hyperref
% see https://groups.google.com/forum/#!topic/comp.text.tex/5uEAbaO-nTg
\providecommand{\toclevel@definition}{0}
\providecommand{\toclevel@example}{0}
\providecommand{\toclevel@theorem}{0}
\providecommand{\toclevel@proof}{0}
\providecommand{\toclevel@lemma}{0}
\providecommand{\toclevel@corollary}{0}
\providecommand{\toclevel@remark}{0}
% \fi
% \usepackage[capitalise]{cleveref} % nameinlink option not in my LaTeX yet?
% ==================== Cover
% \newcommand{\covergraphic}{%
% \par\noindent\makebox[0pt][c]{\contourlength{1.4pt}
% \rule{4.65in}{0em}
% % \fontsize{260pt}{8pt}
% \fontsize{235pt}{8pt}
% {\fontfamily{qzc}\itshape\selectfont \contour{darkcolor}{\textcolor{lightcolor}{Linear}}}
% } \\[0.05in]
% % } \\[-2.15in]
% % \noindent\makebox[0pt][c]{\rule{8.5in}{0pt}%
% % \makebox[0pt][l]{\contourlength{0.6pt} %
% % \fontsize{65pt}{10pt}
% % {\fontfamily{qzc}\itshape\selectfont \contour{flourishcolor}{\textcolor{white}{Algebra}}}
% % }
% % }
% \noindent\makebox[0pt][c]{\rule{7.4in}{0pt} % \rule{8.65in}{0pt}%
% \makebox[0pt][l]{\contourlength{0.9pt} %
% \fontsize{55pt}{6pt} % \fontsize{65pt}{10pt}
% {\fontfamily{qzc}\itshape\selectfont \contour{flourishcolor}{\textcolor{white}{Algebra}}}
% }
% }
% }
\usepackage{covergraphic}
% % qzc
% \newcommand{\covergraphic}{%
% \setlength{\unitlength}{1in}
% \begin{picture}(0,0)
% % \put(0,0){\line(1,1){2}}
% \put(-0.3,-2.5){{\color{black}\fontsize{50pt}{8pt}{\fontfamily{ugq}\selectfont LINEAR ALGEBRA}}}
% \thicklines
% \put(-0.26,-2.75){\color{coverbgcolor}\rule{5.78in}{4pt}}
% \put(3.75,-3.025){{\color{coverlightcolor}\fontsize{20pt}{8pt}{\fontfamily{ugq}\selectfont Jim Hef{}feron}}}
% \put(-0.0,-6.9){\includegraphics{asy/shadow.pdf}}
% \put(0,-6.5){\includegraphics{asy/axes.pdf}}
% \put(2.3,-6.4){{\color{coverlightcolor}\large \texttt{http://joshua.smcvt.edu/linearalgebra}}}
% \end{picture}
% }
% \newcommand{\coverauthor}{%
% % \noindent\makebox[0em][l]{\makebox[8.5in]{%
% % \begin{tabular}{r}
% % {\Large Jim Hef{}feron} \\[1ex]
% % {\large \url{http://joshua.smcvt.edu/linearalgebra}}
% % \end{tabular}}}
% \relax
% }
\usepackage{conc}
\usepackage{microtype}
\endinput