2 % This is meant to be used by all the books. Nothing specific to the LM
3 % series should go in here.
4 %-------------------- eg environment -------------------
6 \setlength{\egindent}{3mm
}
7 \newlength{\saveleftskip}
8 \newcommand{\myindented}[2]{%
9 \setlength{\saveleftskip}{\leftskip}%
10 \addtolength{\leftskip}{#1}#2%
11 \par \setlength{\leftskip}{\saveleftskip} \par%
13 \definecolor{egrulegray
}{gray
}{.6}
14 \newlength{\egrulehspace}
15 \setlength{\egrulehspace}{.5mm
}
16 \newlength{\egrulelen}
17 \setlength{\egrulelen}{110.5mm
}
18 \newcommand{\egrule}[1]{\makebox[0mm
][l
]{\color{egrulegray
}\rule{#1}{0.5pt
}}}
19 \newcommand{\egvrule}{\makebox[0mm
][l
]{\color{egrulegray
}\rule{0.5pt
}{2mm
}}}
20 \newcommand{\egbothrules}[1]{\makebox[0mm
][l
]{\hspace{-
0.5mm
}\raisebox{1.5mm
}{\egvrule}\raisebox{3.5mm
}{\egrule{#1}}}}
21 \newcommand{\egtit}[2]{\egbothrules{#1}\textit{\hspace{\egrulehspace}#2\hfill{}\langexample{} \theegctr}}
22 \newcommand{\baretit}[1]{\egbothrules{\egrulelen}\textit{\hspace{\egrulehspace}#1}}
23 \newenvironment{eg
}[2][3]
25 \refstepcounter{egctr
}%
26 \setlength{\saveleftskip}{\leftskip}%
27 \addtolength{\leftskip}{\egindent}%
29 \pagebreak[#1]\noindent\egtit{\egrulelen}{#2}\\*
\noindent\myeqnspacing\protect\sansmath%
30 \indentedcorrstart% for margdown
31 \setlength{\parindent}{0mm
}%undone by normalparafmt
35 \lmserifmath\par\setlength{\leftskip}{\saveleftskip} \par\myeqnspacing%
38 \newenvironment{egwide
}[2][3]
40 \noindent\begin{minipagefullpagewidth
}
41 \refstepcounter{egctr
}%
42 \setlength{\saveleftskip}{\leftskip}%
43 \addtolength{\leftskip}{\egindent}%
45 \pagebreak[#1]\noindent\egtit{169mm
}{#2}\\*
\noindent\myeqnspacing\protect\sansmath%
46 \indentedcorrstart% for margdown
47 \setlength{\parindent}{0mm
}%undone by normalparafmt
51 \lmserifmath\par\setlength{\leftskip}{\saveleftskip} \par\myeqnspacing%
53 \end{minipagefullpagewidth
}
55 \newcommand{\xmark}{\anonymousinlinefig{x-mark
}}
56 \newenvironment{egnoheader
}
58 \setlength{\saveleftskip}{\leftskip}%
59 \addtolength{\leftskip}{\egindent}%
61 \noindent\protect\sansmath\noindent%
62 \indentedcorrstart% for margdown
66 \lmserifmath\par\setlength{\leftskip}{\saveleftskip} \par\myeqnspacing%
69 \newcommand{\egquestion}{\noindent\ensuremath{\triangleright}\
}
70 \newcommand{\eganswer}{\noindent\ensuremath{\triangleright}\
}
71 \newenvironment{likeeg
}
73 \setlength{\saveleftskip}{\leftskip}%
74 \addtolength{\leftskip}{\egindent}%
75 \small\sffamily\noindent
78 \par\setlength{\leftskip}{\saveleftskip} \par%
80 \newcommand{\optionaltopictit}[1]{\egbothrules{\egrulelen}\textbf{\hspace{\egrulehspace}#1}}
81 \renewcommand{\thescctr}{\Alph{scctr
}}
82 \newcommand{\scansref}[1]{$
\triangleright$\ Answer, p.
\pageref{scans:
#1}}
83 \newcommand{\whichsc}{}
84 \newenvironment{selfcheck
}[1]
86 \refstepcounter{scctr
}\label{sc:
#1}\renewcommand{\whichsc}{#1}%
87 \setlength{\saveleftskip}{\leftskip}%
88 \addtolength{\leftskip}{\egindent}%
90 \noindent\hspace{-
1mm
}%
91 %\egbothrules{\egrulelen}%
92 \hspace{\egrulehspace}%
93 \textit{\langselfcheck{}\
\thescctr}\\*
\noindent\myeqnspacing\protect\sansmath%
94 \setlength{\parindent}{0mm
}%undone by normalparafmt
98 \hfill\scansref{\whichsc}\normalsize\normalfont\lmserifmath\par\setlength{\leftskip}{\saveleftskip} \par\myeqnspacing%
100 \newcommand{\worked}[2]
103 \vspace{1.5mm
}\noindent\hspace{3.5mm
}\hwtriangle\
\textit{Solved problem:
#2\hfill{}page
\pageref{hw:
#1}, problem
\ref{hw:
#1}}
104 \lmserifmath\par\normalsize\normalfont %\par %
106 % The following is meant for a long block of text appearing inside <% marg() %>...<% end_marg %>
107 \newenvironment{margtopic
}[1] % args is title
110 \small\sffamily\myeqnspacing\protect\sansmath%
115 \lmserifmath\normalsize\normalfont %
117 % optional topics have titles with initial caps -- not any more???
118 \newenvironment{optionaltopic
}[2][3]
120 \setlength{\saveleftskip}{\leftskip}%
121 \addtolength{\leftskip}{\egindent}%
123 \pagebreak[#1]\noindent\optionaltopictit{#2}\\*
\noindent\myeqnspacing\protect\sansmath%
126 \lmserifmath\par\setlength{\leftskip}{\saveleftskip} \par\myeqnspacing%
128 \newenvironment{offsettopic
}[1][3]
131 \setlength{\saveleftskip}{\leftskip}%
132 \addtolength{\leftskip}{\egindent}%
134 \noindent\myeqnspacing\protect\sansmath%
135 \hspace{-
5mm
}%***************** KLUDGE *****************
138 \lmserifmath\par\setlength{\leftskip}{\saveleftskip} \par\myeqnspacing%
140 \newenvironment{longquote
}
142 \setlength{\saveleftskip}{\leftskip}%
143 \addtolength{\leftskip}{\egindent}%
145 \myeqnspacing\protect\sansmath\noindent%
148 \lmserifmath\par\setlength{\leftskip}{\saveleftskip} \par\myeqnspacing%
150 \newenvironment{dialogline
}[1]%
152 \setlength{\saveleftskip}{\leftskip}%
153 \addtolength{\leftskip}{10mm
}%
154 \noindent{}\sffamily\protect\sansmath%
157 \par \setlength{\leftskip}{\saveleftskip} \par%
160 \newcommand{\labelimportantintext}[1]{\textbf{#1}}
161 % The optional argument is a title, which should be lowercase.
162 \newenvironment{important
}[1][]%
163 {\begin{shaded
}\ifthenelse{\equal{#1}{}}{}{\textbf{#1}\\*
}}%
165 \newenvironment{lessimportant
}[1][]%
167 \setlength{\saveleftskip}{\leftskip}%
168 \addtolength{\leftskip}{10mm
}%
169 \noindent\ifthenelse{\equal{#1}{}}{}{\textbf{#1}\\*
}%
171 \par \setlength{\leftskip}{\saveleftskip} \par%
173 \newenvironment{indentedblock
}%
175 \setlength{\saveleftskip}{\leftskip}%
176 \addtolength{\leftskip}{10mm
}%
177 \noindent\hspace{-
1.5mm
}% kludge !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
179 \par \setlength{\leftskip}{\saveleftskip} \par%