I want to detect an order placed at the beginning of each theorem.

\LaTeX{} There is the LaTeX command at the beginning of the theorem.\\
Returns the result as True
There is no LaTeX command at the beginning of the theorem environment
\LaTeX{} \\
Returns the result as False


  • 1
    Welcome to TeX.SE! What do you mean with "detect an order"? Number the theorems? – CarLaTeX May 27 at 5:04
  • 1
    please state what output you want from the supplied document. – David Carlisle May 27 at 7:48
  • I intend to write an image insert command. If in the theorem (Exam) environment meets this command at the first position, the command will be assigned option 1. But if in the theorem (Exam) environment this command does not appear or is not in the first position then the command This will be assigned option 2. Same as immediately after \begin{ex}\@ifnextchar\LaTeX{option 1}{option 2} – Anh Tuấn Trần May 27 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.