summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/tipauni/tipauni.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/unicodetex/latex/tipauni/tipauni.dtx')
-rw-r--r--macros/unicodetex/latex/tipauni/tipauni.dtx939
1 files changed, 939 insertions, 0 deletions
diff --git a/macros/unicodetex/latex/tipauni/tipauni.dtx b/macros/unicodetex/latex/tipauni/tipauni.dtx
new file mode 100644
index 0000000000..e83e5af260
--- /dev/null
+++ b/macros/unicodetex/latex/tipauni/tipauni.dtx
@@ -0,0 +1,939 @@
+% \iffalse meta-comment
+%
+% File: tipauni.dtx
+% ---------------------------------------------------------------------------
+% Package: tipauni
+% Author: Niranjan
+% Version: v0.1 (27 April, 2021)
+% Description: For producing Unicode characters with TIPA commands.
+% Repository: https://gitlab.com/niruvt/tipauni
+% Bug tracker: https://gitlab.com/niruvt/tipauni/-/issues
+% License: GPL v3.0+
+% ---------------------------------------------------------------------------
+% LaTeX Package tipauni v0.1
+% © 2021 Niranjan
+%
+% This program is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <https://www.gnu.org/licenses/>.
+%
+% The current maintainer of this work is Niranjan.
+%
+% This work consists of the files tipauni.dtx
+% tipauni.ins
+% and the derived file tipauni.sty.
+% \fi
+% \iffalse
+%<*internal>
+\iffalse
+%</internal>
+%<*readme>
+--------------------------------------------------------------------------
+Package: tipauni
+Author: Niranjan
+Version: v0.1 (27 April, 2021)
+Description: For producing Unicode characters with TIPA commands.
+Repository: https://gitlab.com/niruvt/tipauni
+Bug tracker: https://gitlab.com/niruvt/tipauni/-/issues
+License: GPL v3.0+
+--------------------------------------------------------------------------
+%</readme>
+%<*internal>
+\fi
+%</internal>
+%<*driver|package>
+\def\tipauniname{tipauni}
+\def\tipauniversion{0.1}
+\def\tipaunidate{2021/04/27}
+\def\tipaunidescription{For producing Unicode characters with TIPA commands}
+%</driver|package>
+%<*driver>
+\documentclass{l3doc}
+\usepackage{multicol}
+\usepackage{graphicx}
+\usepackage{array}
+\usepackage{longtable}
+\usepackage[referable]{threeparttablex}
+\usepackage{booktabs}
+\usepackage{float}
+\usepackage{xcolor}
+\usepackage{dtk-logos}
+\usepackage{fontspec}
+\newfontfamily{\ipa}[Color=blue]{CharisSIL}
+\usepackage{hyperref}
+\hypersetup{%
+ colorlinks,%
+ linkcolor=red!60!black,%
+ citecolor=green!60!black,%
+ urlcolor=blue!60!black%
+}%
+\usepackage{fontawesome5}
+\renewcommand{\arraystretch}{1.2}
+
+\begin{document}
+\DocInput{\tipauniname.dtx}
+\end{document}
+%</driver>
+% \fi
+% \title{The \pkg{\tipauniname} package}
+% \author{Niranjan\thanks{\faIcon{envelope}\quad\href{mailto:hi.niranjan@pm.me}{\ttfamily hi.niranjan@pm.me}}}
+% \date^^A
+% {^^A
+% Version \tipauniversion\ --- \tipaunidate\\[1ex]^^A
+% {\small\faIcon{link}\quad\url{https://ctan.org/pkg/tipauni}}\\^^A
+% {\small\faIcon{gitlab}\quad\url{https://gitlab.com/niruvt/tipauni}}\\^^A
+% }^^A
+% \maketitle
+%
+% \tableofcontents
+%
+% \vfill
+% {%
+% \setlength{\parindent}{0pt}
+% © 2021 Niranjan
+%
+% Permission is granted to copy, distribute and/or modify this document under
+% the terms of the GNU Free Documentation License, Version 1.3 or any later
+% version published by the Free Software Foundation; with no Invariant
+% Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the
+% license is included in the section entitled ``GNU Free Documentation
+% License''.
+% }%
+%
+% \clearpage\pagebreak
+%
+% \begin{documentation}
+% \begin{abstract}
+% This package is the second step for \LaTeX-internally bridging the gap
+% between the Unicode and the TIPA package. The first step was the package
+% \href{https://www.ctan.org/pkg/unitipa}{\pkg{unitipa}}. Users can now use
+% their beloved TIPA shortcuts with the benefits of Unicode i.e.\
+% searchability, copy-pasting, changing the font and many more. As this
+% package needs the package \pkg{fontspec} for loading an IPA font, it needs
+% to be compiled with \XeLaTeX\ or Lua\LaTeX. This package can also be
+% viewed as an ASCII-based input method for producing IPA characters in
+% Unicode.
+% \end{abstract}
+%
+% \section{Acknowledgements}
+% This package is completed because of the rigorous help by Jairo A.\ del Rio,
+% Jonathan P.\ Spratte \textit{\&} Ulrike Fischer. Their suggestions and
+% contributions are extremely valuable for the development of this package.
+%
+% \section{Package options}
+%
+% \begin{function}{documentfont}
+% The default font for the entire document set by this package is the
+% \href{https://www.ctan.org/pkg/charissil}{Charis SIL}. Users can easily
+% change it with the package-option \verb|documentfont|. This option takes
+% one value which is the \meta{font name}. e.g.\ For using the
+% \href{https://www.ctan.org/pkg/doulossil}{Doulos SIL} font as the main
+% font, use the package like it is used in the following.
+% \begin{verbatim}
+% \usepackage[documentfont=DoulosSIL]{tipauni}
+% \end{verbatim}
+% \begin{syntax}
+% documentfont=\meta{font name}
+% \end{syntax}
+% \end{function}
+%
+% \begin{function}{incompatible}
+% By default \pkg{\tipauniname} will throw a warning if symbols not
+% contained in the \pkg{tipa} package were used. Using this option you can
+% switch this check off if you don't have to stay compatible with
+% \pkg{tipa} to silence this warning.
+% \end{function}
+%
+% \section{List of available commands}
+% TIPA has two alternative methods for inputting IPA characters. In the
+% following tables, \textbf{Input A} column lists all the long TIPA commands
+% (e.g.~\verb|\textrtailt|) \textit{\&} \textbf{Input B} column lists the
+% short ones (e.g.~\verb|\textipa{\:t}|)\footnote{All of these commands must
+% be enclosed in the \texttt{\textbackslash textipa}
+% command. (e.g.~\texttt{\textbackslash textipa\{\textbackslash :tP\}} for
+% {\ipa [ʈʔ]})}. This documentation lists down all the commands necessary for
+% typing symbols in the IPA chart.
+%
+% \subsection{Pulmonic consonants}
+% \begin{ThreePartTable}
+% \begin{TableNotes}
+% \item[\textcolor{red}{§}] These commands are also available without
+% package \pkg{tipa}.
+% \item[1] \label{1} A symbol for this sound was introduced in 2005. The
+% last update of the package \pkg{tipa} was in 2004, so this character
+% is missing in it. A command for it is provided by this package. Such
+% \pkg{tipauni}-exclusive commands are written with red color in this
+% documentation.
+% \end{TableNotes}
+% \small
+% \begin{longtable}{%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% >{\ipa[}l<{]}%
+% }%
+% \toprule
+% \endfirsthead
+% \toprule
+% \endhead
+% \bottomrule
+% \endfoot
+% Description & Input A & Input B &
+% \multicolumn{1}{l}{\kern-1.25ex Symbol}\\
+% \midrule
+% Retroflex voiceless stop & \verb|\textrtailt| & \verb|\:t| & ʈ \\
+% Retroflex voiced stop & \verb|\textrtaild| & \verb|\:d| & ɖ \\
+% Palatal voiced stop & \verb|\textbardotlessj| & \verb|\*j| & ɟ \\
+% Uvular voiced stop & \verb|\textscg| & \verb|\;G| & ɢ \\
+% Glottal voiceless stop & \verb|\textglotstop| & \verb|P| & ʔ \\
+% Labiodental nasal & \verb|\textltailm| & \verb|M| & ɱ \\
+% Retroflex nasal & \verb|\textrtailn| & \verb|\:n| & ɳ \\
+% Palatal nasal & \verb|\textltailn| & \verb|\*n| & ɲ \\
+% Velar nasal & \verb|\ng|\tnote{\textcolor{red}{§}} & \verb|N| & ŋ \\
+% Uvular nasal & \verb|\textscn| & \verb|\;N| & ɴ \\
+% Bilabial trill & \verb|\textscb| & \verb|\;B| & ʙ \\
+% Uvular trill & \verb|\textscr| & \verb|\;R| & ʀ \\
+% \multicolumn{1}{>{\color{red}}l@{\hspace{0.3cm}-\hspace{0.3cm}}}{Labiodental flap\tnotex{1}} &
+% \color{red}\verb|\labdentflap| & \color{red}\verb|\*v| & ⱱ\\
+% Alveolar tap & \verb|\textfishhookr| & \verb|R| & ɾ \\
+% Retroflex flap & \verb|\textrtailr| & \verb|\:r| & ɽ \\
+% Bilabial voiceless fricative & \verb|\textphi| & \verb|F| & ɸ \\
+% Bilabial voiced fricative & \verb|\textbeta| & \verb|B| & β \\
+% Dental voiceless fricative & \verb|\texttheta| & \verb|T| & θ \\
+% Dental voiced fricative & \verb|\dh|\tnote{\textcolor{red}{§}} &
+% \verb|D| & ð \\
+% Palatal voiceless fricative & \verb|\textsh| & \verb|S| & ʃ \\
+% Palatal voiced fricative & \verb|\textyogh| & \verb|Z| & ʒ \\
+% Retroflex voiceless fricative & \verb|\textrtails| & \verb|\:s| & ʂ \\
+% Retroflex voiceless fricative & \verb|\textrtailz| & \verb|\:z| & ʐ \\
+% Palatal voiced fricative & \verb|\textctj| & \verb|J| & ʝ \\
+% Velar voiced fricative & \verb|\textgamma| & \verb|G| & ɣ \\
+% Uvular voiceless fricative & \verb|\textchi| & \verb|X| & χ \\
+% Uvular voiced fricative & \verb|\textinvscr| & \verb|K| & ʁ \\
+% Pharyngeal voiceless fricative & \verb|\textcrh| & \verb|\*h| & ħ \\
+% Pharyngeal voiced fricative & \verb|\textrevglotstop| & \verb|Q| & ʕ
+% \\
+% Glottal voiced fricative & \verb|\texthth| & \verb|H| & ɦ \\
+% Alveolar voiceless lateral fricative & \verb|\textbeltl| & \verb|\*l|
+% & ɬ \\
+% Alveolar voiced lateral fricative & \verb|\textlyoghlig| & \verb|\*z|
+% & ɮ \\
+% Labiodental approximant & \color{red}{\verb|\labdentapp|} & \verb|V| &
+% ʋ \\
+% Alveolar approximant & \verb|\textturnr| & \verb|\*r| & ɹ \\
+% Retroflex approximant & \verb|\textturnrrtail| & \verb|\:R| & ɻ \\
+% Velar approximant & \verb|\textturnmrleg| & \color{red}{\verb|\*m|} &
+% ɰ \\
+% Retroflex lateral approximant & \verb|\textrtaill| & \verb|\:l| & ɭ \\
+% Palatal lateral approximant & \verb|\textturny| & \verb|L| & ʎ \\
+% Velar lateral approximant & \verb|\textscl| & \verb|\;L| & ʟ \\
+% \midrule
+% \insertTableNotes
+% \end{longtable}
+% \end{ThreePartTable}
+%
+% \subsection{Non-Pulmonic consonants}
+% \begin{longtable}{%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% >{\ipa[}l<{]}%
+% }%
+% \toprule
+% \endfirsthead
+% \toprule
+% \endhead
+% \bottomrule
+% \endfoot
+% Description & Input A & Input B &\multicolumn{1}{l}{Symbol}\\
+% \midrule
+% Bilabial click & \verb|\textbullseye| & \verb|\!o| & ʘ \\
+% Postalveolar click & \color{red}{\verb|\pstalvclick|} &
+% \color{red}{\verb|!|} & ǃ \\
+% Palatoalveolar click & \verb|\textdoublebarpipe| &
+% \color{red}{\verb|\!c|} & ǂ \\
+% Alveolar lateral click & \verb|\textdoublepipe| & \verb+||+ & ǁ \\
+% Bilabial implosive & \verb|\texthtb| & \verb|\!b| & ɓ \\
+% Dental implosive & \verb|\texthtd| & \verb|\!d| & ɗ \\
+% Palatal implosive & \verb|\texthtbardotlessj| & \verb|\!j| & ʄ \\
+% Velar implosive & \verb|\texthtg| & \verb|\!g| & ɠ \\
+% Uvular implosive & \verb|\texthtscg| & \verb|\!G| & ʛ \\
+% \end{longtable}
+%
+% \subsection{Other symbols}
+% {%
+% \small
+% \begin{longtable}{%
+% >{\footnotesize}l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% >{\ipa[}l<{]}%
+% }%
+% \toprule
+% \multicolumn{1}{l}{Description} & Input A & Input B
+% &\multicolumn{1}{l}{Symbol}\\
+% \midrule
+% Labial-velar voiceless fricative & \verb|\textturnw| & \verb|\*w| & ʍ
+% \\
+% Labial-palatal voiced approximant & \verb|\textturnh| & \verb|4| & ɥ
+% \\
+% Epiglottal voiceless fricative & \verb|\textsch| & \verb|\;H| & ʜ \\
+% Epiglottal voiced fricative/approximant & \verb|\textbarrevglotstop| &
+% \color{red}{\verb|\*1|} & ʢ \\
+% Alveolar voiced lateral flap & \verb|\textturnlonglegr| &
+% \color{red}{\verb|\!r|} & ɺ \\
+% Epiglottal plosive & \verb|\textbarglotstop| & \verb|\*2| & ʡ \\
+% Alveolo-palatal voiceless fricative & \verb|\textctc| & \verb|C| & ɕ \\
+% Alveolo-palatal voiced fricative & \verb|\textctz| &
+% \color{red}{\verb|\*Z|} & ʑ \\
+% Postalveolar-velar voiceless fricative & \verb|\texththeng| &
+% \color{red}{\verb|\*3|} & ɧ \\
+% \bottomrule
+% \end{longtable}
+% }
+%
+% \subsection{Vowels}
+% {%
+% \small
+% \begin{longtable}{%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% >{\ipa[}l<{]}%
+% }%
+% \toprule
+% \endfirsthead
+% \toprule
+% \endhead
+% \bottomrule
+% \endfoot
+% Description & Input A & Input B &\multicolumn{1}{l}{Symbol}\\
+% \midrule
+% Near-close near-front unrounded & \verb|\textsci| & \verb|I| & ɪ \\
+% Near-close near-front rounded & \verb|\textscy| & \verb|y| & ʏ \\
+% Open-mid front unrounded & \verb|\textepsilon| & \verb|E| & ɛ \\
+% Close central unrounded & \verb|\textbari| & \verb|1| & ɨ \\
+% Close central rounded & \verb|\textbaru| & \verb|0| & ʉ \\
+% Near-close near-back rounded & \verb|\textupsilon| & \verb|U| & ʊ \\
+% Close-mid central unrounded & \verb|\textreve| & \verb|9| & ɘ \\
+% Close-mid central rounded & \verb|\textbaro| & \verb|8| & ɵ \\
+% Mid central vowel & \verb|\textschwa| & \verb|@| & ə \\
+% Open-mid central unrounded & \verb|\textrevepsilon| & \verb|3| & ɜ \\
+% Open-mid central rounded & \verb|\textcloserevepsilon| &
+% \textcolor{red}{\texttt{\&}} & ɞ \\
+% Near-open central & \verb|\textturna| & \verb|5| & ɐ \\
+% Close back unrounded & \verb|\textturnm| & \verb|W| & ɯ \\
+% Close-mid back unrounded & \verb|\textramshorns| & \verb|7| & ɤ \\
+% Open-mid back unrounded & \verb|\textturnv| & \verb|2| & ʌ \\
+% Open-mid back rounded & \verb|\textopeno| & \verb|O| & ɔ \\
+% Open back unrounded & \verb|\textscripta| & \verb|A| & ɑ \\
+% Open back rounded & \verb|\textturnscripta| & \verb|6| & ɒ \\
+% \end{longtable}
+% }%
+%
+% \subsection{Independent diacritics}
+% \begin{longtable}{%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% >{\ipa[}l<{]}%
+% }%
+% \toprule
+% Description & Input A & Input B & \multicolumn{1}{l}{Symbol}\\
+% \midrule
+% Rhoticity & \verb|ə\textrhoticity|\tnotex{1} & \color{red}{\verb|ə\tr|}
+% & ə˞\\
+% No audible release & \verb|n\textcorner| & \color{red}{\verb|n\tc|} & n̚
+% \\
+% Tie bar (standalone) & \color{red}{\verb|\stdlnetiebar{əi}|} &
+% \color{red}{\verb|\ts{əi}|} & ə‿i \\
+% \bottomrule
+% \end{longtable}
+%
+% \subsection{Dependent diacritics}
+% \begin{TableNotes}
+% \item[1] The documentation of package the \pkg{tipa} on p.\ 53
+% describes a shorthand command
+% i.e.~\texttt{\textbackslash\textbar\~{}{\meta{arg}}} which is not
+% functional. I haven't investigated the reasons, but instead provided a new
+% shorthand command for this character.
+% \end{TableNotes}
+% \begin{ThreePartTable}
+% {%
+% \small
+% \begin{longtable}{%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% l@{\hspace{0.3cm}-\hspace{0.3cm}}%
+% >{\ipa[}l<{]}%
+% }%
+% \toprule
+% \endfirsthead
+% \toprule
+% \endhead
+% \bottomrule
+% \endfoot
+% Description & Input A & Input B & \multicolumn{1}{l}{Symbol}\\
+% \midrule
+% Voiceless & \verb|\textsubring{m}| & \verb|\r*m| & m̥\\
+% Voiced & \verb|\textsubwedge{s}| & \verb|\v*s| & s̬\\
+% More rounded & \verb|\textsubrhalfring{w}| & \verb+\|)w+ & w̹\\
+% Less rounded & \verb|\textsublhalfring{w}| & \verb+\|(w+ & w̜\\
+% Advanced & \verb|\textsubplus{ə}| & \verb-\|+e- & ə̟\\
+% Retracted & \verb|\textsubbar{l}| & \verb+\=*l+ & l̠\\
+% Mid-centralized & \verb|\textovercross{e}| & \verb+\|x{e}+ & e̽\\
+% Syllabic & \verb|\textsyllabic{n}| & \verb|\s{n}| & n̩\\
+% Non-syllabic & \verb|\textsubarch{a}| & \color{red}{\verb|\ns{a}|} & a̯
+% \\
+% Breathy voiced & \verb|\textsubumlaut{b}| & \verb|\"*b| & b̤ \\
+% Creaky voiced & \verb|\textsubtilde{ə}| & \verb|\~*@| & ə̰ \\
+% Linguolabial & \verb|\textseagull{l}| & \verb+\|ml+ & l̼ \\
+% Velarized & \verb|\textsuperimposetilde{i}| & \verb+\vl{i}+\tnote{1} & i̴
+% \\
+% Raised & \verb|\textraising{ə}| & \verb+\|’@+ & ə̝ \\
+% Lowered & \verb|\textlowering{ə}| & \verb+\|‘@+ & ə̞ \\
+% Advanced tongue root & \verb|\textadvancing{ə}| & \verb+\|<@+ & ə̘ \\
+% Retracted tongue root & \verb|\textretracting{ə}| & \verb+\|>@+ & ə̙ \\
+% Dental & \verb|\textsubbridge{t}| & \verb+\|[t+ & t̪ \\
+% Apical & \verb|\textinvsubbridge{t}| & \verb+\|]t+ & t̺ \\
+% Laminal & \verb|\textsubsquare{s}| & \color{red}{\verb|\lmn{s}|} & s̻ \\
+% Tie bar (top) & \verb|\texttoptiebar{əi}| & \verb|\t{əi}| & ə͡i\\
+% Tie bar (bottom) & \verb|\textbottomtiebar{əi}| & \verb|\t*{əi}| & ə͜i\\
+% \midrule
+% \insertTableNotes
+% \end{longtable}
+% }%
+% \end{ThreePartTable}
+% \end{documentation}
+% \begin{implementation}
+% \section{Implementation}
+% \begin{macrocode}
+%<@@=tipauni>
+%<*package>
+% \end{macrocode}
+% Provide the package with some description \textit{\&} version specifications.
+% \begin{macrocode}
+\ProvidesPackage{tipauni}[2021/04/27 v0.1
+Unicode characters with TIPA commands]
+% \end{macrocode}
+% Load necessary packages.
+% \begin{macrocode}
+\RequirePackage{xparse}
+\RequirePackage{fontspec}
+\RequirePackage{environ}
+\RequirePackage{xkeyval}
+\RequirePackage{ifthen}
+% \end{macrocode}
+% Package options are provided using the package \pkg{xkeyval}. The following
+% commands provide the option \verb|documentfont|.
+% \begin{macrocode}
+\setmainfont{CharisSIL} %% https://ctan.org/pkg/charissil
+\DeclareOptionX{documentfont}{\setmainfont{#1}}
+\newif\ifnontipaignore
+\DeclareOptionX{incompatible}{\nontipaignoretrue}
+\ProcessOptionsX\relax
+% \end{macrocode}
+% The following commands were kindly suggested by Phelype Oleinik for developing
+% a conditional which is always global.
+% \begin{macrocode}
+\newif\ifnontipa
+\protected\def\nontipatrue{\global\let\ifnontipa\iftrue}
+\protected\def\nontipafalse{\global\let\ifnontipa\iffalse}
+\ifnontipaignore
+ \protected\def\nontipatrue{}
+\fi
+% \end{macrocode}
+% The following commands provide the command \verb|\tipaunicmd| for printing
+% characters that are missing in the \pkg{tipa} package.
+% \begin{macrocode}
+\NewDocumentCommand\tipaunicmd{ m m }{%
+ \NewDocumentCommand#1{ }{\nontipatrue #2}%
+}%
+% \end{macrocode}
+% As can be seen above, everytime when a command that is absent in the
+% \pkg{tipa} package is provided, it sets the conditional \verb|nontipa| to true
+% value. At the end of the document this package checks if there is any instance
+% of a non-TIPA command. If yes, it generates a warning in the .log file saying
+% that this code is now incompatible with the TIPA package and some characters
+% might be displayed with a different font. All of this is achieved with the
+% help of following commands. The discussion on
+% \href{https://topanswers.xyz/tex?q=1735}{this} question helped a lot for fine
+% tuning the warning message.
+% \begin{macrocode}
+\AtEndDocument{%
+ \ifnontipa
+ \PackageWarningNoLine{tipauni}{%
+ You have used a command(s) that is (are) not\MessageBreak
+ supported by package TIPA. Thus your current code is\MessageBreak
+ incompatible with that package. These commands are\MessageBreak
+ printed with a different Unicode font. Refer to the\MessageBreak
+ documentation of package tipauni for a list of\MessageBreak
+ commands that are not supported in TIPA%
+ }%
+ \else
+ \fi
+}%
+% \end{macrocode}
+% From here the code for obtaining Unicode characters with TIPA commands
+% starts.
+% \begin{macrocode}
+\DeclareTextCommand{\tipaunistar}{TU}[1]{{#1}}
+\DeclareTextAccentDefault{\tipaunistar}{TU}
+\DeclareTextCommand{\tipaunisemicolon}{TU}[1]{{#1}}
+\DeclareTextAccentDefault{\tipaunisemicolon}{TU}
+\DeclareTextCommand{\tipaunicolon}{TU}[1]{{#1}}
+\DeclareTextAccentDefault{\tipaunicolon}{TU}
+\DeclareTextCommand{\tipaunibang}{TU}[1]{{#1}}
+\DeclareTextAccentDefault{\tipaunibang}{TU}
+\DeclareTextCommand{\tipaunipipe}{TU}[2]{\@pipeshorthands{#1}{#2}}
+\DeclareTextAccentDefault{\tipaunipipe}{TU}
+%% Pulmonic consonants
+%%-- Stops
+%%--** Retroflex
+\DeclareTextSymbol{\textrtailt}{TU}{"0288}%% ʈ
+\DeclareTextComposite{\tipaunicolon}{TU}{t}{"288}
+\DeclareTextSymbol{\textrtaild}{TU}{"0256}%% ɖ
+\DeclareTextComposite{\tipaunicolon}{TU}{d}{"256}
+%%--** Palatal
+\DeclareTextSymbol{\textbardotlessj}{TU}{"25F}%% ɟ
+\DeclareTextComposite{\tipaunistar}{TU}{j}{"25F}
+%%--** Uvular
+\DeclareTextSymbol{\textscg}{TU}{"262}%% ɢ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{G}{"262}
+%%--** Glottal
+\DeclareTextSymbol{\textglotstop}{TU}{"294}%% ʔ
+%%-- Nasals
+%%--** Labiodental
+\DeclareTextSymbol{\textltailm}{TU}{"271}%% ɱ
+%%--** Retroflex
+\DeclareTextSymbol{\textrtailn}{TU}{"273}%% ɳ
+\DeclareTextComposite{\tipaunicolon}{TU}{n}{"273}
+%%--** Palatal
+\DeclareTextSymbol{\textltailn}{TU}{"272}%% ɲ
+\DeclareTextComposite{\tipaunistar}{TU}{n}{"272}
+%%--** Uvular
+\DeclareTextSymbol{\textscn}{TU}{"274}%% ɴ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{N}{"274}
+%%-- Trills
+%%--** Bilabial
+\DeclareTextSymbol{\textscb}{TU}{"299}%% ʙ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{B}{"299}
+%%--** Uvular
+\DeclareTextSymbol{\textscr}{TU}{"280}%% ʀ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{R}{"280}
+%%-- Taps or flaps
+%%-- Labiodental flap
+\tipaunicmd{\labdentflap}{ⱱ} %% tipauni-exclusive
+\DeclareTextComposite{\tipaunistar}{TU}{v}{"2C71} %% tipauni-exclusive
+%%--** Alveolar
+\DeclareTextSymbol{\textfishhookr}{TU}{"27E}%% ɾ
+%%--** Retroflex
+\DeclareTextSymbol{\textrtailr}{TU}{"27D}%% ɽ
+\DeclareTextComposite{\tipaunicolon}{TU}{r}{"27D}
+%%-- Fricatives
+%%--** Bilabial
+\DeclareTextSymbol{\textphi}{TU}{"278}%% ɸ
+\DeclareTextSymbol{\textbeta}{TU}{"3B2}%% β
+%%--** Dental
+\DeclareTextSymbol{\texttheta}{TU}{"3B8}%% θ
+%%--** Postalveolar
+\DeclareTextSymbol{\textesh}{TU}{"283}%% ʃ
+\DeclareTextSymbol{\textyogh}{TU}{"292}%% ʒ
+%%--** Retroflex
+\DeclareTextSymbol{\textrtails}{TU}{"282}%% ʂ
+\DeclareTextComposite{\tipaunicolon}{TU}{s}{"282}
+\DeclareTextSymbol{\textrtailz}{TU}{"290}%% ʐ
+\DeclareTextComposite{\tipaunicolon}{TU}{z}{"290}
+%%--** Palatal
+\DeclareTextSymbol{\textctj}{TU}{"29D}%% ʝ
+%%--** Velar
+\DeclareTextSymbol{\textgamma}{TU}{"263}%% ɣ
+%%--** Uvular
+\DeclareTextSymbol{\textchi}{TU}{"3C7}%% χ
+\DeclareTextSymbol{\textinvscr}{TU}{"281}%% ʁ
+%%--** Pharyngeal
+\DeclareTextSymbol{\textcrh}{TU}{"127}%% ħ
+\DeclareTextComposite{\tipaunistar}{TU}{h}{"127}
+\DeclareTextSymbol{\textrevglotstop}{TU}{"295}%% ʕ
+%%--** Glottal
+\DeclareTextSymbol{\texthth}{TU}{"266}%% ɦ
+%%-- Lateral fricatives
+%%--** Alveolar
+\DeclareTextSymbol{\textbeltl}{TU}{"26C}%% ɬ
+\DeclareTextComposite{\tipaunistar}{TU}{l}{"26C}
+\DeclareTextSymbol{\textlyoghlig}{TU}{"26E}%% ɮ
+\DeclareTextComposite{\tipaunistar}{TU}{z}{"26E}
+%%-- Approximants
+%%-- Labiodental approximant
+\tipaunicmd{\labdentapp}{ʋ} %% tipauni-exclusive
+%%--** Alveolar
+\DeclareTextSymbol{\textturnr}{TU}{"279}%% ɹ
+\DeclareTextComposite{\tipaunistar}{TU}{r}{"279}
+%%--** Retroflex
+\DeclareTextSymbol{\textturnrrtail}{TU}{"27B}%% ɻ
+\DeclareTextComposite{\tipaunicolon}{TU}{R}{"27B}
+%%--** Velar
+\DeclareTextSymbol{\textturnmrleg}{TU}{"270}%% ɰ
+\DeclareTextComposite{\tipaunistar}{TU}{m}{"270}
+%%-- Lateral approximants
+%%--** Retroflex
+\DeclareTextSymbol{\textrtaill}{TU}{"26D}%% ɭ
+\DeclareTextComposite{\tipaunicolon}{TU}{l}{"26D}
+\DeclareTextSymbol{\textturny}{TU}{"28E}%% ʎ
+\DeclareTextSymbol{\textscl}{TU}{"29F}%% ʟ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{L}{"29F}
+%% Non-pulmonic consonants
+%%-- Clicks
+%%--** Bilabial
+\DeclareTextSymbol{\textbullseye}{TU}{"298}%% ʘ
+\DeclareTextComposite{\tipaunibang}{TU}{o}{"298}
+%%-- Postalveolar click
+\tipaunicmd{\pstalvclick}{ǃ} %% tipauni-exclusive
+%%--** Palato-alveolar
+\DeclareTextSymbol{\textdoublebarpipe}{TU}{"1C2}%% ǂ
+\DeclareTextComposite{\tipaunibang}{TU}{c}{"1C2} %% tipauni-exclusive
+%%--** Alveolar lateral
+\DeclareTextSymbol{\textdoublepipe}{TU}{"1C1}% ǁ
+%%-- Implosives
+%%--** Bilabial
+\DeclareTextSymbol{\texthtb}{TU}{"253}%% ɓ
+\DeclareTextComposite{\tipaunibang}{TU}{b}{"253}
+%%--** Dental
+\DeclareTextSymbol{\texthtd}{TU}{"257}%% ɗ
+\DeclareTextComposite{\tipaunibang}{TU}{d}{"257}
+%%--** Palatal
+\DeclareTextSymbol{\texthtbardotlessj}{TU}{"284}%% ʄ
+\DeclareTextComposite{\tipaunibang}{TU}{j}{"284}
+%%--** Velar
+\DeclareTextSymbol{\texthtg}{TU}{"260}%% ɠ
+\DeclareTextComposite{\tipaunibang}{TU}{g}{"260}
+%%--** Uvular
+\DeclareTextSymbol{\texthtscg}{TU}{"29B}%% ʛ
+\DeclareTextComposite{\tipaunibang}{TU}{G}{"29B}
+%% Other consonants
+\DeclareTextSymbol{\textturnw}{TU}{"28D}%% ʍ
+\DeclareTextSymbol{\textturnh}{TU}{"265}%% ɥ
+\DeclareTextSymbol{\textsch}{TU}{"29C}%% ʜ
+\DeclareTextSymbol{\textbarrevglotstop}{TU}{"2A2}%% ʢ
+\DeclareTextComposite{\tipaunistar}{TU}{1}{"2A2} %% tipauni-exclusive
+\DeclareTextSymbol{\textbarglotstop}{TU}{"2A1}%% ʡ
+\DeclareTextComposite{\tipaunistar}{TU}{2}{"2A1} %% tipauni-exclusive
+\DeclareTextSymbol{\textctc}{TU}{"255}%% ɕ
+\DeclareTextSymbol{\textctz}{TU}{"291}%% ʑ
+\DeclareTextComposite{\tipaunistar}{TU}{Z}{"291} %% tipauni-exclusive
+\DeclareTextSymbol{\textturnlonglegr}{TU}{"27A}%% ɺ
+\DeclareTextComposite{\tipaunibang}{TU}{r}{"27A} %% tipauni-exclusive
+\DeclareTextSymbol{\texththeng}{TU}{"267}%% ɧ
+\DeclareTextComposite{\tipaunistar}{TU}{3}{"267} %% tipauni-exclusive
+\DeclareTextComposite{\tipaunistar}{TU}{k}{"029E} % ʞ
+\DeclareTextComposite{\tipaunistar}{TU}{t}{"287} % ʇ
+\DeclareTextComposite{\tipaunistar}{TU}{w}{"28D} % ʍ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{E}{"1D07} % ᴇ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{J}{"1D0A} % ᴊ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{A}{"1D00} % ᴀ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{H}{"29C} % ʜ
+\DeclareTextComposite{\tipaunisemicolon}{TU}{U}{"1D1C} % ᴜ
+%% Vowels
+\DeclareTextSymbol{\textsci}{TU}{"26A}%% ɪ
+\DeclareTextSymbol{\textscy}{TU}{"28F}%% ʏ
+\DeclareTextSymbol{\textepsilon}{TU}{"25B}%% ɛ
+\DeclareTextSymbol{\textbari}{TU}{"268}%% ɨ
+\DeclareTextSymbol{\textbaru}{TU}{"289}%% ʉ
+\DeclareTextSymbol{\textupsilon}{TU}{"28A}%% ʊ
+\DeclareTextSymbol{\textreve}{TU}{"258}%% ɘ
+\DeclareTextSymbol{\textbaro}{TU}{"275}%% ɵ
+\DeclareTextSymbol{\textschwa}{TU}{"259}%% ə
+\DeclareTextSymbol{\textrevepsilon}{TU}{"25C}%% ɜ
+\DeclareTextSymbol{\textcloserevepsilon}{TU}{"25E}%% ɞ
+\DeclareTextSymbol{\textturna}{TU}{"250}%% ɐ
+\DeclareTextSymbol{\textturnm}{TU}{"26F}%% ɯ
+\DeclareTextSymbol{\textramshorns}{TU}{"264}%% ɤ
+\DeclareTextSymbol{\textturnv}{TU}{"28C}%% ʌ
+\DeclareTextSymbol{\textopeno}{TU}{"254}%% ɔ
+\DeclareTextSymbol{\textscripta}{TU}{"251}%% ɑ
+\DeclareTextSymbol{\textturnscripta}{TU}{"252}%% ɒ
+%% Independent diacritic marks
+%%-- Rhoticity
+\DeclareTextSymbol{\textrhoticity}{TU}{"2DE}%% ˞
+\tipaunicmd{\tr}{˞}
+%%-- Tie bar (below)
+\DeclareTextCommand{\tipaunitextbottomtiebar}{TU}[2]{#1\symbol{"035C}#2}
+\NewDocumentCommand\textbottomtiebar{ m }{\tipaunitextbottomtiebar#1}
+%%-- Tie bar (below) - standalone character
+\DeclareTextCommand{\tipaunits}{TU}[2]{#1\symbol{"203F}#2}
+\NewDocumentCommand\stdlnetiebar{ m }{\tipaunits#1}
+\NewDocumentCommand\ts{ m }{\tipaunits#1}
+% \end{macrocode}
+% The following commands redefine the TIPA shorthand input for dependent
+% diacritics.
+% \begin{macrocode}
+%% No audible release
+\DeclareUnicodeAccent{\textcorner}{TU}{"31A}%% ̚
+\tipaunicmd{\tc}{̚}
+%% Syllabic
+\DeclareUnicodeAccent{\textsyllabic}{TU}{"0329} %% ̩
+\NewDocumentCommand\s{ m }{\textsyllabic{\textipa{#1}}\nontipatrue}
+%% Non-syllabic
+\DeclareUnicodeAccent{\textsubarch}{TU}{"032F} %% ̯
+\NewDocumentCommand\ns{ m }{\textsubarch{\textipa{#1}}}
+%% Laminal
+\DeclareUnicodeAccent{\textsubsquare}{TU}{"033B} %% ̻
+\NewDocumentCommand\lmn{ m }{\textsubsquare{\textipa{#1}}\nontipatrue}
+%% Other complex shorthand commands
+\DeclareTextCommand{\@pipeshorthands}{TU}[2]{%
+ \if #1[\tipaunisubbridge{\textipa{#2}}\else
+ \if #1]\tipauniinvsubbridge{\textipa{#2}}\else
+ \if #1(\tipaunisublhalfring{\textipa{#2}}\else
+ \if #1)\tipaunisubrhalfring{\textipa{#2}}\else
+ \if #1+\tipaunisubplus{\textipa{#2}}\else
+ \if #1'\tipauniraising{\textipa{#2}}\else
+ \if #1`\tipaunilowering{\textipa{#2}}\else
+ \if #1<\tipauniadvancing{\textipa{#2}}\else
+ \if #1>\tipauniretracting{\textipa{#2}}\else
+ \if #1x\tipauniovercross{\textipa{#2}}\else
+ \if #1m\tipauniseagull{\textipa{#2}}\else #1#2%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}%
+\DeclareTextAccentDefault{\@pipeshorthands}{TU}
+\NewDocumentCommand\super{ m }{%
+ \ifthenelse{\equal{#1}{h}}{ʰ}{\relax}%
+ \ifthenelse{\equal{#1}{w}}{ʷ}{\relax}%
+ \ifthenelse{\equal{#1}{j}}{ʲ}{\relax}%
+ \ifthenelse{\equal{#1}{ɣ}}{ˠ}{\relax}%
+ \ifthenelse{\equal{#1}{ʕ}}{ˤ}{\relax}%
+ \ifthenelse{\equal{#1}{n}}{ⁿ}{\relax}%
+ \ifthenelse{\equal{#1}{l}}{ˡ}{\relax}%
+}%
+% \end{macrocode}
+% The replacement of several characters with different IPA symbols will be done
+% in a small loop. That loop will loop over the contents of a sequence, and each
+% sequence element will contain two token-list elements (braced groups),
+% specifying a regular expression (really just one or two characters, nothing
+% complicated) and the replacement text for that expression.
+% \begin{macrocode}
+\ExplSyntaxOn
+\seq_new:N \l__tipauni_replace_maps_seq
+\seq_new:N \l__tipauni_remove_from_accents_seq
+\tl_new:N \l__tipauni_textipa_tl
+% \end{macrocode}
+% The sequence \cs{l__tipauni_replace_maps_seq} stores the replacement mappings,
+% we have to keep in mind that these are regular expressions in the first braced
+% group, so characters that are not alpha-numeric should be escaped. Also, since
+% we're using \cs{seq_set_split:Nnn} here (which doesn't ignore empty elements)
+% we have to make sure to not put too many commas in the list.
+% First we set the mappings in a temporary sequence to pre-build the regular
+% expressions to gain at least a bit of speed.
+% \begin{macrocode}
+\seq_set_split:Nnn \l_tmpa_seq { , }
+ {
+% \end{macrocode}
+% First we put the composites, which should have highest priority into the
+ % sequence (with some escaping of the characters which aren't alpha-numeric):
+% \begin{macrocode}
+ { \c{\! | tipaunibang } G }{ʛ},
+ { \c{\! | tipaunibang } g }{ɠ},
+ { \c{\* | tipaunistar } 1 }{ʢ},
+ { \c{\* | tipaunistar } 2 }{ʡ},
+ { \c{\* | tipaunistar } 3 }{ɧ},
+ { \c{\* | tipaunistar } Z }{ʑ},
+ { \c{\: | tipaunicolon } R }{ɻ},
+ { \c{\; | tipaunisemicolon} A }{ᴀ},
+ { \c{\; | tipaunisemicolon} G }{ɢ},
+ { \c{\; | tipaunisemicolon} B }{ʙ},
+ { \c{\; | tipaunisemicolon} E }{ᴇ},
+ { \c{\; | tipaunisemicolon} H }{ʜ},
+ { \c{\; | tipaunisemicolon} J }{ᴊ},
+ { \c{\; | tipaunisemicolon} L }{ʟ},
+ { \c{\; | tipaunisemicolon} N }{ɴ},
+ { \c{\; | tipaunisemicolon} R }{ʀ},
+ { \c{\; | tipaunisemicolon} U }{ᴜ},
+% \end{macrocode}
+% Next the multi-letter mappings:
+% \begin{macrocode}
+ {\|\|}{ǁ}, {\"\"}{ˌ},
+% \end{macrocode}
+% And finally the remaining single-letter mappings:
+% \begin{macrocode}
+ {5}{ɐ}, {A}{ɑ}, {6}{ɒ}, {2}{ʌ}, {B}{β}, {C}{ɕ}, {D}{ð}, {9}{ɘ}, {E}{ɛ},
+ {3}{ɜ}, {g}{ɡ}, {G}{ɣ}, {7}{ɤ}, {H}{ɦ}, {L}{ʎ}, {4}{ɥ}, {1}{ɨ}, {I}{ɪ},
+ {J}{ʝ}, {M}{ɱ}, {W}{ɯ}, {N}{ŋ}, {8}{ɵ}, {O}{ɔ}, {F}{ɸ}, {R}{ɾ}, {K}{ʁ},
+ {S}{ʃ}, {T}{θ}, {0}{ʉ}, {U}{ʊ}, {V}{ʋ}, {X}{χ}, {Y}{ʏ}, {Z}{ʒ},
+ {P}{ʔ}, {Q}{ʕ},
+ {\:}{ː}, {\;}{ˑ}, {\!}{ǃ}, {\&}{ɞ}, {\@}{ə}, {\|}{ǀ}, {\"}{ˈ}
+ }
+% \end{macrocode}
+% Now we build the real sequence from the temporary one. We have to call
+% \cs{regex_const:Nn} for each item to precompile the regular expressions, then
+% store the regular expressions name and the replacement in the correct
+% sequence.
+% \begin{macrocode}
+\seq_clear:N \l__tipauni_replace_maps_seq
+\seq_map_inline:Nn \l_tmpa_seq
+ {
+ \exp_args:Nco \regex_const:Nn
+ { c__tipauni_ \exp_args:No \tl_to_str:n { \use_i:nn #1 } _regex }
+ { \use_i:nn #1 }
+ \seq_put_right:Nx \l__tipauni_replace_maps_seq
+ {
+ \exp_not:c
+ { c__tipauni_ \exp_args:No \tl_to_str:n { \use_i:nn #1 } _regex }
+ { \exp_not:o { \use_ii:nn #1 } }
+ }
+ }
+% \end{macrocode}
+% Since we have a non-standard syntax for some of the accent macros (having a
+% starred variant) we have to exclude them from the list of accents which get
+% special handling from \cs{text_expand:n} or else the stars will be surrounded
+% by braces and not found by \cs{@ifstar}. This sequence stores the problematic
+% accents which need to be excluded.
+% \begin{macrocode}
+\seq_set_split:Nnn \l__tipauni_remove_from_accents_seq { , }
+ { \~, \=, \", \r, \v, \t }
+% \end{macrocode}
+% \begin{macrocode}
+\cs_new_protected:Npn \__tipauni_nontipa_search:n #1
+ {
+ \regex_match:nnT {ⱱ} {#1} \nontipatrue
+ \regex_match:nnT {ɞ} {#1} \nontipatrue
+ \regex_match:nnT {ɰ} {#1} \nontipatrue
+ \regex_match:nnT {ǃ} {#1} \nontipatrue
+ \regex_match:nnT {ǂ} {#1} \nontipatrue
+ \regex_match:nnT {ʢ} {#1} \nontipatrue
+ \regex_match:nnT {ɺ} {#1} \nontipatrue
+ \regex_match:nnT {ʑ} {#1} \nontipatrue
+ \regex_match:nnT {ɧ} {#1} \nontipatrue
+ }
+\cs_generate_variant:Nn \__tipauni_nontipa_search:n { o }
+\NewDocumentCommand\textipa{ +m }%
+ {
+ \begingroup
+ \let\*\tipaunistar
+ \let\:\tipaunicolon
+ \let\;\tipaunisemicolon
+ \let\!\tipaunibang
+ \let\|\tipaunipipe
+ \let\t\tipaunit
+ \catcode`\&=11
+% \end{macrocode}
+% Here we locally remove the accents which have a starred variant from the
+% exclusion list of \cs{text_expand:n}.
+% \begin{macrocode}
+ \seq_map_inline:Nn \l__tipauni_remove_from_accents_seq
+ { \tl_remove_all:Nn \l_text_accents_tl {##1} }
+% \end{macrocode}
+% Here is the real replacement. First we carefully expand the input using
+% \cs{text_expand:n}, then we'll loop over the sequence. Since each sequence
+% element contains two brace groups we can use the element |##1| directly as the
+% two normal argument to \cs{regex_replace_all:NnN}.
+% \begin{macrocode}
+ \tl_set:Nx \l__tipauni_textipa_tl { \text_expand:n {#1} }
+ \seq_map_inline:Nn \l__tipauni_replace_maps_seq
+ { \regex_replace_all:NnN ##1 \l__tipauni_textipa_tl }
+ \l__tipauni_textipa_tl
+% \end{macrocode}
+% Finally test for \pkg{tipa}-incompatible symbols. We only test for the
+% incompatible symbols if the boolean is not yet true to save a bit of
+% processing time when the tests are not necessary. Since the used
+% \cs{regex_match:nnT} test needs the token list expanded we expand it only once
+% here with the |o|-variant.
+% \begin{macrocode}
+ \unless\ifnontipa
+ \__tipauni_nontipa_search:o \l__tipauni_textipa_tl
+ \fi
+ \endgroup
+ }
+\ExplSyntaxOff
+% \end{macrocode}
+% The following commands define the long commands for dependent diacritics.
+% \begin{macrocode}
+%%-- Dependent diacritic marks
+%%--** Voiceless
+\DeclareUnicodeAccent{\textsubring}{TU}{"0325} %% ̥
+\DeclareTextCommand{\r}{TU}{\tipaunisubring}
+\protected\def\tipaunisubring{\@ifstar{\TipaUniSubRing}{\TipaUniSubRing}}
+\NewDocumentCommand\TipaUniSubRing{ m }{\textsubring{\textipa{#1}}}
+%%--** Voiced
+\DeclareUnicodeAccent{\textsubwedge}{TU}{"032C} %% ̬
+\DeclareTextCommand{\v}{TU}{\tipaunisubwedge}
+\protected\def\tipaunisubwedge{\@ifstar{\TipaUniSubWedge}{\TipaUniSubWedge}}
+\NewDocumentCommand\TipaUniSubWedge{ m }{\textsubwedge{\textipa{#1}}}
+%%--** More rounded
+\DeclareUnicodeAccent{\textsubrhalfring}{TU}{"0339} %% ̹
+\NewDocumentCommand\tipaunisubrhalfring{ m }{\textsubrhalfring{\textipa{#1}}}
+%%--** Less rounded
+\DeclareUnicodeAccent{\textsublhalfring}{TU}{"031C} %% ̜
+\NewDocumentCommand\tipaunisublhalfring{ m }{\textsublhalfring{\textipa{#1}}}
+%%--** Advanced
+\DeclareUnicodeAccent{\textsubplus}{TU}{"031F} %% ̟
+\NewDocumentCommand\tipaunisubplus{ m }{\textsubplus{\textipa{#1}}}
+%%--** Retracted
+\DeclareUnicodeAccent{\textsubbar}{TU}{"0320} %% ̠
+\DeclareTextCommand{\=}{TU}{\tipaunisubbar}
+\protected\def\tipaunisubbar{\@ifstar{\TipaUniSubBar}{\TipaUniSubBar}}
+\NewDocumentCommand\TipaUniSubBar{ m }{\textsubbar{\textipa{#1}}}
+%%--** Mid-centralized
+\DeclareUnicodeAccent{\textovercross}{TU}{"033D} %% ̽
+\NewDocumentCommand\tipauniovercross{ m }{\textovercross{\textipa{#1}}}
+%%--** Breathy voiced
+\DeclareUnicodeAccent{\textsubumlaut}{TU}{"0324} %% ̤
+\DeclareTextCommand{\"}{TU}{\tipaunisubumlaut}
+\protected\def\tipaunisubumlaut{\@ifstar{\TipaUniSubUmlaut}{\TipaUniSubUmlaut}}
+\NewDocumentCommand\TipaUniSubUmlaut{ m }{\textsubumlaut{\textipa{#1}}}
+%%--** Creaky voiced
+\DeclareUnicodeAccent{\textsubtilde}{TU}{"0330} %% ̰
+\DeclareTextCommand{\~}{TU}{\tipaunisubtilde}
+\protected\def\tipaunisubtilde{\@ifstar{\TipaUniSubTilde}{\TipaUniSubTilde}}
+\NewDocumentCommand\TipaUniSubTilde{ m }{\textsubtilde{\textipa{#1}}}
+%%--** Linguo-labialized
+\DeclareUnicodeAccent{\textseagull}{TU}{"033C} %% ̼
+\NewDocumentCommand\tipauniseagull{ m }{\textseagull{#1}}
+%%--** Velarized
+\DeclareUnicodeAccent{\textsuperimposetilde}{TU}{"0334} %% ̴
+\NewDocumentCommand\tipaunisuperimposetilde{ m }{\textsuperimposetilde{#1}}
+\NewDocumentCommand\vl{ m }{\textsuperimposetilde{\textipa{#1}}}
+%%--** Raised
+\DeclareUnicodeAccent{\textraising}{TU}{"031D} %% ̝
+\NewDocumentCommand{\tipauniraising}{m}{\textraising{#1}}
+%%--** Lowered
+\DeclareUnicodeAccent{\textlowering}{TU}{"031E} %% ̞
+\NewDocumentCommand{\tipaunilowering}{m}{\textlowering{#1}}
+% %%--** Advanced tongue root
+\DeclareUnicodeAccent{\textadvancing}{TU}{"0318} %% ̘
+\NewDocumentCommand{\tipauniadvancing}{m}{\textadvancing{#1}}
+%%--** Retracted tongue root
+\DeclareUnicodeAccent{\textretracting}{TU}{"0319} %% ̙
+\NewDocumentCommand{\tipauniretracting}{m}{\textretracting{#1}}
+%%--** Dental
+\DeclareUnicodeAccent{\textsubbridge}{TU}{"032A} %% ̪
+\NewDocumentCommand\tipaunisubbridge{ m }{\textsubbridge{#1}}
+%%--** Apical
+\DeclareUnicodeAccent{\textinvsubbridge}{TU}{"033A} %% ̺
+\NewDocumentCommand\tipauniinvsubbridge{ m }{\textinvsubbridge{#1}}
+%%--** Tie bar (above)
+\DeclareTextCommand{\tipaunitexttoptiebar}{TU}[2]{#1\symbol{"0361}#2}
+\NewDocumentCommand\texttoptiebar{ m }{\tipaunitexttoptiebar#1}
+\DeclareTextCommand{\tipaunit}{TU}{\@ifstar{\textbottomtiebar}{\texttoptiebar}}
+% \end{macrocode}
+% Lastly the code for environment \texttt{IPA} is provided by the following.
+% \begin{macrocode}
+\NewEnviron{IPA}{\textipa{\BODY}}
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \end{implementation}
+%
+% \pagebreak
+%
+% \input{gfdl-tex.tex}
+%
+% \Finale