-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
which are drop-in replacements for expl3 functions Signed-off-by: muzimuzhi <[email protected]>
- Loading branch information
Showing
3 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
% Copyright 2022 by Yukai Chou | ||
% | ||
% This file may be distributed and/or modified | ||
% | ||
% 1. under the LaTeX Project Public License and/or | ||
% 2. under the GNU Public License. | ||
% | ||
% See the file doc/generic/pgf/licenses/LICENSE for more details. | ||
|
||
% | ||
% This file provides utility commands that are drop-in replacements | ||
% for expl3 macros. | ||
% | ||
% Naming conventions: | ||
% pgf_cs = "pgfexpl@" + expl3_cs.replace("_", "@").replace(":", "@@") | ||
% For example, | ||
% expl3_cs: \exp_args:Ne, \tl_put_right:Nn | ||
% pgf_cs: \pgfexpl@exp@args@@Ne, \pgfexpl@tl@put@right@@Nn | ||
|
||
|
||
% | ||
% l3basics package | ||
% | ||
|
||
% \cs_meaning:c | ||
\long\def\pgfexpl@cs@meaning@@c#1{% | ||
\ifcsname #1\endcsname | ||
\expandafter\pgfutil@firstoftwo | ||
\else | ||
\expandafter\pgfutil@secondoftwo | ||
\fi | ||
{\pgfexpl@exp@args@@Nc\meaning{#1}} | ||
{\detokenize{undefined}}% | ||
} | ||
|
||
% | ||
% l3tl package | ||
% | ||
|
||
% \tl_if_eq:NNTF | ||
\long\def\pgfexpl@tl@if@eq@@NNTF#1#2{% | ||
\ifx#1#2\pgfexpl@@@prg@TF@true@@w\fi\pgfutil@secondoftwo | ||
} | ||
|
||
% \tl_if_eq:ccTF | ||
\long\def\pgfexpl@tl@if@eq@@ccTF{% | ||
\pgfexpl@exp@args@@Ncc\pgfexpl@tl@if@eq@@NNTF | ||
} | ||
|
||
% \__prg_TF_true:w | ||
\long\def\pgfexpl@@@prg@TF@true@@w\fi\pgfutil@secondoftwo{% | ||
\fi\pgfutil@firstoftwo | ||
} | ||
|
||
|
||
% | ||
% l3expan package | ||
% | ||
|
||
% \exp_args:Nc | ||
\long\def\pgfexpl@exp@args@@Nc#1#2{% | ||
\expandafter#1\csname #2\endcsname | ||
} | ||
|
||
% \exp_args:No | ||
\long\def\pgfexpl@exp@args@@No#1#2{% | ||
\expandafter#1\expandafter{#2}% | ||
} | ||
|
||
% \exp_args:Ne | ||
\long\def\pgfexpl@exp@args@@Ne#1#2{% | ||
\expandafter#1\expanded{{#2}}% | ||
} | ||
|
||
% \exp_args:Ncc | ||
\long\def\pgfexpl@exp@args@@Ncc#1#2#3{% | ||
\expandafter#1\csname #2\expandafter\endcsname\csname #3\endcsname | ||
} | ||
|
||
\endinput |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -919,5 +919,6 @@ | |
\endgroup | ||
}% | ||
\input pgfutil-common-lists.tex | ||
\input pgfutil-common-expl.tex | ||
|
||
\endinput |