Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ! Missing } inserted.
- <inserted text>
- }
- l.47 Test $Id$
- , $Id{A}$ and $Id{A,B}$ inline.
- documentclass{article}
- usepackage{amsmath}
- usepackage{xparse} % loads expl3
- %See interface3.pdf
- ExplSyntaxOn
- NewDocumentCommand Id {O{}}
- {
- Id:n #1
- }
- cs_new:Npn Id:n #1
- {
- clist_set:Nn l_tmpa_clist {#1}
- int_case:nn
- {clist_count:N l_tmpa_clist}
- {
- {0}
- {
- mathop{Id}
- }
- {1}
- {
- mathop{Id}_{#1}
- }
- {2}
- {
- mathop{Id}
- ^{clist_item:Nn l_tmpa_clist 1}
- _{clist_item:Nn l_tmpa_clist 2}
- }
- }
- {
- msg_error:nn {shmuel} {More than one argument for {backslash}Id}
- }
- }
- begin{document}
- ExplSyntaxOn
- Test $Id$, $Id{A}$ and $Id{A,B}$ inline.
- begin{equation}
- Test Id, \
- Id{A}, \
- Id{A,B}
- end{equation}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement