Skip to main content
Changed obsolete functions to their present name
Source Link
egreg
  • 1.2m
  • 147
  • 2.8k
  • 4.5k

Just for future reference, expl3expl3 has nice switch/case statement constructs:

\prg_case_str\str_case:nnnnnF {\doctype} { {SomeString1} {some~ text~ here} {SomeString2} {some~ different~ text~ here} } {else~ clause} 

Variations are also provided with integers, dimensions, and token lists; e.g.,

\prg_case_int\int_case:nnnnnF{2*5}{ {5}{Small} {4+6}{Medium} {-2*10}{Negative} }{Other} 

Just for future reference, expl3 has nice switch/case statement constructs:

\prg_case_str:nnn {\doctype} { {SomeString1} {some~ text~ here} {SomeString2} {some~ different~ text~ here} } {else~ clause} 

Variations are also provided with integers, dimensions, and token lists; e.g.,

\prg_case_int:nnn{2*5}{ {5}{Small} {4+6}{Medium} {-2*10}{Negative} }{Other} 

Just for future reference, expl3 has nice switch/case statement constructs:

\str_case:nnF {\doctype} { {SomeString1} {some~ text~ here} {SomeString2} {some~ different~ text~ here} } {else~ clause} 

Variations are also provided with integers, dimensions, and token lists; e.g.,

\int_case:nnF{2*5}{ {5}{Small} {4+6}{Medium} {-2*10}{Negative} }{Other} 
Source Link
Will Robertson
  • 76.3k
  • 20
  • 186
  • 214

Just for future reference, expl3 has nice switch/case statement constructs:

\prg_case_str:nnn {\doctype} { {SomeString1} {some~ text~ here} {SomeString2} {some~ different~ text~ here} } {else~ clause} 

Variations are also provided with integers, dimensions, and token lists; e.g.,

\prg_case_int:nnn{2*5}{ {5}{Small} {4+6}{Medium} {-2*10}{Negative} }{Other}