Hi Florent, >>>>> Florent Rougon <f.rou...@free.fr> writes: > I took the two files posted by Arash. After line 47 of dtx-test.dtx:
> % \end{macrocode} > I inserted this: > % Test: > % \begin{equation} > %% > %% comment about the following equality > %% > % x^{2}+y^{2} = z^{2} > % \end{equation} > When I compile this modified .dtx file with pdflatex (see the attached > file), I get: > ! Missing $ inserted. > <inserted text> > $ > l.50 %% > ? > Line 50 is the one following the above \begin{equation}. So, it seems to > me that the '%%' (line 50) became a blank line when producing the > documentation, which triggered the expected error since it was > encountered in math mode. Do you experience otherwise? Ah, thank you very much. It helped me a lot. I didn't notice that the line \DocInput{dtx-test.dtx} specifies the self file name and tested my modified file under another file name! How stupid I am. Now I realize that my example is invalid in docTeX document, I'll commit a fix for texmathp.el incorporating Arash's suggestion unless someone else objects. Regards, Ikumi Keita