summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-27 21:36:19 +0000
committerKarl Berry <karl@freefriends.org>2019-06-27 21:36:19 +0000
commitdd0a25b1c3c22f05e8cfdcd3b8514ac59fdc9dcb (patch)
tree96bcf91800a8013e4495fed248917d6f368d0d9b
parent602d0a484dc53b95cd65f11a7ab4db83d6fc5f11 (diff)
accents (26jun19)
git-svn-id: svn://tug.org/texlive/trunk@51497 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/accents/README.md12
-rw-r--r--Master/texmf-dist/doc/latex/accents/accents.pdfbin0 -> 235262 bytes
-rw-r--r--Master/texmf-dist/doc/latex/accents/accents.tex223
-rw-r--r--Master/texmf-dist/tex/latex/accents/accents.sty287
-rw-r--r--Master/tlpkg/tlpsrc/accents.tlpsrc0
-rw-r--r--Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc1
6 files changed, 523 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/accents/README.md b/Master/texmf-dist/doc/latex/accents/README.md
new file mode 100644
index 00000000000..62884db9c38
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/accents/README.md
@@ -0,0 +1,12 @@
+
+Tools for math accents: multiple and newly defined ones.
+
+License: MIT
+________
+Javier Bezos --- http://www.texnia.com
+
+
+
+
+
+
diff --git a/Master/texmf-dist/doc/latex/accents/accents.pdf b/Master/texmf-dist/doc/latex/accents/accents.pdf
new file mode 100644
index 00000000000..5ff62d6539f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/accents/accents.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/accents/accents.tex b/Master/texmf-dist/doc/latex/accents/accents.tex
new file mode 100644
index 00000000000..c6682350ad4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/accents/accents.tex
@@ -0,0 +1,223 @@
+%
+% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
+%
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
+%
+
+\def\fileversion{1.4}
+\def\docdate{May 12, 2006}
+
+\documentclass{ltxguide}
+\usepackage{accents}
+
+\title{The \textsf{accents} Package\footnote{This
+package is currently at version \fileversion.}}
+
+\author{Javier Bezos\footnote{For bug reports, comments and
+suggestions go to
+\texttt{http://www.tex-tipografia.com}.
+English is not my strong point, so contact me when you find mistakes
+in the manual. Other packages by the same author: \textsf{tensind}
+(tensorial indexes), \textsf{spanish} (for babel), \textsf{titlesec}
+(to redefine sectioning macros), \textsf{dotlessi} (dotless i in any
+math group).}}
+
+\date{\docdate}
+
+\newenvironment{sample}{\begin{quote}\small\begin{tabbing}%
+ \hskip14pc\=\hskip6pc\\}
+ {\end{tabbing}\end{quote}}
+
+\DeclareMathAccent{\wtilde}{\mathord}{largesymbols}{"65}
+
+\raggedright
+\advance\textheight24pt
+
+\begin{document}
+
+\maketitle
+
+This package provides some miscellaneous tools for mathematical
+accents, with the following goals in mind:
+\begin{itemize}
+\item Creating faked accents from non-accent symbols, like
+$\accentset{\star}{s}$.
+\item Grouping them, perhaps including actual accents, like
+$\hat{\accentset{\star}{\hat h}}$. That
+has the side effect that multiple actual accents can be built
+as well.
+\item Putting them below the main symbol instead of above.
+\end{itemize}
+
+That is done so that the faked accents behave in quite similar fashion
+to actual accents do; i.e., the skew of the letter is taken into
+account (compare $\accentset{\ast}{d}$ with
+$\accentset{\ast}{h}$) and the sub and superscripts attached to
+it aren't misplaced (look carefully at $\accentset{\star}{f}_1^1$).
+
+Release 1.1 included a few new features, some of them following
+suggestions by Donald Arseneau. In particular, the |\underaccent|
+command has been fully reimplemented for the slant to be taken into
+account and the ``accent'' to be placed below the symbol can be
+anyone, not only real accents. This release just makes it compatible
+with \textsf{amsmath} 2 with a quick fix.
+
+\begin{decl}
+|\DeclareMathAccent|
+\end{decl}
+
+This \LaTeXe{} command is reimplemented so that newly defined accents
+will incorporate the features of this package. The standard accents
+are automatically redefined, including |\mathring| if you are using
+one of the latest \LaTeX{} releases. However, both |\widetilde| and
+|\widehat| remains untouched. If you are using a non standard
+math encoding, the accents following the standard encoding names are
+rightly redefined, but new accents are not converted because
+\textsf{accents} is not aware of its existence.
+
+See |fntguide.tex| in the \LaTeX{} standard distribution for a discussion on
+ |\DeclareMathAccent|.
+
+\begin{decl}
+|\ring{<symbol>}|
+\end{decl}
+
+The accent in $\ring{x}$, which was available in this package (and
+in fact in many others) before
+the |\mathring| command was added to the \LaTeX{} kernel.
+
+\begin{decl}
+|\accentset{<accent>}{<symbol>}|
+\end{decl}
+
+Builds a faked accent, as for instance
+\begin{sample}
+|\accentset{\star}{d}| \> $\accentset{\star}{d}$\\
+|\accentset{\diamond}{h}| \> $\accentset{\diamond}{h}$\\
+|\tilde{\accentset{\circ}{\phi}}| \>
+ $\tilde{\accentset{\circ}{\phi}}$
+\end{sample}
+The |<accent>| is always in |\scriptscriptmode|; hence, using
+|\accentset| in scripts won't give the desired result. Of course,
+if you use some faked accent many times, you can define:
+\begin{verbatim}
+\newcommand\starred[1]{\accentset{\star}{#1}}
+\end{verbatim}
+and |\starred| will become an accent, like |\hat|, |\tilde|, etc.
+
+\begin{decl}
+|\dddot \ddddot|
+\end{decl}
+
+Two prefabricated faked accents: $\dddot{f}$ and $\ddddot{f}$.
+
+\begin{decl}
+|\underaccent{<accent>}{<symbol>}|
+\end{decl}
+
+This command puts the |<accent>| under the |<symbol>|. Both real
+and faked accents are allowed. For instance,
+\begin{sample}
+|\underaccent{\hat}{x}| \> $\underaccent{\hat}{x}$\\
+|\underaccent{\bar}{\gamma}| \> $\underaccent{\bar}{\gamma}$\\
+|\underaccent{\triangleright}{q}| \>
+ $\underaccent{\triangleright}{q}$\\
+|\underaccent{\tilde}{\mathcal{A}}| \>
+ $\underaccent{\tilde}{\mathcal{A}}$
+\end{sample}
+
+Many people likes using the wider version of the tilde accent as
+printed by the |\widetilde| command, i.e., $\widetilde{A}$ instead of
+$\tilde{A}$. I find that aesthetically questionable, but anyway it
+can be used under the symbol as well. Since |\widetilde| remains
+untouched, you should define:
+\begin{verbatim}
+\DeclareMathAccent{\wtilde}{\mathord}{largesymbols}{"65}
+\end{verbatim}
+and write |\underaccent{\wtilde}{V}|, say (giving
+$\underaccent{\wtilde}{V}$). You may build an accent with
+|\sim|, too. (The value for a wide hat is |"62|)
+
+Sadly, \TeX{} lacks of a mechanism to place underaccents similar to
+that used in accents. Letters have a large variety of shapes and
+finding an automatic adjusting is practically impossible. Compare for
+instance the following letters:
+\begingroup
+\def\\{\underaccent{\bar}}%
+$\\V$, $\\Q$, $\\p$, $\\q$, $\\f$,
+$\\\beta$, $\\\gamma$, $\\{\mathcal{F}}$, $\\{\mathcal{A}}$
+\endgroup
+and you wil understand the difficulties.
+
+\begin{decl}
+|\undertilde{<symbols>}|
+\end{decl}
+
+This is the ``under'' version of |\widetilde| and like the latter is intended for constructions
+involving several symbols. For instance:
+\begin{sample}
+|\undertilde{CV}| \> $\undertilde{CV}$
+\end{sample}
+Note that in this case no correction is made in the placement of the tilde.
+
+\begin{decl}
+|nonscript single|
+\end{decl}
+
+These package options are intended mainly for speeding up the
+typesetting of document. The algorithm used here is recursive and
+very slow; although in fast processors that is not felt, in slow
+system that could be very annoying.
+
+\begin{description}
+\item[single] If you are interested only in |\accentset|.
+ Accents are not reimplemented.
+\item[nonscript] If you intend to use multiple accents in
+ text and display modes only.
+\end{description}
+
+Macros are speeded up dramatically with both options; if your system is slow,
+I commend using them in drafts and removing them for the final print.
+
+Finally, some remarks:
+\begin{itemize}
+\item The package does not provides alternative accents for fonts
+ lacking them. If you want an accented |\mathcal| letter you had to
+ write |\hat{\hat{\mathcal{A}}}| ($\hat{\hat{\mathcal{A}}}$).
+\item |\mathbf{\hat{\hat h}}| gets the bold accent;
+ |\hat{\hat{\mathbf{h}}}| not.
+\item The symbol in |\accentset| must be a single symbol.
+\item If you use \textsf{accents} with \textsf{amsmath} 2, you must
+load \textsf{accents} after. Note that \textsf{amsmath} could redefine
+some accents; in particular, if you experience problems with |\vec|
+and you are using the standard math encodings, define:
+\begin{verbatim}
+\let\vec\relax
+\DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
+\end{verbatim}
+\end{itemize}
+
+\end{document}
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/accents/accents.sty b/Master/texmf-dist/tex/latex/accents/accents.sty
new file mode 100644
index 00000000000..2fb9db8ea39
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/accents/accents.sty
@@ -0,0 +1,287 @@
+%
+% Copyright (C) 1998-2019 Javier Bezos http://www.texnia.com
+%
+% This file may be distributed and/or modified under the conditions of
+% the MIT License. A version can be found at the end of this file.
+%
+% Changes
+% ~~~~~~~
+%
+% 2006-05-12. TeX converts to ord any symbol with a math accent.
+% Accents now emulates this behaviour with braces around the
+% nucleous; otherwise, the original category is preserved and
+% the accents could look misaligned. (Reported by Viet-TrungLuu.)
+%
+% Release
+% ~~~~~~~
+
+\ProvidesPackage{accents}[2006/05/12 v1.4 Math Accent Tools]
+
+\let\cc@palette\mathpalette
+
+\DeclareOption{nonscript}
+ {\renewcommand\cc@palette[2]{#1\textstyle{#2}}}
+
+\DeclareOption{single}
+ {\renewcommand\cc@accent[1]{\mathaccent#1}}
+
+\newdimen\cc@skew
+\newdimen\cc@wd
+
+\newcount\cc@code
+\newcount\cc@group
+\newcount\cc@skewchar
+
+\newif\ifcc@more
+
+% Code for real accents
+% ~~~~~~~~~~~~~~~~~~~~~
+
+\def\cc@accent#1#2{%
+ \begingroup
+ \cc@code=#1\relax
+ \let\math@bgroup\@empty
+ \def\math@egroup##1{\cc@setchar##1}%
+ \cc@palette\cc@@accent{#2}%
+ {\cc@nuc}%
+ \endgroup}
+
+\def\cc@iaccent#1#2{%
+ \cc@fetch{#2}%
+ \mathaccent#1{%
+ \ifcc@more#2\else
+ \cc@phant{#2}%
+ \gdef\cc@nuc{#2}%
+ \fi
+ \kern\cc@skew}%
+ \kern-\cc@skew}%
+
+\def\cc@@accent#1#2{%
+ \let\cc@style=#1%
+ \cc@fetch{#2}%
+ \mathaccent\cc@code{%
+ \ifcc@more#2\else
+ \cc@phant{#2}%
+ \gdef\cc@nuc{#2}%
+ \fi
+ \kern\cc@skew}%
+ \kern-\cc@skew
+ \kern\cc@wd}%
+
+% The accents are redefined:
+
+\begingroup
+
+\def\mathaccentV#1{\string"\noexpand\accentclass@}%
+\let\protect\@empty
+\let\mathaccent\@empty
+
+\def\cc@set#1{%
+ \xdef#1{\noexpand\protect\noexpand\cc@accent{#1}}}
+
+\cc@set\grave %{\protect\cc@accent{"7012\relax}}
+\cc@set\acute %{\protect\cc@accent{"7013\relax}}
+\cc@set\check %{\protect\cc@accent{"7014\relax}}
+\cc@set\breve %{\protect\cc@accent{"7015\relax}}
+\cc@set\bar %{\protect\cc@accent{"7016\relax}}
+\cc@set\hat %{\protect\cc@accent{"705E\relax}}
+\cc@set\dot %{\protect\cc@accent{"705F\relax}}
+\cc@set\tilde %{\protect\cc@accent{"707E\relax}}
+\cc@set\ddot %{\protect\cc@accent{"707F\relax}}
+\cc@set\vec %{\protect\cc@accent{"017E\relax}}
+\gdef\ring{\protect\cc@accent{"7017\relax}}
+
+\@ifundefined{mathring}{}{\cc@set\mathring}
+
+\endgroup
+
+% Faked accents
+% ~~~~~~~~~~~~~
+
+\newcommand\accentset[2]{%
+ \begingroup
+ \def\cc@a{#1}%
+ \let\math@bgroup\@empty
+ \def\math@egroup##1{\cc@setchar##1}%
+ \cc@palette\cc@accentset{#2}%
+ {\cc@nuc}%
+ \endgroup}
+
+\def\cc@accentset#1#2{%
+ \let\cc@style#1%
+ \cc@fetch{#2}%
+ \sbox\z@{$\m@th\cc@style\mathgroup\cc@group
+ \ifcc@more#2\else\cc@phant{#2}%
+ \gdef\cc@nuc{#2}\fi$}%
+ \cc@align{%
+ \hidewidth\kern\cc@skew
+ $\m@th\scriptscriptstyle\mathgroup\cc@group\cc@a$%
+ \hidewidth\cr{\box\z@}}%
+ \kern\cc@wd}%
+
+\def\cc@iaccentset#1#2{%
+ \cc@fetch{#2}%
+ \sbox\z@{$\m@th\cc@style\ifcc@more#2\else\cc@phant{#2}%
+ \gdef\cc@nuc{#2}\fi$}%
+ \cc@align{%
+ \hidewidth\kern\cc@skew
+ $\m@th\scriptscriptstyle#1$\hidewidth\cr
+ {\box\z@}}}%
+
+\def\cc@align#1{%
+ \vbox{%
+ \baselineskip\z@skip
+ \lineskip.25ex
+ \ialign{##\crcr#1\crcr}}}
+
+% Shared by real and faked accents
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+\def\cc@phant#1{%
+ \v@true\h@true
+ \finph@nt}% with \box0 from \cc@fetch
+
+\def\cc@setchar{%
+ \cc@skewchar\ifnum\mathgroup=\m@ne
+ \skewchar\textfont\@ne
+ \else\ifnum\skewchar\textfont\mathgroup=\m@ne
+ \skewchar\textfont\@ne
+ \else\skewchar\textfont\mathgroup\fi\fi
+ \advance\cc@skewchar"7100 }
+
+\def\cc@fetch#1{%
+ \cc@group=\the\mathgroup
+ \let\cc@accent\@gobble
+ \let\accentset\@gobble
+ \sbox\z@{$\m@th\mathgroup\cc@group\cc@setchar
+ \cc@style#1{}\mathchar\cc@skewchar$}%
+ \sbox\@ne{$\m@th\mathgroup\cc@group\cc@setchar
+ \cc@style#1\mathchar\cc@skewchar$}%
+ \cc@morefalse
+ \def\cc@accent##1{\global\cc@moretrue}%
+ \def\accentset##1{\global\cc@moretrue}%
+ \global\cc@skew2\wd\@ne
+ \global\advance\cc@skew-2\wd\z@
+ \sbox\z@{$\m@th\mathgroup\cc@group\cc@style#1$}%
+ \global\cc@wd-\wd\z@
+ \let\cc@accent\cc@iaccent
+ \let\accentset\cc@iaccentset}
+
+% Two useful faked accents
+% ~~~~~~~~~~~~~~~~~~~~~~~~
+
+\def\dddot{\accentset{{\cc@style.\mkern-1.7mu\textstyle.\mkern-1.7mu.}}}
+\def\ddddot{\accentset{{\cc@style.\mkern-2.1mu.\mkern-2.1mu.\mkern-2.1mu.}}}
+
+% Underaccents
+% ~~~~~~~~~~~~
+
+\newcommand\underaccent[2]{%
+ \begingroup
+ \def\cc@a{#2}% Stores the nucleous...
+ \cc@palette\cc@underaccent{#1}% ...and the accent is passed
+ #2%
+ \endgroup}%
+
+\def\cc@underaccent#1#2{%
+ \let\cc@style#1%
+ \expandafter\in@\expandafter\cc@accent\expandafter{#2}%
+ \ifin@
+ \expandafter\cc@uaccent#2\@@%
+ \else
+ \cc@uaccentset{#2}%
+ \fi}
+
+\def\cc@uaccent#1#2#3\@@{% #1 and #2 gobbles \protect\cc@accent
+ \cc@under{%
+ \vbox to.2ex{%
+ \hbox{%
+ $\m@th
+ \cc@style
+ \mathgroup\cc@group
+ \cc@shift
+ \mathchar#3$}%
+ \vss}}}
+
+\def\cc@uaccentset#1{%
+ \cc@under{%
+ \hbox{%
+ $\m@th
+ \cc@style
+ \mathgroup\cc@group
+ \cc@shift
+ \scriptscriptstyle#1$}}}
+
+\def\cc@under#1{%
+ \cc@group\the\mathgroup
+ \sbox\z@{$\m@th\cc@style\mathgroup\cc@group\cc@a$}%
+ \sbox\tw@{$\scriptspace\z@\m@th\cc@style\mathgroup\cc@group\cc@a_{}$}%
+ \rlap{%
+ \oalign{%
+ \vrule \@depth\dp\z@ \@width\z@
+ \kern\wd\tw@
+ \crcr
+ \hidewidth#1\hidewidth}}}
+
+\def\cc@shift{%
+ \dimen@=-.000008ex
+ \multiply\dimen@\ifnum\mathgroup=\m@ne
+ \fontdimen\@ne\textfont\@ne
+ \else
+ \fontdimen\@ne\textfont\cc@group\fi
+ \kern\dimen@}
+
+% And \undertilde
+% ~~~~~~~~~~~~~~~
+
+\newcommand\undertilde{\cc@palette\cc@undertilde}
+
+\def\cc@undertilde#1#2{%
+ \cc@group\the\mathgroup
+ \sbox\z@{$\m@th\mathgroup\cc@group#1#2$}%
+ \oalign{%
+ $\m@th\mathgroup\cc@group#1#2$%
+ \crcr
+ \hidewidth
+ \vbox to.5ex{%
+ \hbox{%
+ $\hss
+ #1%
+ \mathgroup\cc@group
+ \widetilde{\hbox to\wd\z@{\hss}}%
+ \hss$}%
+ \vss}%
+ \hidewidth}}
+
+% The following command is used by \DeclareMathAccent
+% and it's the only part requiring modification
+
+\def\set@mathaccent#1#2#3#4{%
+ \xdef#2{\noexpand\protect\noexpand\cc@accent
+ {"\mathchar@type#3\hexnumber@#1#4\relax}}}
+
+\ProcessOptions
+
+\endinput
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/Master/tlpkg/tlpsrc/accents.tlpsrc b/Master/tlpkg/tlpsrc/accents.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/accents.tlpsrc
diff --git a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
index 79fb6edd4ae..84690af2430 100644
--- a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
@@ -7,6 +7,7 @@ depend collection-latex
depend 12many
depend SIstyle
depend SIunits
+depend accents
depend alg
depend algobox
depend algorithm2e