summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-04-28 20:06:19 +0000
committerKarl Berry <karl@freefriends.org>2024-04-28 20:06:19 +0000
commitc0d30cb2ee79016673b2d4621587146f65a5cb63 (patch)
treed0af4af6b7e12ad1a04c2719170f27e74e4d9d12 /Master/texmf-dist/tex
parent7ad18b307895db5a96d3a35150c5d92314231f60 (diff)
huaz (28apr24)
git-svn-id: svn://tug.org/texlive/trunk@71112 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/huaz/huaz.sty345
1 files changed, 216 insertions, 129 deletions
diff --git a/Master/texmf-dist/tex/latex/huaz/huaz.sty b/Master/texmf-dist/tex/latex/huaz/huaz.sty
index 1a9435bfffd..97b93c265be 100644
--- a/Master/texmf-dist/tex/latex/huaz/huaz.sty
+++ b/Master/texmf-dist/tex/latex/huaz/huaz.sty
@@ -3,7 +3,7 @@
%%
%% Automatic Hungarian definite articles
%%
-%% Copyright 2022-2024 by Tibor Tomacs
+%% Copyright 2022-2024 by Tibor Tómács
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -15,10 +15,10 @@
%%
%% This work has the LPPL maintenance status `maintained'.
%%
-%% The Current Maintainer of this work is Tibor Tomacs.
+%% The Current Maintainer of this work is Tibor Tómács.
%%
\NeedsTeXFormat{LaTeX2e}[2021/10/10]
-\ProvidesPackage{huaz}[2024/04/20 v1.2 Automatic Hungarian definite articles]
+\ProvidesPackage{huaz}[2024/04/28 v2.0 Automatic Hungarian definite articles]
\RequirePackage{xstring,refcount,iftex}
@@ -74,15 +74,22 @@
\NewHook{huaz}
-\AddToHook{huaz}{% In \StrChar, these commands will be considered as one syntax unit.
- \let\"\relax\let\'\relax\let\H\relax\let\`\relax\let\~\relax\let\^\relax\let\v\relax\let\u\relax%
- \let\=\relax\let\k\relax\let\.\relax\let\AA\relax\let\aa\relax\let\AE\relax\let\ae\relax\let\&\relax%
- \let\#\relax\let\_\relax}
-
-\def\huaz@y@#1#{\@gobble}
-\def\huaz@deloptparam{\huaz@y@\relax}% \def\textcolor{\huaz@deloptparam} --> \textcolor[RGB]{0,255,0}{text} --> text; \textcolor{red}{text} --> text
-
-\AddToHook{huaz}{% Ignored commands
+\AddToHook{huaz}{%
+ %
+ % Accent commands will be considered as one syntax unit
+ \let\"\relax\let\'\relax\let\`\relax\let\~\relax\let\^\relax\let\=\relax\let\.\relax%
+ \let\b\relax\let\B\relax\let\c\relax\let\d\relax\let\H\relax\let\k\relax\let\r\relax\let\u\relax\let\v\relax%
+ %
+ % Change letter commands
+ \def\AA{a}\def\aa{a}\def\AE{a}\def\ae{a}\def\IJ{ij}\def\ij{ij}%
+ \def\l{l}\def\NG{N}\def\ng{n}\def\O{o}\def\o{o}\def\OE{oe}\def\oe{oe}%
+ \def\SS{s}\def\ss{s}\def\TH{th}\def\th{th}%
+ \def\DJ{dj}\def\dj{dj}\def\DH{dh}\def\dh{dh}%
+ %
+ % Change sign commands to period
+ \def\&{.}\def\#{.}\def\%{.}\def\_{.}%
+ %
+ % Ignore commands
\def\usefont#1#2#3#4{}%
\def\fontsize#1#2{}%
\def\fontencoding#1{}%
@@ -108,19 +115,100 @@
\def\tiny{}\def\scriptsize{}\def\footnotesize{}\def\small{}\def\normalsize{}%
\def\large{}\def\Large{}\def\LARGE{}\def\huge{}\def\Huge{}%
\def\uppercase{}\def\lowercase{}\def\MakeUppercase{}\def\MakeLowercase{}%
- \def\textcolor{\huaz@deloptparam}\def\color{\huaz@deloptparam}%
+ \def\textcolor#1#{\@gobble}% \textcolor[...]{...}{text} and \textcolor{...}{text} --> text
+ \def\color#1#{\@gobble}% \color[...]{...}text and \color{...}text --> text
\def\mbox{}\def\fbox{}%
\def\makebox#1#{}% \makebox{text} and \makebox[opt]{text} --> text
\def\framebox#1#{}% \framebox{text} and \framebox[opt]{text} --> text
\def\textqq{}%
\def\enquote#1#{}% \enquote{text} and \enquote*{text} --> text
- \def\told{}}
-
-\AddToHook{huaz}{% Expandable cross-references commands
+ \def\told{}%
+ %
+ % Expandable cross-references commands
\def\ref#1#{\getrefnumber}% \ref{...} and \ref*{...} --> \getrefnumber{...}
\def\pageref#1#{\getpagerefnumber}% \pageref{...} and \pageref*{...} --> \getpagerefnumber{...}
- \def\eqref#1{\getrefnumber{#1}}%
- \def\cite{\huaz@cite}}
+ \def\eqref#1#{\getrefnumber}% \eqref{...} (amsmath) and \eqref*{...} (!!) --> \getrefnumber{...}
+ \def\refeq#1#{\getrefnumber}% \refeq{...} (mathtools) and \refeq*{...} (!!) --> \getrefnumber{...}
+ \def\cite{\huaz@cite}%
+ }
+
+%=================================================
+%
+% \huazignorecmd[option]{\command}
+% option: 0,1,...,9
+%
+% \huazignorecmd{\foo} = \AddToHook{huaz}{\def\foo{}}
+% ignored: \foo
+% for example: \huazignorecmd{\rmfamily}
+% \rmfamily text --> text
+%
+% \huazignorecmd[0]{\foo} = \AddToHook{huaz}{\def\foo#1#{}}
+% ignored: \foo, \foo*, \foo[...], \foo*[...]
+% for example: \huazignorecmd{\textrm}
+% \textrm{text} --> text
+% \huazignorecmd{\makebox}
+% \makebox[5cm]{text} --> text
+%
+% \huazignorecmd[1]{\foo} = \AddToHook{huaz}{\def\foo#1#{\@gobble}}
+% ignored: \foo{...}, \foo[...]{...}, \foo*[...]{...}
+% for example: \huazignorecmd{\textcolor}
+% \textcolor[RGB]{0,255,0}{text} --> text
+%
+% \huazignorecmd[2]{\foo} = \AddToHook{huaz}{\def\foo#1#{\huaz@gobble@ii}}
+% ignored: \foo{...}{...}, \foo[...]{...}{...}, \foo*[...]{...}{...}
+% for example: \huazignorecmd{\fontsize}
+% \fontsize{12pt}{12pt}text --> text
+%
+%=================================================
+
+\newcommand{\huaz@gobble@ii}[2]{}
+\newcommand{\huaz@gobble@iii}[3]{}
+\newcommand{\huaz@gobble@iv}[4]{}
+\newcommand{\huaz@gobble@v}[5]{}
+\newcommand{\huaz@gobble@vi}[6]{}
+\newcommand{\huaz@gobble@vii}[7]{}
+\newcommand{\huaz@gobble@viii}[8]{}
+\newcommand{\huaz@gobble@ix}[9]{}
+
+\def\huaz@check@opt#1{%
+ \def\huaz@opt{#1}%
+ \huaz@temp@if@false%
+ \@for\huaz@list:={,0,1,2,3,4,5,6,7,8,9,10}%
+ \do{\IfStrEq{\huaz@opt}{\huaz@list}{\huaz@temp@if@true}{}}%
+ \IfStrEq{\huaz@opt}{}{\def\huaz@opt{10}}{}%
+ \ifhuaz@temp@if@\else
+ \def\huaz@opt{10}%
+ \PackageWarning{huaz}{Valid options for \string\huazignorecmd: 0,1,...,9. The '[#1]' has been removed.}\fi}
+
+\NewDocumentCommand{\huazignorecmd}{>{\TrimSpaces}O{10}m}{%
+ \huaz@check@opt{#1}%
+ \ifcase\huaz@opt%
+ \AddToHook{huaz}{\def#2##1##{}}\or
+ \AddToHook{huaz}{\def#2##1##{\@gobble}}\or
+ \AddToHook{huaz}{\def#2##1##{\huaz@gobble@ii}}\or
+ \AddToHook{huaz}{\def#2##1##{\huaz@gobble@iii}}\or
+ \AddToHook{huaz}{\def#2##1##{\huaz@gobble@iv}}\or
+ \AddToHook{huaz}{\def#2##1##{\huaz@gobble@v}}\or
+ \AddToHook{huaz}{\def#2##1##{\huaz@gobble@vi}}\or
+ \AddToHook{huaz}{\def#2##1##{\huaz@gobble@vii}}\or
+ \AddToHook{huaz}{\def#2##1##{\huaz@gobble@viii}}\or
+ \AddToHook{huaz}{\def#2##1##{\huaz@gobble@ix}}\or
+ \AddToHook{huaz}{\def#2{}}\fi}
+
+%=================================================
+%
+% \huazrefcmd{\foo} = \AddToHook{huaz}{\def\foo#1#{\getrefnumber}}
+% --> \foo{...}, \foo[...]{...}, \foo*[...]{...} --> \getrefnumber{...}
+%
+% \huazpagerefcmd{\foo} = \AddToHook{huaz}{\def\foo#1#{\getpagerefnumber}}
+% --> \foo{...}, \foo[...]{...}, \foo*[...]{...} --> \getpagerefnumber{...}
+%
+% \huazdefcmd{...} = \AddToHook{huaz}{...}
+%=================================================
+
+\NewDocumentCommand{\huazrefcmd}{m}{\AddToHook{huaz}{\def#1##1##{\getrefnumber}}}
+\NewDocumentCommand{\huazpagerefcmd}{m}{\AddToHook{huaz}{\def#1##1##{\getpagerefnumber}}}
+\NewDocumentCommand{\huazdefcmd}{m}{\AddToHook{huaz}{#1}}
%=================================================
%
@@ -136,25 +224,25 @@
\UseHook{huaz}%
\huaz@must@z@false%
%
- % 1. syntax unit \AA,\aa,\AE,\ae,e,u,i,o,a,E,U,I,O,A,5
+ % 1. syntax unit e,u,i,o,a,E,U,I,O,A,5
\StrChar{#1}{1}[\huaz@temp]%
- \@for\huaz@list:={\AA,\aa,\AE,\ae,e,u,i,o,a,E,U,I,O,A,5}%
+ \@for\huaz@list:={e,u,i,o,a,E,U,I,O,A,5}%
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}%
%
% 1. syntax unit accent command and 2. character e,u,i,o,a,E,U,I,O,A (e.g. "\'A")
\ifhuaz@must@z@\else%
\huaz@temp@if@false%
\StrChar{#1}{1}[\huaz@temp]%
- \@for\huaz@list:={\",\',\H,\`,\~,\^,\v,\u,\=,\k}%
+ \@for\huaz@list:={\",\',\`,\~,\^,\=,\.,\b,\B,\c,\d,\H,\k,\r,\u,\v}%
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@temp@if@true}{}}%
\ifhuaz@temp@if@%
\StrChar{#1}{2}[\huaz@temp]%
- \@for\huaz@list:={e,u,i,a,E,U,I,O,A}%
+ \@for\huaz@list:={e,u,i,o,a,E,U,I,O,A}%
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}%
\fi%
\fi%
%
- % 1. character ö,ü,ó,ő,ú,é,á,ű,í,Ö,Ü,Ó,Ő,Ú,É,Á,Ű,Í,...
+ % 1. character in \huaz@list@A
\ifhuaz@must@z@\else%
\ifhuaz@must@oneunit@\StrLeft{#1}{1}[\huaz@tempa]\else\StrLeft{#1}{2}[\huaz@tempa]\fi% in pdflatex(utf8) Ő is two syntax units; in pdflatex(latin2)/xelatex/lualatex Ő is one syntax unit
\@for\huaz@list:=\huaz@list@A%
@@ -162,15 +250,15 @@
\IfStrEq{\huaz@tempa}{\huaz@tempb}{\huaz@must@z@true}{}}%
\fi%
%
- % 1. character f,l,m,n,r,x,y,F,L,M,N,S,R,X,Y and the 2. character is not letter (e.g. "M-10")
+ % 1. character f,l,m,n,s,r,x,y,F,L,M,N,S,R,X,Y,\huaz@list@X and the 2. character is not letter (e.g. "M-10")
\ifhuaz@must@z@\else%
\huaz@temp@if@false%
\StrChar{#1}{2}[\huaz@temp]%
- \@for\huaz@list:={;,`,',",+,!,/,=,(,),<,>,@,.,?,:,-,*,0,1,2,3,4,5,6,7,8,9,{,},{ },{},\&,\#,\_,\unskip,\kern}% \kern, \unskip for active characters
+ \@for\huaz@list:={;,`,',",+,!,/,=,(,),<,>,@,.,?,:,-,*,0,1,2,3,4,5,6,7,8,9,{,},{ },{},\unskip,\kern}% \kern, \unskip for active characters
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@temp@if@true}{}}%
\ifhuaz@temp@if@%
\StrChar{#1}{1}[\huaz@temp]%
- \@for\huaz@list:={f,l,m,n,r,x,y,F,L,M,N,S,R,X,Y}%
+ \@for\huaz@list:={f,l,m,n,s,r,x,y,F,L,M,N,S,R,X,Y}%
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}%
\ifhuaz@must@oneunit@%
\ifhuaz@must@z@\else%
@@ -185,26 +273,26 @@
\ifhuaz@must@z@\else%
\huaz@temp@if@false%
\StrChar{#1}{3}[\huaz@temp]%
- \@for\huaz@list:={;,`,',",+,!,/,=,(,),<,>,@,.,?,:,-,*,0,1,2,3,4,5,6,7,8,9,{,},{ },{},\&,\#,\_,\unskip,\kern}% \kern, \unskip for active characters
+ \@for\huaz@list:={;,`,',",+,!,/,=,(,),<,>,@,.,?,:,-,*,0,1,2,3,4,5,6,7,8,9,{,},{ },{},\unskip,\kern}% \kern, \unskip for active characters
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@temp@if@true}{}}%
\ifhuaz@temp@if@%
\huaz@temp@if@false%
\StrChar{#1}{2}[\huaz@temp]%
- \@for\huaz@list:={f,l,m,n,r,x,y,F,L,M,N,S,R,X,Y}%
+ \@for\huaz@list:={f,l,m,n,s,r,x,y,F,L,M,N,S,R,X,Y}%
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@temp@if@true}{}}%
\ifhuaz@temp@if@%
\StrChar{#1}{1}[\huaz@temp]%
- \@for\huaz@list:={\",\',\H,\`,\~,\^,\v,\u,\=,\k}%
+ \@for\huaz@list:={\",\',\`,\~,\^,\=,\.,\b,\B,\c,\d,\H,\k,\r,\u,\v}%
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}%
\fi%
\fi%
\fi%
%
- % first two characters ly,Ly,LY,ny,Ny,NY,sz,Sz,SZ,... and the 3. character is not letter (e.g. "NY" or "SZ-2")
+ % first two characters ly,Ly,LY,ny,Ny,NY,sz,Sz,SZ,\huaz@list@X and the 3. character is not letter (e.g. "NY" or "SZ-2")
\ifhuaz@must@z@\else%
\huaz@temp@if@false%
\StrChar{#1}{3}[\huaz@temp]%
- \@for\huaz@list:={;,`,',",+,!,/,=,(,),<,>,@,.,?,:,-,*,0,1,2,3,4,5,6,7,8,9,{,},{ },{},\&,\#,\_,\unskip,\kern}% \kern, \unskip for active characters
+ \@for\huaz@list:={;,`,',",+,!,/,=,(,),<,>,@,.,?,:,-,*,0,1,2,3,4,5,6,7,8,9,{,},{ },{},\unskip,\kern}% \kern, \unskip for active characters
\do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@temp@if@true}{}}%
\ifhuaz@temp@if@%
\StrLeft{#1}{2}[\huaz@temp]%
@@ -302,36 +390,49 @@
%=================================================
%
-% \huaz@try@roman{<...>}
-% Collect the characters i,v,x,l,c,d,m,I,V,X,L,C,D,M from the beginning of <...>.
-% This string is saved into \huaz@try@roman@result.
-% If this string is empty, then \huaz@try@roman@result is <...>. E.g.
-% \huaz@try@roman{XIV.6}\huaz@try@roman@result --> "XIV"
-% \huaz@try@roman{xiii.x}\huaz@try@roman@result --> "xiii"
-% \huaz@try@roman{d.xiii}\huaz@try@roman@result --> "d"
-% \huaz@try@roman{a.xiii}\huaz@try@roman@result --> "a.xiii"
-% \huaz@try@roman{XIii}\huaz@try@roman@result --> "XIii"
-% \huaz@try@roman{aXIIII}\huaz@try@roman@result --> "aXIIII"
+% \huaz@collect@roman{<...>}
+% Collecting the characters i,v,x,l,c,d,m,I,V,X,L,C,D,M from the beginning of <...>
+% "XIII" --> result string is "XIII"
+% "xiii.x" --> result string is "xiii"
+% "x ii.x" --> result string is "x"
+% "VB" --> result string is "V"
+% "XIV6" --> result string is "XIV"
+% "aXIII" --> result string is ""
+% If the result string = <...>, then \huaz@collect@roman@result := result string
+% \huaz@collect@roman{XIII}\huaz@collect@roman@result --> "XIII"
+% If the result string is not empty and the first character after it is a punctuation mark or space in <...> , then \huaz@collect@roman@result := result string
+% \huaz@collect@roman{xiii.x}\huaz@collect@roman@result --> "xiii"
+% \huaz@collect@roman{x ii.x}\huaz@collect@roman@result --> "x"
+% If the result string is not empty and the first character after it is a letter or digit in <...> , then \huaz@collect@roman@result := ""
+% \huaz@collect@roman{VB}\huaz@collect@roman@result --> ""
+% \huaz@collect@roman{XIV6}\huaz@collect@roman@result --> ""
+% If the result string is empty then \huaz@collect@roman@result := ""
+% \huaz@collect@roman{aXIII}\huaz@collect@roman@result --> ""
%
%=================================================
-\NewDocumentCommand{\huaz@try@roman}{m}{%
+\NewDocumentCommand{\huaz@collect@roman}{m}{%
\begingroup%
\exploregroups%
\UseHook{huaz}%
\StrLen{#1}[\huaz@temp]%
\setcounter{huaz@temp@count}{\huaz@temp}%
\setcounter{huaz@temp@count@}{1}%
- \gdef\huaz@try@roman@result{}%
+ \gdef\huaz@collect@roman@result{}%
\loop%
- \huaz@temp@if@false%
\StrChar{#1}{\thehuaz@temp@count@}[\huaz@temp]%
- \IfSubStr{ivxlcdmIVXLCDM}{\huaz@temp}{%
- \expandafter\g@addto@macro\expandafter\huaz@try@roman@result\expandafter{\huaz@temp}}
+ \IfSubStr{ivxlcdmIVXLCDM}{\huaz@temp}
+ {\expandafter\g@addto@macro\expandafter\huaz@collect@roman@result\expandafter{\huaz@temp}}
{\setcounter{huaz@temp@count@}{\value{huaz@temp@count}}}%
\ifnum\value{huaz@temp@count@}<\value{huaz@temp@count}\stepcounter{huaz@temp@count@}%
\repeat%
- \ifx\huaz@try@roman@result\@empty\gdef\huaz@try@roman@result{#1}\fi%
+ \IfStrEq{\huaz@collect@roman@result}{}{}{%
+ \huaz@temp@if@false%
+ \StrBehind{#1}{\huaz@collect@roman@result}[\huaz@tempa]%
+ \StrChar{\huaz@tempa}{1}[\huaz@tempb]%
+ \@for\huaz@list:={;,`,',",+,!,/,=,(,),<,>,@,.,?,:,-,*,{,},{ },{},\unskip,\kern}% \kern, \unskip for active characters
+ \do{\IfStrEq{\huaz@tempb}{\huaz@list}{\huaz@temp@if@true}{}}%
+ \ifhuaz@temp@if@\else\gdef\huaz@collect@roman@result{}\fi}%
\endgroup}
%=================================================
@@ -344,21 +445,32 @@
%=================================================
%
+% \azseparator
+%
+%=================================================
+
+\def\azseparator#1{\def\huaz@sep{#1}}
+\def\huaz@sep{~}
+
+%=================================================
+%
% \huaz@text
%
%=================================================
\NewDocumentCommand{\huaz@text}{st{=}m}{%
- \huaz@try@roman{#3}%
- \def\huaz@tempa{-1}%
- \edef\huaz@tempb{\huaz@romantoarabic{\huaz@try@roman@result}}%
+ \huaz@collect@roman{#3}%
+ \huaz@temp@if@true%
+ \edef\huaz@temp{\huaz@romantoarabic{\huaz@collect@roman@result}}%
+ \IfStrEq{\huaz@temp}{0}{\huaz@temp@if@false}{}%
+ \IfStrEq{\huaz@temp}{-1}{\huaz@temp@if@false}{}%
\IfBooleanTF{#2}{\huaz@z{#3}}{%
- \ifx\huaz@tempb\huaz@tempa%
- \huaz@z{#3}%
+ \ifhuaz@temp@if@%
+ \huaz@z{\huaz@romantoarabic{\huaz@collect@roman@result}}%
\else%
- \huaz@z{\huaz@romantoarabic{\huaz@try@roman@result}}%
+ \huaz@z{#3}%
\fi}%
- \IfBooleanF{#1}{\ifhuaz@show@~#3\fi}%
+ \IfBooleanF{#1}{\ifhuaz@show@\huaz@sep{#3}\fi}%
\huaz@show@true}
%=================================================
@@ -367,10 +479,29 @@
%
%=================================================
-\DeclareDocumentCommand{\az}{sm}{\ifhuaz@show@ a\fi\IfBooleanTF{#1}{\huaz@text*{#2}}{\huaz@text{#2}}\xdef\azsaved{a\huaz@save}}
-\DeclareDocumentCommand{\Az}{sm}{\ifhuaz@show@ A\fi\IfBooleanTF{#1}{\huaz@text*{#2}}{\huaz@text{#2}}\xdef\azsaved{A\huaz@save}}
-\DeclareDocumentCommand{\azv}{sm}{\ifhuaz@show@ a\fi\IfBooleanTF{#1}{\huaz@text*={#2}}{\huaz@text={#2}}\xdef\azsaved{a\huaz@save}}
-\DeclareDocumentCommand{\Azv}{sm}{\ifhuaz@show@ A\fi\IfBooleanTF{#1}{\huaz@text*={#2}}{\huaz@text={#2}}\xdef\azsaved{A\huaz@save}}
+\DeclareDocumentCommand{\az}{s>{\TrimSpaces}m}{%
+ \ifhuaz@show@ a\fi
+ \IfBooleanTF{#1}{\huaz@text*{#2}}{\huaz@text{#2}}%
+ \IfBlankT{#2}{\PackageWarning{huaz}{Argument of \string\az\space is empty}\textup{(?)}}%
+ \xdef\azsaved{a\huaz@save}}
+
+\DeclareDocumentCommand{\Az}{s>{\TrimSpaces}m}{%
+ \ifhuaz@show@ A\fi
+ \IfBooleanTF{#1}{\huaz@text*{#2}}{\huaz@text{#2}}%
+ \IfBlankT{#2}{\PackageWarning{huaz}{Argument of \string\Az\space is empty}\textup{(?)}}%
+ \xdef\azsaved{A\huaz@save}}
+
+\DeclareDocumentCommand{\azv}{s>{\TrimSpaces}m}{%
+ \ifhuaz@show@ a\fi
+ \IfBooleanTF{#1}{\huaz@text*={#2}}{\huaz@text={#2}}%
+ \IfBlankT{#2}{\PackageWarning{huaz}{Argument of \string\azv\space is empty}\textup{(?)}}%
+ \xdef\azsaved{a\huaz@save}}
+
+\DeclareDocumentCommand{\Azv}{s>{\TrimSpaces}m}{%
+ \ifhuaz@show@ A\fi
+ \IfBooleanTF{#1}{\huaz@text*={#2}}{\huaz@text={#2}}%
+ \IfBlankT{#2}{\PackageWarning{huaz}{Argument of \string\Azv\space is empty}\textup{(?)}}%
+ \xdef\azsaved{A\huaz@save}}
%=================================================
%
@@ -378,10 +509,10 @@
%
%=================================================
-\DeclareDocumentCommand{\aref}{sm}{\IfBooleanTF{#1}{\az*{\ref{#2}}}{\az{\ref{#2}}}}
-\DeclareDocumentCommand{\Aref}{sm}{\IfBooleanTF{#1}{\Az*{\ref{#2}}}{\Az{\ref{#2}}}}
-\DeclareDocumentCommand{\avref}{sm}{\IfBooleanTF{#1}{\azv*{\ref{#2}}}{\azv{\ref{#2}}}}
-\DeclareDocumentCommand{\Avref}{sm}{\IfBooleanTF{#1}{\Azv*{\ref{#2}}}{\Azv{\ref{#2}}}}
+\DeclareDocumentCommand{\aref}{sm}{\IfBooleanTF{#1}{\az{\ref*{#2}}}{\az{\ref{#2}}}}
+\DeclareDocumentCommand{\Aref}{sm}{\IfBooleanTF{#1}{\Az{\ref*{#2}}}{\Az{\ref{#2}}}}
+\DeclareDocumentCommand{\avref}{sm}{\IfBooleanTF{#1}{\azv{\ref*{#2}}}{\azv{\ref{#2}}}}
+\DeclareDocumentCommand{\Avref}{sm}{\IfBooleanTF{#1}{\Azv{\ref*{#2}}}{\Azv{\ref{#2}}}}
%=================================================
%
@@ -389,10 +520,10 @@
%
%=================================================
-\DeclareDocumentCommand{\apageref}{sm}{\IfBooleanTF{#1}{\az*{\pageref{#2}}}{\az{\pageref{#2}}}}
-\DeclareDocumentCommand{\Apageref}{sm}{\IfBooleanTF{#1}{\Az*{\pageref{#2}}}{\Az{\pageref{#2}}}}
-\DeclareDocumentCommand{\avpageref}{sm}{\IfBooleanTF{#1}{\azv*{\pageref{#2}}}{\azv{\pageref{#2}}}}
-\DeclareDocumentCommand{\Avpageref}{sm}{\IfBooleanTF{#1}{\Azv*{\pageref{#2}}}{\Azv{\pageref{#2}}}}
+\DeclareDocumentCommand{\apageref}{sm}{\IfBooleanTF{#1}{\az{\pageref*{#2}}}{\az{\pageref{#2}}}}
+\DeclareDocumentCommand{\Apageref}{sm}{\IfBooleanTF{#1}{\Az{\pageref*{#2}}}{\Az{\pageref{#2}}}}
+\DeclareDocumentCommand{\avpageref}{sm}{\IfBooleanTF{#1}{\azv{\pageref*{#2}}}{\azv{\pageref{#2}}}}
+\DeclareDocumentCommand{\Avpageref}{sm}{\IfBooleanTF{#1}{\Azv{\pageref*{#2}}}{\Azv{\pageref{#2}}}}
%=================================================
%
@@ -400,10 +531,21 @@
%
%=================================================
-\DeclareDocumentCommand{\aeqref}{sm}{\IfBooleanTF{#1}{\az*{\eqref{#2}}}{\az{\eqref{#2}}}}
-\DeclareDocumentCommand{\Aeqref}{sm}{\IfBooleanTF{#1}{\Az*{\eqref{#2}}}{\Az{\eqref{#2}}}}
-\DeclareDocumentCommand{\aveqref}{sm}{\IfBooleanTF{#1}{\azv*{\eqref{#2}}}{\azv{\eqref{#2}}}}
-\DeclareDocumentCommand{\Aveqref}{sm}{\IfBooleanTF{#1}{\Azv*{\eqref{#2}}}{\Azv{\eqref{#2}}}}
+\DeclareDocumentCommand{\aeqref}{m}{\az{\eqref{#1}}}
+\DeclareDocumentCommand{\Aeqref}{m}{\Az{\eqref{#1}}}
+\DeclareDocumentCommand{\aveqref}{m}{\azv{\eqref{#1}}}
+\DeclareDocumentCommand{\Aveqref}{m}{\Azv{\eqref{#1}}}
+
+%=================================================
+%
+% \arefeq \Arefeq \avrefeq \Avrefeq
+%
+%=================================================
+
+\DeclareDocumentCommand{\arefeq}{m}{\az{\refeq{#1}}}
+\DeclareDocumentCommand{\Arefeq}{m}{\Az{\refeq{#1}}}
+\DeclareDocumentCommand{\avrefeq}{m}{\azv{\refeq{#1}}}
+\DeclareDocumentCommand{\Avrefeq}{m}{\Azv{\refeq{#1}}}
%=================================================
%
@@ -411,65 +553,10 @@
%
%=================================================
-\DeclareDocumentCommand{\acite}{som}{%
- \IfBooleanTF{#1}{%
- \IfNoValueTF{#2}{%
- \az*{\cite{#3}}%
- }{%
- \az*{\cite[#2]{#3}}%
- }%
- }{%
- \IfNoValueTF{#2}{%
- \az{\cite{#3}}%
- }{%
- \az{\cite[#2]{#3}}%
- }%
- }}
-
-\DeclareDocumentCommand{\Acite}{som}{%
- \IfBooleanTF{#1}{%
- \IfNoValueTF{#2}{%
- \Az*{\cite{#3}}%
- }{%
- \Az*{\cite[#2]{#3}}%
- }%
- }{%
- \IfNoValueTF{#2}{%
- \Az{\cite{#3}}%
- }{%
- \Az{\cite[#2]{#3}}%
- }%
- }}
-
-\DeclareDocumentCommand{\avcite}{som}{%
- \IfBooleanTF{#1}{%
- \IfNoValueTF{#2}{%
- \azv*{\cite{#3}}%
- }{%
- \azv*{\cite[#2]{#3}}%
- }%
- }{%
- \IfNoValueTF{#2}{%
- \azv{\cite{#3}}%
- }{%
- \azv{\cite[#2]{#3}}%
- }%
- }}
-
-\DeclareDocumentCommand{\Avcite}{som}{%
- \IfBooleanTF{#1}{%
- \IfNoValueTF{#2}{%
- \Azv*{\cite{#3}}%
- }{%
- \Azv*{\cite[#2]{#3}}%
- }%
- }{%
- \IfNoValueTF{#2}{%
- \Azv{\cite{#3}}%
- }{%
- \Azv{\cite[#2]{#3}}%
- }%
- }}
+\DeclareDocumentCommand{\acite}{om}{\IfNoValueTF{#1}{\az{\cite{#2}}}{\az{\cite[#1]{#2}}}}
+\DeclareDocumentCommand{\Acite}{om}{\IfNoValueTF{#1}{\Az{\cite{#2}}}{\Az{\cite[#1]{#2}}}}
+\DeclareDocumentCommand{\avcite}{om}{\IfNoValueTF{#1}{\azv{\cite{#2}}}{\azv{\cite[#1]{#2}}}}
+\DeclareDocumentCommand{\Avcite}{om}{\IfNoValueTF{#1}{\Azv{\cite{#2}}}{\Azv{\cite[#1]{#2}}}}
%=================================================
%