pjbk@cs.hw.ac.uk (Peter King) (03/04/91)
Have I discovered a bug in LaTeX?? It seems unlikely, but the following doesn't do as I would expect, in that the _ characters are NOT protected by the \verb, but the usual complaints about missing $ are produced. I have tried \protect on the \verb with no effect, and am now at a loss. Why is a \verb not a valid argument for \makebox ?? Peter ---Cut-Here----------- \documentstyle[]{article} \begin{document} \begin{figure} \setlength{\unitlength}{0.05in} \begin{picture}(110,100)(0,0) \put(15,10){\makebox(0,0){\verb+INFO_XFER_DCE_ERR+}} \end{picture} \caption{Finite State Machine}\label{fig.fsm.st} \end{figure} \end{document} Peter King, Computer Science Department JANET: pjbk@uk.ac.hw.cs Heriot-Watt University ARPA: pjbk@cs.hw.ac.uk 79 Grassmarket, Edinburgh EH1 2HJ or pjbk%cs.hw.ac.uk@ucl-cs Phone: (+44) 31 225 6465 Ext. 555 UUCP: ..!ukc!cs.hw.ac.uk!pjbk
ogawa@orion.arc.nasa.gov (Arthur Ogawa) (03/06/91)
In article <2435@odin.cs.hw.ac.uk> pjbk@cs.hw.ac.uk (Peter King) writes: |Have I discovered a bug in LaTeX?? [the test file is truncated to its essentials] | \put(15,10){\makebox(0,0){\verb+INFO_XFER_DCE_ERR+}} You have not discovered a bug in LaTeX. The \verb command does not work properly when used within the argument of another command (here compounded: \put and \makebox). See p66 of Lamport's book: "A verbatim environment or \verb command may not appear within an argument of any other command. (However, they may appear inside another environment.)" Michael Downes posted here within the last 48 hours a very nice solution to the problem of setting the underscore character within computer voice, (q.v.). BTW, you really _can_ put a \verb command in the argument of another command, but the argument of the \verb command had better not contain any specially catcoded characters! Cheers, Art