summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/expl3/test1.tex
blob: e419bdb37aad89fd4567bd622d6bf052593d8285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

\documentclass{article}


\usepackage{l3expan,l3io}

\begin{document}

\CodeStart


\def_new:Npn\test_cmd:nn#1#2{
  \iow_unexpanded_term:n{}
  \iow_unexpanded_term:n{Argument~1:~#1}
  \iow_unexpanded_term:n{Argument~2:~#2}}

    

\def:Npn\a{A}
\def:Npn\b{B}

\def:Npn\aa{\a}
\def:Npn\bb{\b}

\exp_def_form:nnn {test_cmd}{nn}{oo}
\exp_def_form:nnn {test_cmd}{nn}{xx}
\exp_def_form:nnn {test_cmd}{nn}{cc}
\exp_def_form:nnn {test_cmd}{nn}{nx}

\test_cmd:nn{a}{b}

\test_cmd:nn{\a}{\b}

\test_cmd:oo\aa\bb

\test_cmd:xx\aa\bb

\test_cmd:cc{a}{b}

\test_cmd:nx{a}{\b}

\CodeStop

\LaTeX\ still works!

\end{document}