summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/tipauni/tipauni.dtx
blob: e83e5af260d6c985d8530f5ee9e2e05bc66d0f78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
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