Debian Codegraph @

texmf-dist/doc/latex/accents/accents.tex

raw
1 %
2 % Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
3 %
4 % This file may be distributed and/or modified under the conditions of
5 % the MIT License. A version can be found at the end of this file.
6 %
7
8 \def\fileversion{1.4}
9 \def\docdate{May 12, 2006}
10
11 \documentclass{ltxguide}
12 \usepackage{accents}
13
14 \title{The \textsf{accents} Package\footnote{This
15 package is currently at version \fileversion.}}
16
17 \author{Javier Bezos\footnote{For bug reports, comments and
18 suggestions go to
19 \texttt{http://www.tex-tipografia.com}.
20 English is not my strong point, so contact me when you find mistakes
21 in the manual. Other packages by the same author: \textsf{tensind}
22 (tensorial indexes), \textsf{spanish} (for babel), \textsf{titlesec}
23 (to redefine sectioning macros), \textsf{dotlessi} (dotless i in any
24 math group).}}
25
26 \date{\docdate}
27
28 \newenvironment{sample}{\begin{quote}\small\begin{tabbing}%
29 \hskip14pc\=\hskip6pc\\}
30 {\end{tabbing}\end{quote}}
31
32 \DeclareMathAccent{\wtilde}{\mathord}{largesymbols}{"65}
33
34 \raggedright
35 \advance\textheight24pt
36
37 \begin{document}
38
39 \maketitle
40
41 This package provides some miscellaneous tools for mathematical
42 accents, with the following goals in mind:
43 \begin{itemize}
44 \item Creating faked accents from non-accent symbols, like
45 $\accentset{\star}{s}$.
46 \item Grouping them, perhaps including actual accents, like
47 $\hat{\accentset{\star}{\hat h}}$. That
48 has the side effect that multiple actual accents can be built
49 as well.
50 \item Putting them below the main symbol instead of above.
51 \end{itemize}
52
53 That is done so that the faked accents behave in quite similar fashion
54 to actual accents do; i.e., the skew of the letter is taken into
55 account (compare $\accentset{\ast}{d}$ with
56 $\accentset{\ast}{h}$) and the sub and superscripts attached to
57 it aren't misplaced (look carefully at $\accentset{\star}{f}_1^1$).
58
59 Release 1.1 included a few new features, some of them following
60 suggestions by Donald Arseneau. In particular, the |\underaccent|
61 command has been fully reimplemented for the slant to be taken into
62 account and the ``accent'' to be placed below the symbol can be
63 anyone, not only real accents. This release just makes it compatible
64 with \textsf{amsmath} 2 with a quick fix.
65
66 \begin{decl}
67 |\DeclareMathAccent|
68 \end{decl}
69
70 This \LaTeXe{} command is reimplemented so that newly defined accents
71 will incorporate the features of this package. The standard accents
72 are automatically redefined, including |\mathring| if you are using
73 one of the latest \LaTeX{} releases. However, both |\widetilde| and
74 |\widehat| remains untouched. If you are using a non standard
75 math encoding, the accents following the standard encoding names are
76 rightly redefined, but new accents are not converted because
77 \textsf{accents} is not aware of its existence.
78
79 See |fntguide.tex| in the \LaTeX{} standard distribution for a discussion on
80 |\DeclareMathAccent|.
81
82 \begin{decl}
83 |\ring{<symbol>}|
84 \end{decl}
85
86 The accent in $\ring{x}$, which was available in this package (and
87 in fact in many others) before
88 the |\mathring| command was added to the \LaTeX{} kernel.
89
90 \begin{decl}
91 |\accentset{<accent>}{<symbol>}|
92 \end{decl}
93
94 Builds a faked accent, as for instance
95 \begin{sample}
96 |\accentset{\star}{d}| \> $\accentset{\star}{d}$\\
97 |\accentset{\diamond}{h}| \> $\accentset{\diamond}{h}$\\
98 |\tilde{\accentset{\circ}{\phi}}| \>
99 $\tilde{\accentset{\circ}{\phi}}$
100 \end{sample}
101 The |<accent>| is always in |\scriptscriptmode|; hence, using
102 |\accentset| in scripts won't give the desired result. Of course,
103 if you use some faked accent many times, you can define:
104 \begin{verbatim}
105 \newcommand\starred[1]{\accentset{\star}{#1}}
106 \end{verbatim}
107 and |\starred| will become an accent, like |\hat|, |\tilde|, etc.
108
109 \begin{decl}
110 |\dddot \ddddot|
111 \end{decl}
112
113 Two prefabricated faked accents: $\dddot{f}$ and $\ddddot{f}$.
114
115 \begin{decl}
116 |\underaccent{<accent>}{<symbol>}|
117 \end{decl}
118
119 This command puts the |<accent>| under the |<symbol>|. Both real
120 and faked accents are allowed. For instance,
121 \begin{sample}
122 |\underaccent{\hat}{x}| \> $\underaccent{\hat}{x}$\\
123 |\underaccent{\bar}{\gamma}| \> $\underaccent{\bar}{\gamma}$\\
124 |\underaccent{\triangleright}{q}| \>
125 $\underaccent{\triangleright}{q}$\\
126 |\underaccent{\tilde}{\mathcal{A}}| \>
127 $\underaccent{\tilde}{\mathcal{A}}$
128 \end{sample}
129
130 Many people likes using the wider version of the tilde accent as
131 printed by the |\widetilde| command, i.e., $\widetilde{A}$ instead of
132 $\tilde{A}$. I find that aesthetically questionable, but anyway it
133 can be used under the symbol as well. Since |\widetilde| remains
134 untouched, you should define:
135 \begin{verbatim}
136 \DeclareMathAccent{\wtilde}{\mathord}{largesymbols}{"65}
137 \end{verbatim}
138 and write |\underaccent{\wtilde}{V}|, say (giving
139 $\underaccent{\wtilde}{V}$). You may build an accent with
140 |\sim|, too. (The value for a wide hat is |"62|)
141
142 Sadly, \TeX{} lacks of a mechanism to place underaccents similar to
143 that used in accents. Letters have a large variety of shapes and
144 finding an automatic adjusting is practically impossible. Compare for
145 instance the following letters:
146 \begingroup
147 \def\\{\underaccent{\bar}}%
148 $\\V$, $\\Q$, $\\p$, $\\q$, $\\f$,
149 $\\\beta$, $\\\gamma$, $\\{\mathcal{F}}$, $\\{\mathcal{A}}$
150 \endgroup
151 and you wil understand the difficulties.
152
153 \begin{decl}
154 |\undertilde{<symbols>}|
155 \end{decl}
156
157 This is the ``under'' version of |\widetilde| and like the latter is intended for constructions
158 involving several symbols. For instance:
159 \begin{sample}
160 |\undertilde{CV}| \> $\undertilde{CV}$
161 \end{sample}
162 Note that in this case no correction is made in the placement of the tilde.
163
164 \begin{decl}
165 |nonscript single|
166 \end{decl}
167
168 These package options are intended mainly for speeding up the
169 typesetting of document. The algorithm used here is recursive and
170 very slow; although in fast processors that is not felt, in slow
171 system that could be very annoying.
172
173 \begin{description}
174 \item[single] If you are interested only in |\accentset|.
175 Accents are not reimplemented.
176 \item[nonscript] If you intend to use multiple accents in
177 text and display modes only.
178 \end{description}
179
180 Macros are speeded up dramatically with both options; if your system is slow,
181 I commend using them in drafts and removing them for the final print.
182
183 Finally, some remarks:
184 \begin{itemize}
185 \item The package does not provides alternative accents for fonts
186 lacking them. If you want an accented |\mathcal| letter you had to
187 write |\hat{\hat{\mathcal{A}}}| ($\hat{\hat{\mathcal{A}}}$).
188 \item |\mathbf{\hat{\hat h}}| gets the bold accent;
189 |\hat{\hat{\mathbf{h}}}| not.
190 \item The symbol in |\accentset| must be a single symbol.
191 \item If you use \textsf{accents} with \textsf{amsmath} 2, you must
192 load \textsf{accents} after. Note that \textsf{amsmath} could redefine
193 some accents; in particular, if you experience problems with |\vec|
194 and you are using the standard math encodings, define:
195 \begin{verbatim}
196 \let\vec\relax
197 \DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
198 \end{verbatim}
199 \end{itemize}
200
201 \end{document}
202
203 MIT License
204 -----------
205
206 Permission is hereby granted, free of charge, to any person obtaining a
207 copy of this software and associated documentation files (the
208 "Software"), to deal in the Software without restriction, including
209 without limitation the rights to use, copy, modify, merge, publish,
210 distribute, sublicense, and/or sell copies of the Software, and to
211 permit persons to whom the Software is furnished to do so, subject to
212 the following conditions:
213
214 The above copyright notice and this permission notice shall be included
215 in all copies or substantial portions of the Software.
216
217 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
218 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
219 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
220 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
221 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
222 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
223 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.