Guest User

Untitled

a guest
Nov 22nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. newcommand{VariableList}{VariableOne,VariableTwo}
  2. newcommand{VariableOneSubOne}{SomeValueOne}
  3. newcommand{VariableOneSubTwo}{SomeOtherValueOne}
  4. newififVariableOneCondOne
  5. VariableOneCondOnetrue
  6. newcommand{VariableTwoSubOne}{SomeValueTwo}
  7. newcommand{VariableTwoSubTwo}{SomeOtherValueTwo}
  8. newififVariableTwoCondOne
  9. VariableTwoCondOnefalse
  10.  
  11. foreach n in VariableList{
  12. Here is some text with inputnum{n}{SubOne} and inputnum{n}{SubTwo}.
  13. }
  14.  
  15. newcommand{inputnum}[2]{expandaftercsname #1#2endcsname}
  16.  
  17. newcommand{inputcondnum}[2]{expandaftercsname if#1#2endcsname}
  18.  
  19. inputcondnum{n}{CondOne}
  20.  
  21. ifVariableOneCondOne
Add Comment
Please, Sign In to add comment