TeX/endinput

< TeX

Synopsis

   \endinput

Description

Example

  \def\false{false}
  \def\students{false}
  
  % Questions, for teachers and students ...
  
  \ifx\students\true\endinput\fi
  
  % Answers, for teacher only

If the \if statement cannot be a oneliner (for legibility reasons, say), then one can use \expandafter:

  \ifx\students\true
       % ... various other statements ...
       \expandafter\endinput
  \fi
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.