-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1st_readme.tex
1099 lines (932 loc) · 37.9 KB
/
1st_readme.tex
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
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass[titlepage]{article}
% 1st_readme.tex
% Instructions for Jim Hefferon's Linear Algebra book.
\usepackage[margin=1in]{geometry}
\usepackage{verbatim}
\usepackage{amsmath}
\usepackage{graphics}
%\usepackage{linalgjh,graphics}
\usepackage{url}
% adjust LaTeX's default sectioning commands
\makeatletter
\renewcommand{\section}{\@startsection{section}%
{1}%
{0em}%
{5ex plus1ex minus.5ex}%
{1ex plus .25ex minus .15ex}%
{\large\bfseries\raggedright}}
\renewcommand{\subsection}{\@startsection{subsection}%
{2}%
{0em}%
{3ex plus.25ex minus.25ex}%
{.5ex plus .05ex minus .05ex}%
{\bfseries\raggedright}}
\renewcommand{\subsubsection}{\@startsection{subsubsection}%
{3}%
{0em}%
{1.75ex plus.25ex minus.25ex}%
{.5ex plus .05ex}%
{\bfseries\raggedright}}
\makeatother
\newcommand{\latexnote}{\textit{\LaTeX\ note.} }
\newif\iffancytitle\fancytitletrue % change to ..true for fancy title page
\iffancytitle
\usepackage{color}
\definecolor{titlegray}{rgb}{0.87,0.87,0.87}
\DeclareFontFamily{OT1}{bigandbold}{}
\DeclareFontShape{OT1}{bigandbold}{m}{n}{<-> cmb10 }{}
\usepackage{pbsi}
\else
\title{\LaTeX-ing \textit{Linear Algebra}}
\author{Jim Hef{}feron}
\date{2012-Feb-29}
\fi
\begin{document}
\iffancytitle
\thispagestyle{empty}
\vspace*{3in}
\begin{center}
\begin{picture}(0,0)(0,0)
\put(0,40){\makebox[0pt]{\color{titlegray}\fontsize{100}{130}\usefont{OT1}{bigandbold}{m}{n}\selectfont\LaTeX-ing}}
\put(68,0){\makebox[0pt]{\Huge\bsifamily Linear Algebra}}
\put(0,-350){\makebox[0pt]{\large\scshape\begin{tabular}{c} Jim Hef{}feron \\ 2012-Feb-29\end{tabular}}}
\end{picture}
\end{center}
\clearpage\setcounter{page}{1}
\else
\maketitle
\fi
This document contains instructions for compiling the source
to Jim Hef{}feron's
undergraduate textbook \textit{Linear Algebra}.
\section{Summary of \textit{Linear Algebra}.}
\textit{Linear Algebra}
covers the material that is usually done in a three or four
hour a week, one semester US course:
solving linear systems,
vector spaces, linear maps, determinants, and eigenvalues and eigenvectors.
The pedagogical approach of the book is to help a student make the
transition from calculus to upper division mathematics.
Therefore the presentation stresses careful motivation,
many examples, clarity in the proofs, and
developmental exercise sets.
The Preface contains a more detailed description.
\subsection{Best When Viewed By \ldots}
To have a look
go to \url{http://joshua.smcvt.edu/linearalgebra}.
The files there can be viewed with \textit{Acrobat Reader}
(or, that I know of, any PDF reader).
Get both the book and the answers and put them in the same directory,
so that
clicking on a question number takes you to its answer
and clicking on the answer
takes you back to the question.
\subsection{It is Free}
These materials are freely available, in both readable and source form.
First, you are free to download the book.
If you are a mathematics
instructor then you are also free to have students in your class
use paper or electronic copies as a course text,
either as the main text or as an auxilliary text.
(This includes the freedom to print out copies and sell them
from your bookstore.)
Besides being free to use the output form of the text, you are
also free to use the source.
Some examples of how this can be helpful are:
an instructor can add a few favorite exercises
here and there, perhaps include a new Topic, adjust the development
in a subsection, or even rewrite a portion entirely.
Another example is: someone who finds an error, say in the answer to an
exercise, can send me the correction (email me either a page number and a
description or a diff file).
I welcome contribution of work back to the project.
I of course reserve the ability to not use some things but all
the contributions that I do use are acknowledged in the source.
\section{Use the Source}
If you want to modify the materials then
you need to know that the files here
use the \LaTeX\ macro system for the text formatter \TeX.
It is the
standard system for writing mathematics.
So the first think you need is a
distribution of \TeX.
I recommend \TeX{}Live, \texttt{http://www.tug.org/texlive}.
If you are unfamiliar with \TeX\ then
a good way to get started is to get this document to come out.
These work for me under Linux:
`\verb!pdflatex 1st_readme!'.
If that works~--- if you can view it under \textit{Acrobat Reader}~--- then
your setup is at least partially correct.
However, I must say that each \TeX\ distribution
has a slightly different approach and, I'm sorry, I can't help much.
You'll have to find that information in the distribution
documentation.
What good is this `How to Run It' file if it must be run?
It builds character.
Anyway, if you are having trouble even getting started, or only want a quick
look, I've included the output material in the file \texttt{1st\_readme.pdf}.
If you are just starting working with \LaTeX{} then I recommend finding the
\textit{Short Guide to \LaTeX2e} at
\url{http://www.ctan.org/}, which might be enough
for you to get through making small changes in the materials.
The graphics here are in MetaPost.
This should come with a \TeX{} distribution, but
you need to search for the manual and you may also want
\textit{The MetaFont Book} by Knuth
(ISBN~0-201-13444-6).
\subsection{Compiling from source}
Unzip the contents of \verb!linear_algebra.zip!.
This makes a new directory \textit{book}.
The book's source comes in a number of separate files.
In addition to separate files for each section, such as
\texttt{gr1.tex} for the first section of the first chapter,
here are some other key files.
\begin{center}
\begin{tabular}{r|l}
\textit{file name} &\textit{what it is} \\
\hline
\texttt{book.tex} &Main file \\
\texttt{bookjh.sty} &Formatting instructions \\
\texttt{linalgjh.sty} &Macros for Linear Algebra \\
\texttt{jhanswer.tex} &Main file for the answers \\
\end{tabular}
\end{center}
After you get the files, you will have in your
directory many \texttt{.tex} files, a few \texttt{.mp} files, and
a few other types such as \LaTeX\ style files \texttt{.sty}.
The \texttt{.tex} files are for \LaTeX\ and the \texttt{.mp} files
are for MetaPost for the graphics
(a few graphics are in forms such as \texttt{.jpg}).
\subsubsection{The easy way}
If you are on a Unix-y machine, such as Linux,
try running \verb!./make_book_for_web.sh! from the command line.
That's how I get a version of the book.
If you are not on a Unix machine then you have to read
\verb!make_book_for_web.sh! and mimic the steps.
There are not too many of them; it shouldn't be hard.
These steps will give a printable version.
\begin{center}
\begin{tabular}{ll}
\verb!mpost dotprod.mp! &Make the dot product symbol. \\
\verb!mpost ch1.mp! \ldots \verb!mpost ch5.mp!, \verb!mpost appen.mp!, \verb!mpost voting.mp! &Make the line art. \\
\verb!pdflatex book! &Produce the book and the future references \\
\verb!makeindex -s book.isty -p odd book.idx! &Alphabatize index. \\
\verb!pdflatex book! &Produce the final version of the book \\
\verb!pdflatex jhanswer! &Produce the answers \\
\verb!pdflatex jhanswer! &Resolve references from the first run % \\
\end{tabular}
\end{center}
If something fails, make sure you have the latest \TeX{} installation.
Try it again.
If you still have trouble, in case it helps I can tell you what I have that
works for me.
I have the \TeX{}Live~2009 that comes with Ubuntu's package system.
The additional packages that I have downloaded (often these are updates
of the 2009 ones),
besides the ones distributed in my file bundle, are these.
\begin{verbatim}
$ ls /usr/local/share/texmf/tex/latex
emerald l3kernel luxi picins thmtools
etoolbox l3kernel.zip mdframed siunitx thmtools.zip
etoolbox.zip l3packages mdframed.zip siunitx.zip
geometry l3packages.zip mh slatex
geometry.zip local mh.zip tabu
\end{verbatim}
(Some of them may not be relevant.)
\subsubsection{When Good Systems Do Things That Are Bad}
What can go wrong?
Almost anything.
As Tom Wolfe quotes the early astronauts, ``It can blow at any seam.''
Discouraging, isn't it?
The MetaPost-ing can fail in a number of ways.
First, you need the \textit{3D} material from CTAN.
Second, you need all of the MetaPost material that I've generated
(e.g., \textit{venn.mp} for Venn diagrams), although
you'll have gotten that from me unless I've made a mistake.
Third, typesetting the labels, etc., may result in MetaPost
giving you a \LaTeX\ error.
The thing about this failure is that the error message
will say that the first label is bad.
But it isn't the first label; it is likely somewhere much further
down the file.
To figure it out you must run
`\verb!pdflatex mpxerr.tex!' (this oddly-named file is where MetaPost writes
the labeling lines for them to be automatically \LaTeX-ed).
Then you'll get an error message that at least points to the correct line,
and presumably a little staring at it will give you a clue.
(I've wasted any number of hours looking at line one when the
problem was somewhere else entirely.)
\LaTeX-ing the book can then give you a wide variety of
troubles.
It is a big book, and I use a number of styles.
If you are having trouble that seems to come from, say, \textit{color.sty},
your first try is to go to CTAN and download the latest.
In particular, I find that \textit{hyperref} has been a frequent
changer over the course of time that I have been working on the
text (understandably, obviously).
If you are having trouble with a part, see what commenting it out does.
Go into \textit{book.tex}, for instance and comment out that
part of the \verb!includeonly! material (watch your commas! if you
say `\verb!,vs3%,!' instead of `\verb!,vs3,%!' then you may find
\LaTeX\ complaining about
not finding \textit{vs3map1.tex} since \textit{map1} starts
the next line).
One area that can be annoying is that errors in the answer file do not
tell you the line number in the original source file.
Instead, they tell you the line number in the source file for the answers
(probably \textit{bookans.tex}).
That file was written when you \LaTeX-ed the book.
So don't edit that file since your changes will disappear the next time
you do the book again.
Instead, you can look up that line in the answer's source,
then look for that same line in the original source.
Edit that one.
Then \LaTeX\ the book again.
Thank goodness for fast computers.
(Getting the line numbers from the original source into \textit{bookans.tex}
somehow would be a fine project for someone.)
One trouble that I've had comes when switching between
a \textit{hyperref}-ed and non-\textit{hyperref}-ed versions.
\LaTeX\ complains about not liking the cross-reference file
(something about ``fifthoffive'').
My solution is to delete all the cross-reference files
(under Linux, \verb!rm -f *.aux *.toc!),
and then rerun the \LaTeX\ command line twice.
Not very elegant, I know, and once I accidentally left out the
\verb!.! between the \verb!*! and the \verb!aux!, but I am over that now.
\subsubsection{Options}
I have a number of versions.
If you like Knuth's Computer Modern Roman more than the Concrete/Euler
combination that is the default then edit
\verb!bookjh.sty! to make the change.
Now run \verb!./make_book_for_web.sh!.
\subsubsection{Slides}
I have some projector slides.
These are beta.
You can generate them by changing into the \verb!\slides! directory
and running \verb!./make_slides.sh!.
Some of the graphics take a few minutes to run, so you need to be patient.
% I have set up a few options.
% You can set the DVI driver from the command line with
% `\verb!pdflatex "\def\dvidrv{pdftex}\input book"!'
% (the DVI driver matters to the \textit{graphics} package).
% If you do not set this then the package \textit{dvidrv.sty} that I
% provided tries to guess it from your \textit{color.def} file, and failing
% that uses \textit{dvips}.
% To set your own default you can change the line in \textit{book.tex}
% to read, say, `\verb!\usepackage[dvips]{dvidrv}!'.
% Similarly, you can decide from the command line to have the output
% file hyperlinked (by using the package \textit{hyperref}).
% Say `\verb!pdflatex "\def\hrefout{yes}\input book"!'.
% Anything other than `yes', even `Yes' or `y', will leave the file not
% hyperlinked.
% You can also use the pbsi font in a similar way:
% `\verb!pdflatex "\def\pbsifont{yes}\input book"!'
% will use the font on the cover page and on chapter pages
% (you may need to download this font separately from a CTAN).
% These options combine.
% I use
% `\verb!pdflatex "\def\dvidrv{pdftex}\def\hrefout{yes}\input book"!' to
% produce output for \textit{Reader}.
% %Some options take some tweaking;
% %for instance, the DVI driver
% %\textit{dvips} will work if you ask for hyperlinking but you need
% %to call it specially to get the best results:
% %`\verb!dvips -Ppdf -G0 -obook.ps book!', I think, can be distilled
% %to give a sound \texttt{.pdf} file.
% All those options apply to the answer file, and one more.
% When you \LaTeX\ the book you can either choose to have all the
% answers output to a single file
% (the default filename is \textit{bookans.tex}),
% or to have the recommended answers output to one file \textit{recans.tex}
% and the other answers output to another \textit{otherans.tex}.
% The default is one big answer file.
% To switch it, look for a line early in \textit{book.tex} that says
% \verb!\usepackage[single,write]{bookans}! and change the
% `\verb!single!' to `\verb!double!'.
% Then to read in the file of interest, invoke the answer file with,
% for instance,
% `\verb!latex "\def\ansfile{recans}\input jhanswer"!'.
% The default here, matching the book's default,
% is to use the one big file \textit{bookans.tex}.
\section{Guide to the Macros}
You can use the same
macros to write your materials as are used in the text.
For example, when you make up an exam and you want to
refer to the vector space of polynomials of degree three,
use \verb!$\polyspace_3$!,
avoiding students' confusion and also simplifying your day.
This section describes how to use those macros.
First, the traditional disclaimer.
In developing the book, I got to know a little bit about how to write
\TeX\ and \LaTeX\ macros~--- but I didn't get to know a lot!
If you can improve what is here, I'd welcome that contribution.
\subsection{Linear algebra macros}
The macros that seemed to me to be specific to typesetting the
linear algebra material are in the file
\texttt{linalgjh.sty}.
For instance, here are macros for displaying systems of linear equations,
matrices, row and column vectors, special vector spaces, linear maps,
etc.
Note that the book uses the \textit{amsmath} package,
including the commutative diagram extension \textit{amscd},
so all of those
wonderful macros are available.
In particular, displayed equations are shown with
\verb|equation*| (the \texttt{*} makes them not-numbered) and all of the
alignment structures like \verb|align| and matrix structures
are available.
Another style that gets loaded is \textit{mathrsfs}, for the
Ralph Smith Formal Script fonts to make, for instance, the script R
for the range space.
\begin{description}
\item[linsys]
Make a linear system, in such a way that the columns line up.
Here is an example of a three-unknowns system; you want to
do this only as a displayed equation.
\begin{verbatim}
\begin{equation*}
\begin{linsys}{3}
x &+ &3y &+ &a &= &7 \\
x &- &3y &+ &a &= &7
\end{linsys}
\end{equation*}
\end{verbatim}
If a row is without some of the variables, be sure to nonetheless
add the appropriate \&'s.
\begin{verbatim}
\begin{equation*}
\begin{linsys}{3}
x &+ &3y &+ &a &= &7 \\
& &3y & & &= &7
\end{linsys}
\end{equation*}
\end{verbatim}
In the special case that a row starts with a negative sign, do not
use \&$-$.
That is, do not start the second line below with \verb! &- &3y!.
\begin{verbatim}
\begin{equation*}
\begin{linsys}{3}
x &+ &3y &+ &a &= &7 \\
& &-3y&+ &a &= &7
\end{linsys}
\end{equation*}
\end{verbatim}
\textit{Remarks.}
\begin{enumerate}
\item
In the exercises I might have three or four linear systems on
a horizontal line and to get them to line up (to be \texttt{t}-aligned)
I included an optional argument governing that vertical alignment.
\item
\latexnote
The variables are put in the columns right-justified, while the
additions or subtractions are centered.
Between the columns is put $4/18$-ths of an em (\TeX book, p.~167--170;
that's a medmuskip).
\item
\latexnote
The argument saying how many variables (which in the examples above
is the $3$)
is there instead of some quite large number because it isn't
as simple as $\text{\textit{arg}}+1$ times \texttt{rc}.
But I wasn't sure, and might be convinced to change this by someone
who knows what they are doing here.
\end{enumerate}
\item[grstep]
Denote a step of Gauss's Method.
\begin{verbatim}
\begin{equation*}
\begin{linsys}{2}
x &+ &y &= &0 \\
x &- &y &= &1
\end{linsys}
\grstep{-\rho_1+\rho_2}
\begin{linsys}{2}
x &+ &y &= &0 \\
& &-2y&= &1
\end{linsys}
\end{equation*}
\end{verbatim}
Show more than one row operation at a time with
\verb|\grstep[2\rho_5]{\rho_1+\rho_3}| for two row operations,
or \verb|\grstep[2\rho_5 \\ 3\rho_6]{\rho_1+\rho_3}| for three.
Swap two rows with \verb|\rho_1\swap\rho_2|.
\item[matrix structures]
Generic matrices are made with \verb|mat|.
\begin{verbatim}
\begin{equation*}
\begin{mat}
1 &2 &3 \\
4 &5 &6
\end{mat}
\end{equation*}
\end{verbatim}
Note that there is no need to specify the number of columns;
see the \textit{amsmath} documentation.
There is an optional argument to make the columns right-aligned.
\begin{verbatim}
\begin{equation*}
\begin{mat}[r]
1 &2 &13 \\
4 &5 &6
\end{mat}
\end{equation*}
\end{verbatim}
I restrict its use to those matrices (and column vectors) that contain
only numbers, no variables at all.
There are places where I needed something a little different.
In particular, I needed augmented matrices:
\begin{verbatim}
\begin{equation*}
\begin{amat}{2}
1 &2 &3 \\
4 &5 &6
\end{amat}
\end{equation*}
\end{verbatim}
produces a matrix that is two-by-three, with a vertical bar between
the final and next-to-final columns.
The argument \texttt{2} means that there
are two columns before the vertical bar.
(This also has an optional argument to right-align.)
I also sometime need matrices partitioned into columns:
\begin{verbatim}
\begin{equation*}
\begin{pmat}{c|c|c}
1 &2 &3 \\
4 &5 &6
\end{pmat}
\end{equation*}
\end{verbatim}
produces a two-by-three matrix that has vertical bars separating the
columns.
I make displayed determinant arrays with \verb!vmat!
\begin{verbatim}
\begin{equation*}
\begin{vmat}
a &c \\
b &d
\end{vmat}
=ad-bc
\end{equation*}
\end{verbatim}
and in-line determinants with \verb!\deter{A}!.
(Again, there is an optional argument to right-align.)
\item[vectors]
Make column vectors with \verb|\colvec{1 \\ 2 \\ 3}|.
(There is an optonal argument to right-align that I use
for number-only vectors \verb|\colvec[r]{1 \\ 2 \\ 3}|)
Make row vectors with \verb|\rowvec{1 &2 &3}|.
\item[decimal point-aligned columns]
I use the \textit{dcolumn} package:
\begin{verbatim}
\begin{equation*}
\begin{aligncolondecimal}{3}
15.12 &0.345
\end{aligncolondecimal}
\end{equation*}
\end{verbatim}
makes a column vector aligned on the decimal with room for at most
three decimal places on the right.
\item[strings]
A digit $3$ in a square is \verb!\digitinsq{3}!.
Not surprisingly, a digit $3$ in a circle is \verb!\digitincirc{3}!.
A sequence of strings is shown this way.
\begin{verbatim}
\begin{equation*}
\begin{strings}{ccccc}
\vec{e}_1 &\mapsto &\vec{e}_2 &\mapsto &\zero \\
\vec{e}_3 &\mapsto &\zero
\end{strings}
\end{equation*}
\end{verbatim}
There are five \verb!c!'s because the longest line
is of length five.
\item[names for things]
Note that there is a page (inside the book's cover)
covering the notation conventions.
I tried to remember to make up macros to name things, rather than retype the
thing each time I ran across it.
Here is a list.
\begin{enumerate}
\item The reals \verb|\Re|, the rationals \verb|\Q|,
the complex numbers \verb|\C|, the integers \verb|\Z|,
and the natural numbers \verb|\N| come out in the traditional
``blackboard bold''.
\item A vector is \verb|\vec{v}_j|.
The zero vector is \verb|\zero|.
The length of a vector is \verb|\norm{\vec{v}}|, and the
absolute value of a number is \verb|\absval{r}|.
An angle can be expressed in degrees as \verb!$53\degs$!.
The distance between two vectors is \verb|\dist (\vec{v}_1,\vec{v}_2)|.
\item The dot product of two vectors \verb|\vec{v}\dotprod\vec{w}|.
Please note that (as it is set up coming from me)
this is different than a \verb!\cdot!.
\item The vector space of degree $n$ polynomials \verb|\polyspace_n|,
and the vector space of $n$-by-$m$ matrices
\verb|\matspace_{\nbym{n}{m}}|.
The vector space of linear maps from $V$ to $W$
\verb|\linmaps{V}{W}|.
\item The span of a set $S$ of vectors
\verb|\spanof{S}|.
\item The row space of a matrix is \verb!\rowspace{M}! and
the columnspace is \verb!\colspace{M}!.
\item A set is \verb!\set{\colvec{x \\ y}\suchthat 2x+y=0}!.
The union and intersection of the sets $S$ and $T$ is
\verb|S\union T| and \verb|S\intersection T|.
The complement of a set is \verb!\complement{S}!.
\item The empty set is \verb!\emptyset!.
\item A sequence, such as a string, is \verb!\sequence{s_0,s_1,\dots,s_n}!.
The concatenation of two sequences is \verb!\cat{B_1}{B_2}!.
\item A basis is \verb!\basis{\vec{\beta}_1,\dots,\vec{\beta}_n}!.
The standard basis for real $n$-space is
\verb|\stdbasis_n|.
\item Isomorphic spaces is \verb!V\isomorphicto W!.
\item The matrix representing a linear map $h$ with respect to
the bases $B$ and $D$ is \verb|\rep{h}{B,D}|.
\item The size of a general matrix is \verb|\nbym{n}{m}|
while the special case of a square matrix is \verb|\nbyn{n}|.
\item A map $h$'s range space \verb|\rangespace{h}|
and null space \verb|\nullspace{h}|,
and generalized range space \verb|\genrangespace{h}|
and generalized null space \verb|\gennullspace{h}|
\item The direct sum of two subspaces \verb|V\directsum W|.
\item The function, as specified by its domain and codomain,
is described by \verb!\map{f}{D}{C}!.
Its action on a single element $x$ is
\verb|x\mapsunder{f} f(x)|.
Two maps are composed with \verb!\composed{g}{f}!.
The identity map is \verb|\identity|.
\item The projection of a vector into a subspace
\verb|\proj{\vec{v}}{S}|.
\item The restriction of a map to some subdomain is
\verb!\restrictionmap{f}{S}!.
\item The rank of a matrix \verb|\rank (A)| and the nullity of a
matrix \verb|\nullity (A)|.
The transpose of a matrix \verb|\trans{A}|.
The trace of a matrix \verb|\trace (A)|.
The adjoint of a matrix is \verb|\adj (A)|.
\item The size of a box is \verb!\size (B)!.
\item The signum of a permutation $\phi$ is \verb|\sgn (\phi)|.
\item For the Topic on voting, voter preferences are indicated
by \verb|\votepreflist{7}{1}{5}| for the column vector,
and \verb|\voteprefloop{1}{2}{3}| for the circle (for this one,
the first argument appears at the ten o'clock position, the second
argument at six o'clock, and the third argument at two o'clock).
\item A generic field is \verb!\F!.
\end{enumerate}
\item[aligned vdots]
To make \verb!\vdots! come out inside a bunch of aligned equations,
I use \verb!\vdotswithin{}! from the \textit{mathtools} package.
\begin{verbatim}
\begin{align*}
a_{1,1}x_1+\cdots+a_{1,n}x_n &= d_1 \\
&\vdotswithin{=} \\
a_{m,1}x_1+\cdots+a_{m,n}x_n &= d_m
\end{align*}
\end{verbatim}
Otherwise the three vertical dots are not centered on the equals sign.
\end{description}
\subsection{Book layout macros}
The macros that do chapter and section headings, or cross references,
or how the exercises are laid out, are in the file
\texttt{bookjh.sty}.
\begin{description}
\item[theorem-like structures]
I have already declared the
\texttt{theorem}, \texttt{lemma},
\texttt{definition}, and \texttt{corollary}
environments.
These will come out shaded.
To change this, or the color of the shading or its border, see
also \textit{bookjh.sty}
\begin{verbatim}
\begin{definition}
A \definend{big} vector space is one where you can't see the end when
you are standing at the zero vector, even with your glasses on.
\end{definition}
\end{verbatim}
I have also declared (not shaded):~ \texttt{example} and
\texttt{remark}.
By the way, note the \verb!\definend!; I use this for the
term being defined (I though I would automate indexing,
but I've not got around to that).
\item[proofs]
Use this.
\begin{verbatim}
\begin{proof}
Because I said so; that's why.
\end{proof}
\end{verbatim}
The end-of-proof symbol can be changed as
\verb!\renewcommand{\qedsymbol}{$\box$}!.
I avoid ever having a proof end with a displayed equation
so the question of
where to put the end-of-proof symbol in that case never arises.
\item[footnotes]
Footnotes come out on the same page as the reference.
I only use footnotes
to suggest that a reader can look for more in the Appendix
\verb!\appendrefs{codomains}!.
\item[graphics]
I am using MetaPost for all of the graphics and all of the
output drivers that I am interested in handle \textit{.mp}'s straight off.
Instead I say this.
\begin{verbatim}
\begin{center}
\includegraphics{gr2.7}
\end{center}
\end{verbatim}
Putting two graphics side-by-side, or putting parallel text, are
all a bit messy.
I use \verb!vcenteredhbox{}!
jJust mimic what I did somewhere.
\item[exercises and answers]
The exercise portions of a subsection looks like you might expect.
\begin{verbatim}
\begin{exercises}
\item
First Exercise
\begin{answer}
Answer to the first exercise.
\end{answer}
\item
Second Exercise
\begin{answer}
Answer to the second.
\end{answer}
\recommended \item
Third Exercise, recommended.
\begin{answer}
Answer to the third.
\end{answer}
\end{exercises}
\end{verbatim}
Exercises are, of course, numbered automatically,
in the same sequence as the
other numbered parts of the text.
My goal is to have all exercises have answers, even the proof exercises.
Of course, the answers are not written directly to the text;
they are written to one or two separate files.
Use \textit{jhanswer.tex} to print them.
\textit{Remarks.}
\begin{enumerate}
%\item If you dislike having the exercises numbered as though they form
% an integral part of the material of the subsection (even though
% they \emph{do} form an integral part), comment out the line
% in the definition of the environment \verb|exerciselist| that says
% \verb|\setcounter{exercisecounter}{#1}|.
% You also probably want to adjust the definitions of
% \verb|\exercise@makelabel| and \verb|\exercise@deflabel|
% (these are defined three times, once for default, once in the
% definition of a \verb|topic|, and once in the definition of a
% \verb|chapter|).
\item
Some of the exercises have parts.
I use the environment \verb|exparts|.
The items in such an
environment are \verb|\partsitem|'s.
\begin{verbatim}
\recommended\item Do this one right away.
\begin{exparts}
\partsitem Do this first.
\partsitem Do this second.
\end{exparts}
\begin{answer}
\begin{exparts}
\partsitem Answer to the first.
\partsitem Answer to the second.
\end{exparts}
\end{answer}
\end{verbatim}
I sometimes use \verb|exparts*|, which leaves the items in a
horizontal list, but it doesn't work very well (it sometimes
causes \TeX's \texttt{Underfull hbox} errors; this is not
as easy to fix as using a paralist because I don't want the
beginning of a part on one line and the end on another).
\item
Any desired changes to the spacing, etc., of exercises is
in \verb|exerciselist|.
See also the style for the answers in \textit{bookans.sty}.
\item
You can redefine \verb|\recommendationmark| to change
the mark used to denote recommended exercises.
You can also mark puzzles with \verb!\puzzle\item!.
This can be combined with \verb!\recommended!.
\item If you are putting in an exercise without an answer, your
best bet is to put an answer environment that is blank.
But really, you shouldn't do that.
I have found that doing the answers to all of the exercises
improved both the questions and the presentation greatly,
since I often found that I needed a detail here, or
some tweak there.
(If what you want is that students can't read the answer in their
answer list, that is a different matter.
See the next two remarks.)
\item
These answers are typically quite detailed, giving the work
and not just the answer; I approached the answers
expecting that the reader wants to learn
and did not take the
approach that the reader is trying to cheat.
(\textit{Remark}.
As a practicing teacher, I am very aware that it is not a simple
issue.
Nonetheless, in my opinion, a reader is
entitled to enough exercise and answer pairs that,
having tried a good selection and not just read the questions
and peeked at the answers,
they can move on well-prepared to the next subsection.
I figure that a dozen such pairs in each subsection is
about right.
Then, to provide a selection and also to allow someone
a second crack at a problem type that gave them trouble the
first time, I aimed for two dozen
questions in each subsection.
If this question/answer situation bothers you,
I would very much welcome additional submissions of
exercise sets for which students do not have access
to the answers.)
\item
As I've set it up, you can have the answers written to either
a single file,
or separate files for the answers to recommended exercises and
the answers to the others.
See the description above under `Options'.
\item
\latexnote
You can use \verb|\ref|'s inside answers, even though they
are written to other files.
The style for the answers reads in the reference files.
\item
An answer that is taken from a cited source may not blend
stylistically with the others (insofar as I have a style).
I use the disclaimer \verb|\answerasgiven|.
\end{enumerate}
\item[tfae]
A small environment for The Following are Equivalent-type lists.
\item[clearemptydoublepage]
Taken straight from the \textit{Companion}.
It does what it says.
\item[cross references]
I use \verb!\nearbydefinition{def:BigThm}!-like references.
This has the disadvantage that the referrer has to know what type
of textual element it is referring to (in this case a definition),
but \LaTeX\ doesn't give you a way to know in this case (that I can see).
Note that I try to make the \verb!\label{def:BigThm}! moderately
descriptive.
I have set up nearby cross references (meaning there is no need
to reference the chapter number and the section number) for:
\verb!\nearbydefinition!,
\verb!\nearbyfigure!,
\verb!\nearbylemma!,
\verb!\nearbyexample!,
\verb!\nearbycounterexample!,
\verb!\nearbytheorem!,
\verb!\nearbycorollary!,
\verb!\nearbyexercise!,
\verb!\nearbyremark!,
\verb!\nearbynotice!, and
\verb!\nearbynote!.
(I don't use most of these, but they are there anyway.)
\item[topics]
Begin a new
topic with \verb|\topic{My Favorite Topic}|.
The exercises come out looking a little differently automatically,
because I couldn't think of a common treatment that was both
convienent and consistent.
\item[optional subsections]
A subsection is marked as optional with \verb|\subsectionoptional|
instead of \LaTeX's standard \verb|\subsection|.
This asterisk's the name in the Table of Contents.
I have also followed the practice of beginning each optional
subsection with a
italicised comment that it is optional, but this is not part of the macro.
\item[page headings]
This work is all done through the wonderful \textit{fancyhdr} style.
See the documentation for that package.
\item[hyperlink style]
I have set the links to come out in blue.
Change that by altering the
\begin{verbatim}
\usepackage{
..,
linkcolor=blue,
..}{hyperref}
\end{verbatim}
entry.
\end{description}
\section{Making Your Exams}
I have included an exam style that does what you'd think it would do,
number the exercises automatically, automatically put headers and page
numbers, and optionally allow exercises to have attached answers that are
printed to a separate file.
Here is a sample exam, without answers.
See the web page for more extensive examples.
\begin{verbatim}
\begin{exam}
\item \pts{15}
How much wood could a woodchuck chuck?
\begin{enumerate}
\item If he would chuck wood?
\item If not?
\end{enumerate}
\item \pts{85}
Justify the Axiom of Choice, since we all know it is true anyway.
\end{exam}
\end{verbatim}
\section{Bugs}
See the \verb!TODO.org! file in the source.
% These are known to me; I'd appreciate any help, of course.
% \begin{description}
% \item[2001-Oct-08]
% I can't figure out how to get \textit{hyperref.sty} to