summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-20 21:22:41 +0000
committerKarl Berry <karl@freefriends.org>2022-02-20 21:22:41 +0000
commit361af17a8a2ae63f39dd6b24aaccdf4ce4c1214b (patch)
tree9eb828e39c363ab99d53463ee4db06dd8f9bba29 /Master/texmf-dist/tex/latex
parent36c40243665f27f57f0167810c4e29d88347ee0a (diff)
tipauni (20feb22)
git-svn-id: svn://tug.org/texlive/trunk@62108 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/tipauni/tipauni.sty181
1 files changed, 129 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/latex/tipauni/tipauni.sty b/Master/texmf-dist/tex/latex/tipauni/tipauni.sty
index 8ebeb4d4001..874522def2f 100644
--- a/Master/texmf-dist/tex/latex/tipauni/tipauni.sty
+++ b/Master/texmf-dist/tex/latex/tipauni/tipauni.sty
@@ -15,8 +15,8 @@
%% License: GPL v3.0+, GFDL 1.3+
%% ---------------------------------------------------------------------------
%%
-%% LaTeX Package tipauni v0.4
-%% Copyright © 2021 निरंजन
+%% LaTeX Package tipauni v0.4.1
+%% Copyright © 2021, 2022 निरंजन
%%
%% 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
@@ -39,23 +39,99 @@
%% ---------------------------------------------------------------------------
%%
\def\tipauniname{tipauni}
-\def\tipauniversion{0.4}
-\def\tipaunidate{2021-12-16}
+\def\tipauniversion{0.5}
+\def\tipaunidate{2022-02-20}
\def\tipaunidescription{For producing Unicode characters with TIPA commands}
-\ProvidesPackage{tipauni}[2021/12/16 v0.4
+\ProvidesPackage{tipauni}[2022/02/20 v0.5
Unicode characters with TIPA commands]
\RequirePackage{xparse}
\RequirePackage{fontspec}
-\RequirePackage{xkeyval}
-\setmainfont{CharisSIL} %% https://ctan.org/pkg/charissil
-\DeclareOptionX{documentfont}{\setmainfont{#1}}
-\newif\ifnontipaignore
-\DeclareOptionX{incompatible}{\nontipaignoretrue}
-\ProcessOptionsX\relax
+\RequirePackage{expkv-def,expkv-opt}
+\newif\iftipauni@document@font
+\def\tipauni@recommended@font{CharisSIL}
+\tipauni@document@fonttrue
+\let\tipauni@font@options\@empty
+\ekvdefinekeys{tipauni}{%
+ bool incompatible = \iftipauni@nontipa@ignore,%
+ noval preservefont = {%
+ \let\tipauni@font\tipauni@undefined
+ \tipauni@document@fontfalse
+ },%
+ estore fontspecoptions = \tipauni@font@options,%
+ new noval fontspecoptions = {%
+ \PackageWarningNoLine{tipauni}{%
+ As you haven't given any value to package option\MessageBreak
+ `fontspecoptions'; it will be ignored. Please\MessageBreak
+ provide a valid (list of) fontspec option(s)%
+ }%
+ },%
+ noval resetfontspecoptions = {%
+ \let\tipauni@font@options\@empty
+ },%
+ noval documentfont = {%
+ \PackageError{tipauni}{No value for the `documentfont' option}{%
+ The `documentfont' option has no value. Please provide a valid font-name,%
+ \MessageBreak
+ otherwise it will be ignored or (if given) the value of another non-empty%
+ \MessageBreak
+ `documentfont' will be used.%
+ }%
+ \ifdefined\tipauni@font
+ \tipauni@document@fonttrue
+ \else
+ \tipauni@document@fontfalse
+ \fi
+ },%
+ new code documentfont = {%
+ \edef\tipauni@temp{#1}%
+ \ifx\tipauni@temp\@empty
+ \PackageError{tipauni}{Empty `documentfont' option}{%
+ The `documentfont' option has an empty value. Please provide a valid%
+ \MessageBreak
+ font-name, otherwise it will be ignored or (if given) the value of%
+ \MessageBreak
+ another non-empty `documentfont' will be used.%
+ }%
+ \ifdefined\tipauni@font
+ \tipauni@document@fonttrue
+ \else
+ \tipauni@document@fontfalse
+ \fi
+ \else
+ \tipauni@document@fonttrue
+ \let\tipauni@font\tipauni@temp
+ \fi
+ },%
+ noval recommendedfont = {%
+ \tipauni@document@fonttrue
+ \let\tipauni@font\tipauni@recommended@font
+ }%
+}
+\ekvoProcessLocalOptions{tipauni}
+\iftipauni@document@font
+ \ifdefined\tipauni@font
+ \else
+ \let\tipauni@font\tipauni@recommended@font
+ \fi
+ \expandafter\setmainfont\expandafter
+ [\expandafter{\tipauni@font@options}]{\tipauni@font}
+\else
+ \ifx\tipauni@font@options\@empty
+ \else
+ \PackageWarningNoLine{tipauni}{%
+ An active font loaded with package fontspec is\MessageBreak
+ necessary for `fontspecoptions' to take effect.\MessageBreak
+ Please use the `documentfont'/`recommendedfont'\MessageBreak
+ option or load a font outside package `tipauni'\MessageBreak
+ to make your options active. Currently ignoring:\MessageBreak
+ [\tipauni@font@options]%
+ }%
+ \fi
+\fi
\newif\ifnontipa
\protected\def\nontipatrue{\global\let\ifnontipa\iftrue}
\protected\def\nontipafalse{\global\let\ifnontipa\iffalse}
-\ifnontipaignore
+\iftipauni@nontipa@ignore
\protected\def\nontipatrue{}
\fi
\NewDocumentCommand\tipaunicmd{ m m }{%
@@ -120,8 +196,8 @@ Unicode characters with TIPA commands]
\DeclareTextComposite{\tipaunisemicolon}{TU}{R}{"280}
%%-- Taps or flaps
%%-- Labiodental flap
-\tipaunicmd{\labdentflap}{ⱱ} %% tipauni-exclusive
-\DeclareTextComposite{\tipaunistar}{TU}{v}{"2C71} %% tipauni-exclusive
+\tipaunicmd{\labdentflap}{ⱱ}%% tipauni-exclusive
+\DeclareTextComposite{\tipaunistar}{TU}{v}{"2C71}%% tipauni-exclusive
%%--** Alveolar
\DeclareTextSymbol{\textfishhookr}{TU}{"27E}%% ɾ
%%--** Retroflex
@@ -162,7 +238,7 @@ Unicode characters with TIPA commands]
\DeclareTextComposite{\tipaunistar}{TU}{z}{"26E}
%%-- Approximants
%%-- Labiodental approximant
-\tipaunicmd{\labdentapp}{ʋ} %% tipauni-exclusive
+\tipaunicmd{\labdentapp}{ʋ}%% tipauni-exclusive
%%--** Alveolar
\DeclareTextSymbol{\textturnr}{TU}{"279}%% ɹ
\DeclareTextComposite{\tipaunistar}{TU}{r}{"279}
@@ -185,10 +261,10 @@ Unicode characters with TIPA commands]
\DeclareTextSymbol{\textbullseye}{TU}{"298}%% ʘ
\DeclareTextComposite{\tipaunibang}{TU}{o}{"298}
%%-- Postalveolar click
-\tipaunicmd{\pstalvclick}{ǃ} %% tipauni-exclusive
+\tipaunicmd{\pstalvclick}{ǃ}%% tipauni-exclusive
%%--** Palato-alveolar
\DeclareTextSymbol{\textdoublebarpipe}{TU}{"1C2}%% ǂ
-\DeclareTextComposite{\tipaunibang}{TU}{c}{"1C2} %% tipauni-exclusive
+\DeclareTextComposite{\tipaunibang}{TU}{c}{"1C2}%% tipauni-exclusive
%%--** Alveolar lateral
\DeclareTextSymbol{\textdoublepipe}{TU}{"1C1}% ǁ
%%-- Implosives
@@ -212,24 +288,24 @@ Unicode characters with TIPA commands]
\DeclareTextSymbol{\textturnh}{TU}{"265}%% ɥ
\DeclareTextSymbol{\textsch}{TU}{"29C}%% ʜ
\DeclareTextSymbol{\textbarrevglotstop}{TU}{"2A2}%% ʢ
-\DeclareTextComposite{\tipaunistar}{TU}{1}{"2A2} %% tipauni-exclusive
+\DeclareTextComposite{\tipaunistar}{TU}{1}{"2A2}%% tipauni-exclusive
\DeclareTextSymbol{\textbarglotstop}{TU}{"2A1}%% ʡ
-\DeclareTextComposite{\tipaunistar}{TU}{2}{"2A1} %% tipauni-exclusive
+\DeclareTextComposite{\tipaunistar}{TU}{2}{"2A1}%% tipauni-exclusive
\DeclareTextSymbol{\textctc}{TU}{"255}%% ɕ
\DeclareTextSymbol{\textctz}{TU}{"291}%% ʑ
-\DeclareTextComposite{\tipaunistar}{TU}{Z}{"291} %% tipauni-exclusive
+\DeclareTextComposite{\tipaunistar}{TU}{Z}{"291}%% tipauni-exclusive
\DeclareTextSymbol{\textturnlonglegr}{TU}{"27A}%% ɺ
-\DeclareTextComposite{\tipaunibang}{TU}{r}{"27A} %% tipauni-exclusive
+\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} % ᴜ
+\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}%% ʏ
@@ -261,16 +337,16 @@ Unicode characters with TIPA commands]
\NewDocumentCommand\stdlnetiebar{ m }{\tipaunits#1}
\NewDocumentCommand\ts{ m }{\tipaunits#1}
%% No audible release
-\DeclareUnicodeAccent{\textcorner}{TU}{"31A}%% ̚
+\DeclareTextSymbol{\textcorner}{TU}{"31A}%% ̚
\tipaunicmd{\tc}{̚}
%% Syllabic
-\DeclareUnicodeAccent{\textsyllabic}{TU}{"0329} %% ̩
+\DeclareUnicodeAccent{\textsyllabic}{TU}{"0329}%% ̩
\NewDocumentCommand\s{ m }{\textsyllabic{\textipa{#1}}\nontipatrue}
%% Non-syllabic
-\DeclareUnicodeAccent{\textsubarch}{TU}{"032F} %% ̯
+\DeclareUnicodeAccent{\textsubarch}{TU}{"032F}%% ̯
\NewDocumentCommand\ns{ m }{\textsubarch{\textipa{#1}}}
%% Laminal
-\DeclareUnicodeAccent{\textsubsquare}{TU}{"033B} %% ̻
+\DeclareUnicodeAccent{\textsubsquare}{TU}{"033B}%% ̻
\NewDocumentCommand\lmn{ m }{\textsubsquare{\textipa{#1}}\nontipatrue}
%% Other complex shorthand commands
\DeclareTextCommand{\@pipeshorthands}{TU}[2]{%
@@ -306,7 +382,7 @@ Unicode characters with TIPA commands]
\tl_new:N \l__tipauni_textipa_tl
\seq_set_split:Nnn \l__tipauni_remove_from_accents_seq { , }
{ \~, \=, \", \r, \v, \t }
-\ifnontipaignore
+\iftipauni@nontipa@ignore
\cs_new_eq:NN \__tipauni_nontipa_search: \prg_do_nothing:
\cs_new_eq:NN \__tipauni_nontipa_search:n \use_none:n
\else
@@ -524,65 +600,66 @@ Unicode characters with TIPA commands]
\ExplSyntaxOff
%%-- Dependent diacritic marks
%%--** Voiceless
-\DeclareUnicodeAccent{\textsubring}{TU}{"0325} %% ̥
+\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} %% ̬
+\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} %% ̹
+\DeclareUnicodeAccent{\textsubrhalfring}{TU}{"0339}%% ̹
\NewDocumentCommand\tipaunisubrhalfring{ m }{\textsubrhalfring{\textipa{#1}}}
%%--** Less rounded
-\DeclareUnicodeAccent{\textsublhalfring}{TU}{"031C} %% ̜
+\DeclareUnicodeAccent{\textsublhalfring}{TU}{"031C}%% ̜
\NewDocumentCommand\tipaunisublhalfring{ m }{\textsublhalfring{\textipa{#1}}}
%%--** Advanced
-\DeclareUnicodeAccent{\textsubplus}{TU}{"031F} %% ̟
+\DeclareUnicodeAccent{\textsubplus}{TU}{"031F}%% ̟
\NewDocumentCommand\tipaunisubplus{ m }{\textsubplus{\textipa{#1}}}
%%--** Retracted
-\DeclareUnicodeAccent{\textsubbar}{TU}{"0320} %% ̠
+\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} %% ̽
+\DeclareUnicodeAccent{\textovercross}{TU}{"033D}%% ̽
\NewDocumentCommand\tipauniovercross{ m }{\textovercross{\textipa{#1}}}
%%--** Breathy voiced
-\DeclareUnicodeAccent{\textsubumlaut}{TU}{"0324} %% ̤
+\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} %% ̰
+\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} %% ̼
+\DeclareUnicodeAccent{\textseagull}{TU}{"033C}%% ̼
\NewDocumentCommand\tipauniseagull{ m }{\textseagull{#1}}
%%--** Velarized
-\DeclareUnicodeAccent{\textsuperimposetilde}{TU}{"0334} %% ̴
+\DeclareUnicodeAccent{\textsuperimposetilde}{TU}{"0334}%% ̴
\NewDocumentCommand\tipaunisuperimposetilde{ m }{\textsuperimposetilde{#1}}
\NewDocumentCommand\vl{ m }{\textsuperimposetilde{\textipa{#1}}}
%%--** Raised
-\DeclareUnicodeAccent{\textraising}{TU}{"031D} %% ̝
+\DeclareUnicodeAccent{\textraising}{TU}{"031D}%% ̝
\NewDocumentCommand{\tipauniraising}{m}{\textraising{#1}}
%%--** Lowered
-\DeclareUnicodeAccent{\textlowering}{TU}{"031E} %% ̞
+\DeclareUnicodeAccent{\textlowering}{TU}{"031E}%% ̞
\NewDocumentCommand{\tipaunilowering}{m}{\textlowering{#1}}
-\DeclareUnicodeAccent{\textadvancing}{TU}{"0318} %% ̘
+%%%--** Advanced tongue root
+\DeclareUnicodeAccent{\textadvancing}{TU}{"0318}%% ̘
\NewDocumentCommand{\tipauniadvancing}{m}{\textadvancing{#1}}
%%--** Retracted tongue root
-\DeclareUnicodeAccent{\textretracting}{TU}{"0319} %% ̙
+\DeclareUnicodeAccent{\textretracting}{TU}{"0319}%% ̙
\NewDocumentCommand{\tipauniretracting}{m}{\textretracting{#1}}
%%--** Dental
-\DeclareUnicodeAccent{\textsubbridge}{TU}{"032A} %% ̪
+\DeclareUnicodeAccent{\textsubbridge}{TU}{"032A}%% ̪
\NewDocumentCommand\tipaunisubbridge{ m }{\textsubbridge{#1}}
%%--** Apical
-\DeclareUnicodeAccent{\textinvsubbridge}{TU}{"033A} %% ̺
+\DeclareUnicodeAccent{\textinvsubbridge}{TU}{"033A}%% ̺
\NewDocumentCommand\tipauniinvsubbridge{ m }{\textinvsubbridge{#1}}
%%--** Tie bar (above)
\DeclareTextCommand{\tipaunitexttoptiebar}{TU}[2]{#1\symbol{"0361}#2}