diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/l3kernel/l3legacy.dtx |
Initial commit
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3legacy.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3legacy.dtx | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/macros/latex/contrib/l3kernel/l3legacy.dtx b/macros/latex/contrib/l3kernel/l3legacy.dtx new file mode 100644 index 0000000000..90ca8c5d0e --- /dev/null +++ b/macros/latex/contrib/l3kernel/l3legacy.dtx @@ -0,0 +1,100 @@ +% \iffalse meta-comment +% +%% File: l3legacy.dtx +% +% Copyright (C) 2019 The LaTeX3 Project +% +% It may be distributed and/or modified under the conditions of the +% LaTeX Project Public License (LPPL), either version 1.3c of this +% license or (at your option) any later version. The latest version +% of this license is in the file +% +% https://www.latex-project.org/lppl.txt +% +% This file is part of the "l3kernel bundle" (The Work in LPPL) +% and all files in that bundle must be distributed together. +% +% ----------------------------------------------------------------------- +% +% The development version of the bundle can be found at +% +% https://github.com/latex3/latex3 +% +% for those people who are interested. +% +%<*driver> +\documentclass[full,kernel]{l3doc} +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +%</driver> +% \fi +% +% \title{^^A +% The \textsf{l3legacy} package\\ Interfaces to legacy concepts^^A +% } +% +% \author{^^A +% The \LaTeX3 Project\thanks +% {^^A +% E-mail: +% \href{mailto:latex-team@latex-project.org} +% {latex-team@latex-project.org}^^A +% }^^A +% } +% +% \date{Released 2019-08-25} +% +% \maketitle +% +% \begin{documentation} +% +% There are a small number of \TeX{} or \LaTeXe{} concepts which are not used +% in \pkg{expl3} code but which need to be manipulated when working as a \LaTeXe{} +% package. To allow these to be integrated cleanly into \pkg{expl3} code, a set +% of legacy interfaces are provided here. +% +% \begin{function}[EXP,pTF]{\legacy_if:n} +% \begin{syntax} +% \cs{legacy_if:nTF} \Arg{name} \Arg{true code} \Arg{false code} +% \end{syntax} +% Tests if the \LaTeXe{}/plain \TeX{} conditional (generated by \tn{newif}) +% if \texttt{true} or \texttt{false} and branches accordingly. The +% \meta{name} of the conditional should \emph{omit} the leading \texttt{if}. +% \end{function} +% +% \end{documentation} +% +% \begin{implementation} +% +% \section{\pkg{l3legacy} Implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macrocode} +%<@@=legacy> +% \end{macrocode} +% +% \begin{macro}[EXP,pTF]{\legacy_if:n} +% A friendly wrapper. +% \begin{macrocode} +\prg_new_conditional:Npnn \legacy_if:n #1 { p , T , F , TF } + { + \exp_args:Nc \if_meaning:w { if#1 } \iftrue + \prg_return_true: + \else: + \prg_return_false: + \fi: + } +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%</package> +% \end{macrocode} +% +% \end{implementation} +% +% \PrintIndex |