Debian Codegraph @

texmf-dist/doc/latex/delimseasy/delimseasyMan.tex

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %
3 % Manual for the package delimseasy1.01.sty
4 %
5 % Revison history (Manual):
6 % 2016/02/01
7 % added \thanks line for copyright notice
8 % added \valentine and \diamondsgbf
9 % added \L..., \R..., \BL..., \BR... as one-sided
10 % commands
11 % Revised \S3 to reflect addition of \llgg and
12 % \valentine commands.
13 %
14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15 \documentclass{amsart}
16 \usepackage{verbatim}
17 \usepackage{delimseasy2.0}
18 %
19 \setcounter{tocdepth}{3}
20 \title[delimseasy]{Package delimseasy}
21 \author[Graham]{Colin C. Graham}
22 \address{PO Box 2031\\Haines Junction YT Canada Y0B 1L0\\\texttt{
23 [email protected]}\hfill\break
24 \thanks{This material is subject to the LaTeX Project Public License 1.3. See
25 http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the
26 details of that license.}}
27 % Encapsulated \thanks in \address so the list of delimiters appears on page 1.
28 %
29 %
30
31 \begin{document}
32
33 \begin{abstract} Provides commands to give consistent, easy-to-remember, way to edit and control the size and blackness
34 of delimiters: append 1-4 ``b''s to command for larger sizes; prepend ``B'' for boldface; prepend ``D'' for the
35 \LaTeX\ default. These commands reduce the likelihood
36 of incomplete delimeter pairs and typically use fewer characters than the \LaTeX\ default.
37 \end{abstract}
38
39 \maketitle
40
41 \centerline{\texttt{[email protected]}}
42
43
44 \centerline{Version 2.0 -- 2016 February 1}
45
46
47 {\smaller
48 \tableofcontents}
49
50 \vspace{-.75in}
51
52 \section{Installation and the basic delimiters}
53 Put \texttt{delimseasy.sty} in a convenient folder and
54 add
55 \texttt{$\backslash$usepackage\{delimseasy\}}
56 to your preamble. If \LaTeX \ can't find the \texttt{sty} file,
57 move it to the folder of your \texttt{tex} file
58 or add a \texttt{PATH} to the \texttt{$\backslash$usepackage} parameter, so you have (for example)
59 \newline
60 \texttt{$\backslash$usepackage\{C:/user/YOU/Documents/WHEREYOUPUTIT/delimseasy\}}.
61
62 %\medskip
63 Here are the basic commands:
64 \begin{equation*}
65 \begin{matrix}
66 \text{The command}& \quad\text{ typesets as }&\quad \text{common name}\\
67 \backslash\texttt{prn\{$\backslash$\#\}} &\texttt{(\#1)} &\text{round parens}\\
68 \backslash\texttt{sqpr\{$\backslash$\#\}} &\texttt{[\#1]} &\text{square braces}\\
69 \backslash\texttt{crl\{$\backslash$\#\}} &\{\texttt{\#1} \} &\text{curly braces}\\
70 \backslash\texttt{ceil\{$\backslash$\#\}} &\backslash\texttt{lceil \#1} \backslash\texttt{rceil}&\text{ceiling}\\
71 \backslash\texttt{flr\{$\backslash$\#\}} &\backslash\texttt{lfloor \#1}\backslash\texttt{rfloor}&\text{floor}\\
72 \backslash\texttt{ngl\{$\backslash$\#\}} &\backslash\texttt{langle \#1}\backslash\texttt{rangle}&\text{langle/rangle}\\
73 \backslash\texttt{abs\{$\backslash$\#\}} &\backslash\texttt{vert \#1} \backslash\texttt{vert} &\text{absolute value}\\
74 \backslash\texttt{nrm\{$\backslash$\#\}} &\backslash\texttt{Vert \#1} \backslash\texttt{Vert} &\text{norm}\\
75 \backslash\texttt{stgt\{$\backslash$\#\}} &\stgt{\texttt{\#1}}& \text{lessthan greaterthan}
76 \end{matrix}
77 \end{equation*}
78
79 \subsection{Adding ``b''s to change the size; ``D''s to use \LaTeX\ default}
80 Add one to four ``b''s to the end of a command; each ``b'' raises size by one step. Example:
81 \texttt{$\backslash$prnb$\{x\widehat\ 2-1\}$} gives $\prnb{x^2-1}$.
82
83 Save typing by prepending ``D'' to the start of a
84 command to use the \texttt{$\backslash$left$\dots\backslash$right}
85 default sizing provided by \LaTeX.
86 Example: \texttt{$\backslash$Dprn$\{x\widehat\ 2-1\}$} gives
87 $\Dprn{x^2-1}$ while \texttt{$\backslash$Dprn$\{x-1\}$} gives $\Dprn{x-1}$.
88
89 \subsection{Adding ``L'' or ``R'' for one-sided delimiters}
90 Prepend upper or lowercase ``L'' or upper or lowercase
91 ``R'' to the front of the command (after the backslash) for the single
92 sided (\textbf{L}eft or \textbf{R}ight).
93 These commands take no parameter. Example: \texttt{$\backslash$Lprnb}
94 gives $\Lprnb$.
95
96 There are no one-sided versions of the \texttt{$\backslash$D...} commands.
97
98 \subsection{Prepending a ``B'' for boldface}
99 Prepend a capital ``B'' to the front of the command for
100 boldface (poor man's bold); if
101 the command is already a left or right, the ``B'' must
102 preceed the ``L'' or ``R''. Needs a parameter if the
103 non-bolded command does. Example: \texttt{$\backslash$Blprnb} gives $\Blprnb$.
104
105 This is not available for the $\backslash$\texttt{D\dots} commands.
106
107 \subsection{Ampersands (\&) not allowed inside paired delimeters}
108 Paired delimiters cause an error if the alignment
109 ampersand \& is used between them.
110 There may be other formatting characters which break
111 paired delimeters; please let me know if you
112 encounter any.
113
114 \textit{Workarounds}:
115 \begin{enumerate}
116 \item Rewrite. If you don't like the looks of
117 \begin{align*}
118 \int \text{A very very very very long expression }&\le \text{ a shorter one}\\
119 &\le\text{ another short one}\\
120 &=\text{the final expression}
121 \end{align*}
122 perhaps you can break up the computations into
123 smaller pieces so that you end with something like,
124 `` putting (3.12)-(3.36) together we see that
125 \[
126 \int \text{A very very very very long
127 expression }\le \text{the final expression}.\text{''}
128 \]
129
130 \item Use one-sided versions.
131
132 \item Use $\backslash$\texttt{phantom}. For example,
133 \begin{verbatim}
134 &\int \text{A very very very very long expression }
135 \le \text{ a shorter one}\\
136 &\phantom{\int \text{A very }}\le\text{the final expression}
137 \end{verbatim}
138 \vspace{-10pt}
139
140 gives
141 \begin{align*}
142 &\int \text{A very very very very long expression }
143 \le \text{ a shorter one}\\
144 &\phantom{\int \text{A very }}\le\text{the final expression}
145 \end{align*}
146
147 \end{enumerate}
148
149 \section{Examples}
150 \begin{enumerate}
151
152
153 \item Here are two versions of the same displays.
154 The first pair uses $\backslash$\texttt{left $\backslash$right} (implemented through $\backslash$\texttt{Dsqpr}
155 and $\backslash$\texttt{Dabs}); the
156 second $\backslash$\texttt{sqprbbb} and $\backslash$\texttt{absbbb...}.
157 I prefer the second pair for being using less vertical space and being more easily resizable than the first.
158 \[
159 \left[ \sum_n\frac{x_n}{y_n}\right]^{1/2}
160 \quad \Dabs{\int_a^b\prnbb{\frac{x+1}{x^2+5}}^p dx}^{1/p}
161 \]
162 \[
163 \sqprbb{\sum_n\frac{x_n}{y_n}}^{1/2}\quad
164 \absbbb{\int_a^b\prnbb{\frac{x+1}{x^2+5}}^p dx}^{1/p}
165 \]
166 \item Bold vs. default:
167 \[
168 \Bprnbb{\frac x{x^2+1}} \quad \prnbb{\frac x{x^2+1}} \quad
169 \Bcrlbb{\frac x{x^2+1}} \quad \crlbb{\frac x{x^2+1}}
170 \]
171 \end{enumerate}
172
173
174 The \texttt{tex} source for this PDF contains more examples, commented out.
175
176 \section{Further comments}
177 \subsection{An alternate package, \textit{delim}}
178 The package \textit{delim} by Stefan Majewsky
179 does things this one does
180 and may be preferred by many \LaTeX\ users.
181
182 \subsection{Bionomial coefficients and reversed delimiters}
183
184 Binomial coefficients often display with overly large parens. Versions under your control
185 are supplied.
186
187 At one time one saw open intervals expressed as
188 \[
189 \nrp{a,b} \quad\text{ or }\quad \rpqs{c,d}.
190 \]
191 This package provides paired delimeters at the 5 sizes,
192 with and without bold face, for those two
193 situations.
194 \begin{equation*}
195 \begin{matrix}
196 \text{The command}& \quad\text{ typesets as }&\quad \text{common name}&\quad \text{Sizes/BF version}\\
197 \texttt{$\backslash$bnom$\{\#1\}\{\#2\}$}&\bnom{\#1}{\#2}&\text{binomial coefficient}&5/yes\\\\
198 \texttt{$\backslash$bnomsq$\{\#1\}\{\#2\}$}&\bnomsq{\#1}{\#2}&\text{binomial coefficient}&5/yes\\\\
199 \texttt{$\backslash$bnomcrl$\{\#1\}\{\#2\}$}&\bnomcrl{\#1}{\#2}&\text{binomial coefficient}&5/yes\\\\
200 \texttt{$\backslash$bnomngl$\{\#1\}\{\#2\}$}&\bnomngl{\#1}{\#2}&\text{binomial coefficient}&5/yes
201 \\
202 \texttt{$\backslash$nrp\{$\backslash$\#1\}} &\nrp{\texttt{\#1}}& \text{reversed parens}&5/yes\\
203 \texttt{$\backslash$rpqs\{$\backslash$\#1\}} & \rpqs{\texttt{\#1}}&\text{reversed square braces}&5/yes
204 \end{matrix}
205 \end{equation*}
206
207
208 \subsection{More delimiters, including 2 for Valentine's Day}
209 \begin{equation*}
210 \begin{matrix}
211 \text{The command}& \quad\text{ typesets as }&\quad \text{common name}&\quad \text{Sizes/BF version}
212 \\
213 \backslash\texttt{stgt\{$\backslash$\#1\}} &\texttt{< \#1>} & \text{lessthan greaterthan}&5/yes\\
214 \backslash\texttt{llgg\{$\backslash$\#1\}} &\texttt{$\ll$\#1$\gg$}&\text{muchless muchmore}&5/yes\\
215 \backslash\texttt{valentine\{$\backslash$\#1\}}&\valentine{\texttt{\#1}} &\text{surrounded by love}&1/no\\
216 \backslash\texttt{diamondsgbf\{$\backslash$\#1\}}&\diamondsgbf{\texttt{\#1}}& \text{buried in diamonds}&1/no
217 \end{matrix}
218 \end{equation*}
219
220 To make your own delimiter pairs, just adapt the models in the
221 \texttt{sty} file.
222 Note that the $\backslash$\texttt{B}... versions use
223 $\backslash$\texttt{pmb} (poor man's bold)
224 throughout because $\backslash$\texttt{boldsymbol}
225 does not work for all delimiters, while $\backslash$\texttt{pmb}
226 does. Some ``delimiters'' may not have
227 $\backslash$\texttt{big}(ger) versions so you will have to improvise, as here for
228 $\ll\dots\gg$.
229 The larger versions of $\ll\dots\gg$ do not look great; they merely illustrate what can be naively
230 achieved.
231
232 The two Valentine delimiters must be in Math mode. If your beloved's name has spaces,
233 you will need to protect
234 the space(s) by preceding each one with
235 a $\backslash$\texttt{backslash} since
236 Math mode ignores unprotected spaces. The Valentines commands can be nested at least once:
237 \[
238 \valentine{\ \diamondsgbf{\ Kim\ }\ }\qquad {\diamondsgbf{\ \valentine{Leslie}\ }}
239 \qquad\valentine{\valentine{\valentine{\ \valentine{ Deniz }\ }}}.
240 \]
241 Adjusting the space in the various pairs with $\backslash{\ }$'s may improve the look.
242 \subsection{Easy to remember sizers}
243 \texttt{delimseasy} includes
244 versions of \LaTeX's
245 built-ins:
246
247 \[\begin{matrix}
248 \text{New}&\text{\LaTeX\ built-in}\\
249 &\texttt{$\backslash$big}\\
250 \backslash\texttt{bigb} &\texttt{$\backslash$Big}\\
251 \backslash\texttt{bigbb} &\texttt{$\backslash$bigg}\\
252 \backslash\texttt{bigbbb}&\texttt{$\backslash$Bigg}
253 \end{matrix}\]
254 \subsection{Revision history}
255 2016/02/01. Added capital ``L'' and capital ``R'' option for
256 single sided. Removed manual's references to ``l'' and ``r'' versions though
257 they remain implemented for backward compatibility.
258
259 Added ``D'' versions for those who prefer \LaTeX's choice for sizing.
260
261 Added new delimiters: $\bnom{p+q}{q}$, $\llgg{\dots}$, $\valentine{\dots}$ and $\diamondsgbf{\dots}$.
262
263 Added this subsection and information about the new delimiters.
264
265 Many minor stylistic changes to manual.
266 \begin{comment}% testing, testing.........
267 reverse parens
268 \begin{align*}
269 \nrp{
270 \nrpb{
271 \nrpbb{
272 \nrpbbb{
273 \nrpbbbb{w}}}}}
274 %%%%%%%%%%%%%
275 % reverse bold paired square braces
276 \rpqs{
277 \rpqsb{
278 \rpqsbb{
279 \rpqsbbb{
280 \rpqsbbbb{z}}}}}
281 %
282 \end{align*}
283 %
284
285 stgt's
286 \begin{align*}
287 &
288 \rstgt
289 \rstgtbb
290 \rstgtbbb
291 \rstgtbbbb
292 %%
293 \Brstgt
294 \Brstgtb
295 \Brstgtbb
296 \Brstgtbbb
297 \Brstgtbbbb\\
298 & \stgt{\stgtb{\stgtbb{\stgtbbb{\stgtbbbb{w}}}}}\\
299 &\Bstgt{\Bstgtb{\Bstgtbb{\Bstgtbbb{\Bstgtbbbb{w}}}}}\\
300 &
301 \lstgt
302 \lstgtb
303 \lstgtbb
304 \lstgtbbb
305 \lstgtbbbb
306 %%
307 \Blstgt
308 \Blstgtb
309 \Blstgtbb
310 \Blstgtbbb
311 \Blstgtbbbb
312 \end{align*}
313
314 parens, etc:
315 \begin{align*}
316 \Bprn{\Bprnb{\Bprnbb{\Bprnbb{\Bprnbbb{\Bprnbbb{}}}}}}&\quad\
317 \end{align*}\begin{align*}
318 \Bsqpr{\Bsqprb{\Bsqprbb{\Bsqprbbb{\Bsqprbbbb{x}}}}}\\
319 \end{align*}\begin{align*}
320 \Bcrl{\Bcrlb{\Bcrlbb{\Bcrlbbb{\Bcrlbbbb{z}}}}}
321 \end{align*}\begin{align*}
322 &\quad
323 \Bflr{\Bflrb{\Bflrbb{\Bflrbbb{\Bflrbbb{47}}}}}\\
324 \Bceil{\Bceilb{\Bceilbb{\Bceilbbb{\Bceilbbbb{2}}}}}&\quad\Bnglbbbb{\Bnglbbb{\Bnglbb{\Bnglb{\Bngl{x|y}}}}}\\
325 \end{align*}
326 \begin{align*}
327 \Babsbbbb{\Babsbbb{\Babsbb{\Babsb{\Babs{f}}}}}&\quad \Bnrmbbbb{\Bnrmbbb{\Bnrmbb{\Bnrmb{\Bnrm{z}}}}}\\
328 %\cardbbbb{\cardbbb{\cardbb{\cardb{\card{x}}}}}\\
329 \Blprn{\Blprnb{\Blprnbb{\Blprnbb{\Blprnbbb{\Blprnbbb{x}}}}}}&\quad \Blsqpr{\Blsqprb{\Blsqprbb{\Blsqprbbb{\Blsqprbbbb{}}}}}\\
330 \Blcrl{\Blcrlb{\Blcrlbb{\Blcrlbbb{\Blcrlbbbb{}}}}}&\quad
331 \Blflr{\Blflrb{\Blflrbb{\Blflrbbb{\Blflrbbb{}}}}}\\
332 \end{align*}
333 \begin{align*}
334 \Blceil{\Blceilb{\Blceilbb{\Blceilbbb{\Blceilbbbb{}}}}}
335 &\quad\Blnglbbbb{\Blnglbbb{\Blnglbb{\Blnglb{\Blngl{x|y}}}}}\\
336 \end{align*}
337 \begin{align*}
338 \Blabsbbbb{\Blabsbbb{\Blabsbb{\Blabsb{\Blabs{}}}}}
339 &\quad \Blnrmbbbb{\Blnrmbbb{\Blnrmbb{\Blnrmb{\Blnrm{}}}}}\\
340 \Brprn \Brprnb \Brprnbb \Brprnbb\Brprnbbb\Brprnbbb&\quad\ \Brsqpr{\Brsqprb{\Brsqprbb{\Brsqprbbb{\Brsqprbbbb{}}}}}\\
341 \Brcrl{\Brcrlb{\Brcrlbb{\Brcrlbbb{\Brcrlbbbb{}}}}}&\quad
342 \Brflr{\Brflrb{\Brflrbb{\Brflrbbb{\Brflrbbb{}}}}}\\
343 \Brceil{\Brceilb{\Brceilbb{\Brceilbbb{\Brceilbbbb{}}}}}
344 &\quad\Brnglbbbb{\Brnglbbb{\Brnglbb{\Brnglb{\Brngl{}}}}}\\
345 \Brabsbbbb{\Brabsbbb{\Brabsbb{\Brabsb{\Brabs{}}}}}
346 &\quad \Brnrmbbbb{\Brnrmbbb{\Brnrmbb{\Brnrmb{\Brnrm{}}}}}
347 \\
348 &\llgg{\llggb{\llggbb{X}}}%\llggbbb{\llggbbbb{X}}}}}\\
349 &\Bllgg{\Bllggb{\Bllggbb{\Bllggbbb{\Bllggbbbb{X}}}}}
350 \end{align*}
351 \[
352 \bnom{{x+y}}{x}\quad\bnomb{x+y}{x}\quad\bnombb{x+y}{x}\quad\bnombbb{x+y}{x}\quad\bnombbbb{x+y}{x}
353 \]
354 \[
355 \Bbnom{{x+y}}{x}\quad\Bbnomb{x+y}{x}\quad\Bbnombb{x+y}{x}\quad\Bbnombbb{x+y}{x}\quad\Bbnombbbb{x+y}{x}
356 \]
357
358 \[
359 \bnomsq{{x+y}}{x}\quad\bnomsqb{x+y}{x}\quad\bnomsqbb{x+y}{x}\quad\bnomsqbbb{x+y}{x}\quad\bnomsqbbbb{x+y}{x}
360 \]
361 \[
362 \Bbnomsq{{x+y}}{x}\quad\Bbnomsqb{x+y}{x}\quad\Bbnomsqbb{x+y}{x}\quad\Bbnomsqbbb{x+y}{x}\quad\Bbnomsqbbbb{x+y}{x}
363 \]
364 \[
365 \bnomcrl{{x+y}}{x}\quad\bnomcrlb{x+y}{x}\quad\bnomcrlbb{x+y}{x}\quad\bnomcrlbbb{x+y}{x}\quad\bnomcrlbbbb{x+y}{x}
366 \]
367 \[
368 \Bbnomcrl{{x+y}}{x}\quad\Bbnomcrlb{x+y}{x}\quad\Bbnomcrlbb{x+y}{x}\quad\Bbnomcrlbbb{x+y}{x}\quad\Bbnomcrlbbbb{x+y}{x}
369 \]
370 \[
371 \bnomngl{{x+y}}{x}\quad\bnomnglb{x+y}{x}\quad\bnomnglbb{x+y}{x}\quad\bnomnglbbb{x+y}{x}\quad\bnomnglbbbb{x+y}{x}
372 \]
373 \[
374 \Bbnomngl{{x+y}}{x}\quad\Bbnomnglb{x+y}{x}\quad\Bbnomnglbb{x+y}{x}\quad\Bbnomnglbbb{x+y}{x}\quad\Bbnomnglbbbb{x+y}{x}
375 \]
376 \\[
377 \Dprn{\int}\quad\Dsqpr{\int}\quad\Dcrl{\int}\quad\Dngl{\int}
378 \]
379 \[
380 \Dceil{3}\quad\Dflr{pp}\quad\Dabs{\int}\quad\Dnrm{\int}\quad\Dstgt{kk}
381 \]
382 \end{comment} %end of testing
383 \end{document}