From 6d64372d4e3df2497c111b083e674329a25d4db8 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 6 May 2024 03:01:22 +0000 Subject: CTAN sync 202405060301 --- macros/latex/contrib/huaz/huaz.sty | 252 +++++++++++++++++++++++++++++-------- 1 file changed, 200 insertions(+), 52 deletions(-) (limited to 'macros/latex/contrib/huaz/huaz.sty') diff --git a/macros/latex/contrib/huaz/huaz.sty b/macros/latex/contrib/huaz/huaz.sty index 97b93c265b..19ae1dacba 100644 --- a/macros/latex/contrib/huaz/huaz.sty +++ b/macros/latex/contrib/huaz/huaz.sty @@ -18,7 +18,7 @@ %% The Current Maintainer of this work is Tibor Tómács. %% \NeedsTeXFormat{LaTeX2e}[2021/10/10] -\ProvidesPackage{huaz}[2024/04/28 v2.0 Automatic Hungarian definite articles] +\ProvidesPackage{huaz}[2024/05/05 v2.1 Automatic Hungarian definite articles] \RequirePackage{xstring,refcount,iftex} @@ -33,36 +33,62 @@ %================================================= % % utf8: -% \huaz@list@A = ö,ü,ó,ő,ú,é,á,ű,í,Ö,Ü,Ó,Ő,Ú,É,Á,Ű,Í,Ä,À,Ã,Â,Ă,Å,Ą,Æ,ä,à,ã,â,ă,å,ą,æ,Ë,È,Ê,Ě,Ę,ë,è,ê,ě,ę,Ï,Í,Ì,Î,ï,ì,î,Ò,Õ,Ô,Ø,OE,ò,õ,ô,ø,Ù,Û,Ů,ù,û,ů -% \huaz@list@X = Ĺ,Ł,ļ,ĺ,ł,Ņ,Ń,Ñ,Ň,Ŋ,ń,ñ,ň,ŋ,Ŗ,Ŕ,Ř,ŗ,ŕ,ř,Ş,Ș,Ś,Š,ş,ș,ś,š,Ÿ,Ý,ÿ,ý +% \huaz@list@A = ö,ü,ó,ő,ú,é,á,ű,í,Ö,Ü,Ó,Ő,Ú,É,Á,Ű,Í,Ä,À,Ã,Â,Ă,Å,Ą,Æ,ä,à,ã,â,ă,å,ą,æ, +% Ë,È,Ê,Ě,Ę,ë,è,ê,ě,ę,Ï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^^c5^^85,^^c5^^83,^^c3^^91,^^c5^^87,% + ^^c5^^8a,^^c5^^84,^^c3^^b1,^^c5^^88,^^c5^^8b,^^c5^^96,^^c5^^94,^^c5^^98,^^c5^^97,% + ^^c5^^95,^^c5^^99,^^c5^^9e,^^c8^^98,^^c5^^9a,^^c5^^a0,^^c5^^9f,^^c8^^99,^^c5^^9b,% + ^^c5^^a1,^^c5^^b8,^^c3^^9d,^^c3^^bf,^^c3^^bd} \huaz@must@oneunit@false \fi \def\huaz@latinii{latin2} \ifx\inputencodingname\huaz@latinii - \def\huaz@list@A{^^a1,^^b1,^^c1,^^c2,^^c3,^^c4,^^c9,^^ca,^^cb,^^cc,^^cd,^^ce,^^d3,^^d4,^^d5,^^d6,^^d9,^^da,^^db,^^dc,^^e1,^^e2,^^e3,^^e4,^^e5,^^e9,^^ea,^^eb,^^ec,^^ed,^^ee,^^f3,^^f4,^^f5,^^f6,^^f9,^^fa,^^fb,^^fc} - \def\huaz@list@X{^^a3,^^a5,^^a6,^^a9,^^aa,^^b3,^^b6,^^b9,^^ba,^^c0,^^c5,^^d1,^^d2,^^d8,^^dd,^^df,^^e0,^^f1,^^f2,^^f8,^^fd} + \def\huaz@list@A{% + ^^a1,^^b1,^^c1,^^c2,^^c3,^^c4,^^c9,^^ca,^^cb,^^cc,^^cd,^^ce,^^d3,^^d4,^^d5,^^d6,% + ^^d9,^^da,^^db,^^dc,^^e1,^^e2,^^e3,^^e4,^^e5,^^e9,^^ea,^^eb,^^ec,^^ed,^^ee,^^f3,% + ^^f4,^^f5,^^f6,^^f9,^^fa,^^fb,^^fc} + \def\huaz@list@S{% + ^^a3,^^a5,^^a6,^^a9,^^aa,^^b3,^^b6,^^b9,^^ba,^^c0,^^c5,^^d1,^^d2,^^d8,^^dd,^^df,% + ^^e0,^^f1,^^f2,^^f8,^^fd} \huaz@must@oneunit@true \fi - \ifx\inputencodingname\huaz@utfviii\else - \ifx\inputencodingname\huaz@latinii\else - \PackageError{huaz}{You should use utf8 or latin2 inputenc}{} - \fi - \fi -\else - \def\huaz@list@A{^^^^00f6,^^^^00fc,^^^^00f3,^^^^0151,^^^^00fa,^^^^00e9,^^^^00e1,^^^^0171,^^^^00ed,^^^^00d6,^^^^00dc,^^^^00d3,^^^^0150,^^^^00da,^^^^00c9,^^^^00c1,^^^^0170,^^^^00cd,^^^^00c4,^^^^00c0,^^^^00c3,^^^^00c2,^^^^0102,^^^^00c5,^^^^0104,^^^^00c6,^^^^00e4,^^^^00e0,^^^^00e3,^^^^00e2,^^^^0103,^^^^00e5,^^^^0105,^^^^00e6,^^^^00cb,^^^^00c8,^^^^00ca,^^^^011a,^^^^0118,^^^^00eb,^^^^00e8,^^^^00ea,^^^^011b,^^^^0119,^^^^00cf,^^^^00cd,^^^^00cc,^^^^00ce,^^^^00ef,^^^^00ec,^^^^00ee,^^^^00d2,^^^^00d5,^^^^00d4,^^^^00d8,^^^^004f,^^^^0045,^^^^00f2,^^^^00f5,^^^^00f4,^^^^00f8,^^^^00d9,^^^^00db,^^^^016e,^^^^00f9,^^^^00fb,^^^^016f} - \def\huaz@list@X{^^^^0139,^^^^0141,^^^^013c,^^^^013a,^^^^0142,^^^^0145,^^^^0143,^^^^00d1,^^^^0147,^^^^014a,^^^^0144,^^^^00f1,^^^^0148,^^^^014b,^^^^0156,^^^^0154,^^^^0158,^^^^0157,^^^^0155,^^^^0159,^^^^015e,^^^^0218,^^^^015a,^^^^0160,^^^^015f,^^^^0219,^^^^015b,^^^^0161,^^^^0178,^^^^00dd,^^^^00ff,^^^^00fd} + \ifdefined\huaz@list@A\else\PackageError{huaz}{You should use utf8 or latin2 inputenc}{}\fi +\else% xelatex lualatex + \def\huaz@list@A{% + ^^^^00f6,^^^^00fc,^^^^00f3,^^^^0151,^^^^00fa,^^^^00e9,^^^^00e1,^^^^0171,^^^^00ed,% + ^^^^00d6,^^^^00dc,^^^^00d3,^^^^0150,^^^^00da,^^^^00c9,^^^^00c1,^^^^0170,^^^^00cd,% + ^^^^00c4,^^^^00c0,^^^^00c3,^^^^00c2,^^^^0102,^^^^00c5,^^^^0104,^^^^00c6,^^^^00e4,% + ^^^^00e0,^^^^00e3,^^^^00e2,^^^^0103,^^^^00e5,^^^^0105,^^^^00e6,^^^^00cb,^^^^00c8,% + ^^^^00ca,^^^^011a,^^^^0118,^^^^00eb,^^^^00e8,^^^^00ea,^^^^011b,^^^^0119,^^^^00cf,% + ^^^^00cd,^^^^00cc,^^^^00ce,^^^^00ef,^^^^00ec,^^^^00ee,^^^^00d2,^^^^00d5,^^^^00d4,% + ^^^^00d8,^^^^004f,^^^^0045,^^^^00f2,^^^^00f5,^^^^00f4,^^^^00f8,^^^^00d9,^^^^00db,% + ^^^^016e,^^^^00f9,^^^^00fb,^^^^016f} + \def\huaz@list@S{% + ^^^^0139,^^^^0141,^^^^013c,^^^^013a,^^^^0142,^^^^0145,^^^^0143,^^^^00d1,^^^^0147,% + ^^^^014a,^^^^0144,^^^^00f1,^^^^0148,^^^^014b,^^^^0156,^^^^0154,^^^^0158,^^^^0157,% + ^^^^0155,^^^^0159,^^^^015e,^^^^0218,^^^^015a,^^^^0160,^^^^015f,^^^^0219,^^^^015b,% + ^^^^0161,^^^^0178,^^^^00dd,^^^^00ff,^^^^00fd} \huaz@must@oneunit@true \fi @@ -76,19 +102,24 @@ \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% + % Accent commands are considered as one unit + \let\"\relax\let\'\relax\let\`\relax\let\~\relax% \def\'{} ==> \az*{\'{X}}=\az*{X}=\az*{10}=a is not correct + \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}% + % Redefining letter commands + \def\AA{a}\def\aa{a}\def\AE{a}\def\ae{a}% + \def\IJ{a}\def\ij{a}\def\i{a}% \def\i{i} ==> \az*{\i x}=\az*{ix}=\az*{9}=a is not correct + \def\O{a}\def\o{a}\def\OE{a}\def\oe{a}% + \def\l{s}\def\NG{s}\def\ng{s}\def\SS{s}\def\ss{s}% % - % Change sign commands to period + % Redefinition of punctuation commands to period \def\&{.}\def\#{.}\def\%{.}\def\_{.}% % + % Redefinition of space commands to normal space + \def\,{ }\def\:{ }\def\;{ }\def\enspace{ }\def\enskip{ }\def\quad{ }\def\qquad{ }% + % % Ignore commands \def\usefont#1#2#3#4{}% \def\fontsize#1#2{}% @@ -117,12 +148,15 @@ \def\uppercase{}\def\lowercase{}\def\MakeUppercase{}\def\MakeLowercase{}% \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\href#1#{\@gobble}% \href{URL}{text} --> text + \def\mbox{}\def\fbox{}\def\hbox{}% \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{}% + \def\num#1#{}% (siunitx package) \num[...]{1000000} --> 1000000 + \def\negthinspace{}\def\!{}% % % Expandable cross-references commands \def\ref#1#{\getrefnumber}% \ref{...} and \ref*{...} --> \getrefnumber{...} @@ -130,6 +164,9 @@ \def\eqref#1#{\getrefnumber}% \eqref{...} (amsmath) and \eqref*{...} (!!) --> \getrefnumber{...} \def\refeq#1#{\getrefnumber}% \refeq{...} (mathtools) and \refeq*{...} (!!) --> \getrefnumber{...} \def\cite{\huaz@cite}% + \def\citeauthor{\huaz@citeauthor}% + \def\textcite{\huaz@citeauthor}% + \def\citeyear{\huaz@citeyear}% } %================================================= @@ -224,12 +261,16 @@ \UseHook{huaz}% \huaz@must@z@false% % - % 1. syntax unit e,u,i,o,a,E,U,I,O,A,5 + % 1. unit: e,u,i,o,a,E,U,I,O,A,5 + % \StrChar{#1}{1}[\huaz@temp]% \@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") + % 1. unit: accent command + % 2. unit: e,u,i,o,a,E,U,I,O,A + % "\'A" "\'{A}" + % \ifhuaz@must@z@\else% \huaz@temp@if@false% \StrChar{#1}{1}[\huaz@temp]% @@ -242,15 +283,41 @@ \fi% \fi% % - % 1. character in \huaz@list@A + % 1. unit: \",\',\`,\~,\^,\=,\. + % 2. unit: space(s) + % 3. unit: e,u,i,o,a,E,U,I,O,A + % "\' A", "\' A", "\' {A}" + % + \ifhuaz@must@z@\else% + \huaz@temp@if@false% + \StrChar{#1}{1}[\huaz@temp]% + \@for\huaz@list:={\",\',\`,\~,\^,\=,\.}% + \do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@temp@if@true}{}}% + \ifhuaz@temp@if@% + \huaz@temp@if@false% + \StrChar{#1}{2}[\huaz@temp]% + \IfStrEq{\huaz@temp}{ }{\huaz@temp@if@true}{}% + \fi% + \ifhuaz@temp@if@% + \StrChar{#1}{3}[\huaz@temp]% + \@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. unit: \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 + \ifhuaz@must@oneunit@\StrLeft{#1}{1}[\huaz@tempa]\else\StrLeft{#1}{2}[\huaz@tempa]\fi% in pdflatex(utf8) Ő is two units; in pdflatex(latin2)/xelatex/lualatex Ő is one unit \@for\huaz@list:=\huaz@list@A% \do{\StrLeft{\huaz@list}{2}[\huaz@tempb]% \IfStrEq{\huaz@tempa}{\huaz@tempb}{\huaz@must@z@true}{}}% \fi% % - % 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") + % 1. unit: f,l,m,n,s,r,x,y,F,L,M,N,S,R,X,Y,\huaz@list@S(one unit) + % 2. unit: punctuation + % "M-10" + % \ifhuaz@must@z@\else% \huaz@temp@if@false% \StrChar{#1}{2}[\huaz@temp]% @@ -262,14 +329,18 @@ \do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}% \ifhuaz@must@oneunit@% \ifhuaz@must@z@\else% - \@for\huaz@list:=\huaz@list@X% in pdflatex(latin2)/xelatex/lualatex Š is one syntax unit + \@for\huaz@list:=\huaz@list@S% in pdflatex(latin2)/xelatex/lualatex Š is one unit \do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}% \fi% \fi% \fi% \fi% % - % 1. syntax unit accent command, 2. character f,l,m,n,r,x,y,F,L,M,N,S,R,X,Y and the 3. character is not letter (e.g. "\^Y.") + % 1. unit: accent command + % 2. unit: f,l,m,n,r,x,y,F,L,M,N,S,R,X,Y + % 3. unit: punctuation + % "\^Y." + % \ifhuaz@must@z@\else% \huaz@temp@if@false% \StrChar{#1}{3}[\huaz@temp]% @@ -280,15 +351,47 @@ \StrChar{#1}{2}[\huaz@temp]% \@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:={\",\',\`,\~,\^,\=,\.,\b,\B,\c,\d,\H,\k,\r,\u,\v}% - \do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}% - \fi% + \fi% + \ifhuaz@temp@if@% + \StrChar{#1}{1}[\huaz@temp]% + \@for\huaz@list:={\",\',\`,\~,\^,\=,\.,\b,\B,\c,\d,\H,\k,\r,\u,\v}% + \do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}% + \fi% + \fi% + % + % 1. unit: \",\',\`,\~,\^,\=,\. + % 2. unit: space(s) + % 3. unit: f,l,m,n,r,x,y,F,L,M,N,S,R,X,Y + % 4. unit: punctuation + % "\^ Y." + % + \ifhuaz@must@z@\else% + \huaz@temp@if@false% + \StrChar{#1}{4}[\huaz@temp]% + \@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}{3}[\huaz@temp]% + \@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}{}}% + \fi% + \ifhuaz@temp@if@% + \huaz@temp@if@false% + \StrChar{#1}{2}[\huaz@temp]% + \IfStrEq{\huaz@temp}{ }{\huaz@temp@if@true}{}% + \fi% + \ifhuaz@temp@if@% + \StrChar{#1}{1}[\huaz@temp]% + \@for\huaz@list:={\",\',\`,\~,\^,\=,\.}% + \do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}% \fi% \fi% % - % 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") + % 1-2. units: ly,Ly,LY,ny,Ny,NY,sz,Sz,SZ,\huaz@list@S(two units) + % 3. unit: punctuation + % "NY" "SZ-2" + % \ifhuaz@must@z@\else% \huaz@temp@if@false% \StrChar{#1}{3}[\huaz@temp]% @@ -300,14 +403,17 @@ \do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}% \ifhuaz@must@oneunit@\else% \ifhuaz@must@z@\else% - \@for\huaz@list:=\huaz@list@X% in pdflatex(utf8) Š is two syntax units + \@for\huaz@list:=\huaz@list@S% in pdflatex(utf8) Š is two units \do{\IfStrEq{\huaz@temp}{\huaz@list}{\huaz@must@z@true}{}}% \fi% \fi% \fi% \fi% % - % 1. character 1 and the 2. character is not number (e.g. "1H") + % 1. unit: 1 + % 2. unit: not digit + % "1H" + % \ifhuaz@must@z@\else% \StrChar{#1}{1}[\huaz@temp]% \IfStrEq{\huaz@temp}{1}{% @@ -316,14 +422,17 @@ }{}% \fi% % - % 1000,...,1999 and the 5. character is not number ("ezer...") + % 1000,...,1999 + % 5. unit: not digit + % "1000. sor" --> ezredik sor + % \ifhuaz@must@z@\else% \StrLen{#1}[\huaz@temp]% \setcounter{huaz@temp@count}{\huaz@temp}% \ifnum\value{huaz@temp@count}>3% \StrChar{#1}{1}[\huaz@temp]% \IfStrEq{\huaz@temp}{1}{% - \StrMid{#1}{2}{4}[\huaz@temp]% + \StrLeft{#1}{4}[\huaz@temp]% \IfInteger{\huaz@temp}{% \StrChar{#1}{5}[\huaz@temp]% \IfInteger{\huaz@temp}{}{\huaz@must@z@true}% @@ -332,14 +441,17 @@ \fi% \fi% % - % 1000000,...,1999999 and the 8. character is not number ("egymillió...") + % 1000000,...,1999999 + % 8. unit: not digit + % "1000000 ember" --> egymillió ember + % \ifhuaz@must@z@\else% \StrLen{#1}[\huaz@temp]% \setcounter{huaz@temp@count}{\huaz@temp}% \ifnum\value{huaz@temp@count}>6% \StrChar{#1}{1}[\huaz@temp]% \IfStrEq{\huaz@temp}{1}{% - \StrMid{#1}{2}{7}[\huaz@temp]% + \StrLeft{#1}{7}[\huaz@temp]% \IfInteger{\huaz@temp}{% \StrChar{#1}{8}[\huaz@temp]% \IfInteger{\huaz@temp}{}{\huaz@must@z@true}% @@ -348,14 +460,17 @@ \fi% \fi% % - % 1000000000,...,1999999999 and the 11. character is not number ("egymilliárd...") + % 1000000000,...,1999999999 + % 11. unit: not digit + % "1000000000 ember" --> egymilliárd ember + % \ifhuaz@must@z@\else% \StrLen{#1}[\huaz@temp]% \setcounter{huaz@temp@count}{\huaz@temp}% \ifnum\value{huaz@temp@count}>9% \StrChar{#1}{1}[\huaz@temp]% \IfStrEq{\huaz@temp}{1}{% - \StrMid{#1}{2}{10}[\huaz@temp]% + \StrLeft{#1}{10}[\huaz@temp]% \IfInteger{\huaz@temp}{% \StrChar{#1}{11}[\huaz@temp]% \IfInteger{\huaz@temp}{}{\huaz@must@z@true}% @@ -564,8 +679,8 @@ % %================================================= -\def\huaz@x@#1#{\huaz@citelist} -\def\huaz@cite{\huaz@x@\relax} +\def\huaz@cite@#1#{\huaz@citelist} +\def\huaz@cite{\huaz@cite@\relax} \def\huaz@citelist#1{\huaz@@citelist#1,\relax,} \def\huaz@@citelist#1,{\ifx#1\relax\else\@nameuse{huaz@bib@#1},\expandafter\huaz@@citelist\fi}% @@ -588,6 +703,7 @@ \def\bibcite#1#2{\global\@namedef{huaz@bib@#1}{\huaz@bibparam#2}\huaz@old@bibcite{#1}{#2}} % \@ifpackageloaded{biblatex}{ + \settoggle{blx@labelalpha}{true} \def\huaz@biblatexlabel{} \ifx\blx@opt@eldt@style\@empty\ifx\blx@opt@eldt@citestyle\@empty\def\huaz@biblatexlabel{\strfield{labelnumber}}\fi\fi \def\huaz@temp{numeric} @@ -603,12 +719,44 @@ \ifx\blx@opt@eldt@style\huaz@temp\def\huaz@biblatexlabel{\strfield{labelalpha}}\fi \ifx\blx@opt@eldt@citestyle\huaz@temp\def\huaz@biblatexlabel{\strfield{labelalpha}}\fi \def\huaz@temp{authoryear} - \ifx\blx@opt@eldt@style\huaz@temp\settoggle{blx@labelalpha}{true}\def\huaz@biblatexlabel{\strfield{labelalpha}}\fi - \ifx\blx@opt@eldt@citestyle\huaz@temp\settoggle{blx@labelalpha}{true}\def\huaz@biblatexlabel{\strfield{labelalpha}}\fi + \ifx\blx@opt@eldt@style\huaz@temp\def\huaz@biblatexlabel{\strfield{labelalpha}}\fi + \ifx\blx@opt@eldt@citestyle\huaz@temp\def\huaz@biblatexlabel{\strfield{labelalpha}}\fi \ifx\huaz@biblatexlabel\@empty\else \AtEveryBibitem{\protected@write\@auxout{}{\string\global\string\@namedef{huaz@bib@\strfield{entrykey}}{\huaz@biblatexlabel}}} \fi}{}} +%================================================= +% +% \huaz@citeauthor +% +%================================================= + +\def\huaz@citeauthor@#1#{\huaz@citeauthorlist} +\def\huaz@citeauthor{\huaz@citeauthor@\relax} +\def\huaz@citeauthorlist#1{\huaz@@citeauthorlist#1,\relax,} +\def\huaz@@citeauthorlist#1,{\ifx#1\relax\else\@nameuse{huaz@bibalpha@#1},\expandafter\huaz@@citeauthorlist\fi} + +\AddToHook{begindocument/before}{ + \@ifpackageloaded{biblatex}{ + \AtEveryBibitem{\protected@write\@auxout{}{\string\global\string\@namedef{huaz@bibalpha@\strfield{entrykey}}{\strfield{labelalpha}}}} + }{}} + +%================================================= +% +% \huaz@citeyear +% +%================================================= + +\def\huaz@citeyear@#1#{\huaz@citeyearlist} +\def\huaz@citeyear{\huaz@citeyear@\relax} +\def\huaz@citeyearlist#1{\huaz@@citeyearlist#1,\relax,} +\def\huaz@@citeyearlist#1,{\ifx#1\relax\else\@nameuse{huaz@bibyear@#1},\expandafter\huaz@@citeyearlist\fi} + +\AddToHook{begindocument/before}{ + \@ifpackageloaded{biblatex}{ + \AtEveryBibitem{\protected@write\@auxout{}{\string\global\string\@namedef{huaz@bibyear@\strfield{entrykey}}{\strfield{year}}}} + }{}} + %================================================= % % end -- cgit v1.2.3