TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a convention for marking the beginning of LaTeX-based material placed inside the comments of (say) a C++ or Python program? Or does one simply jump into LaTeX syntax?

share|improve this question
\begin{latex} :-) – Andrey Vihrov Sep 27 '11 at 10:44
In python, you can use sphinx for documentation, which uses .. math:: for equations by default. – eudoxos Sep 27 '11 at 15:20

In doxygen the convention is to explain TeX environments with \f.

As doxygen documentation goes in comments, you might call this convention for comments, though it is more convention for in-code documentation.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.