[comp.text.tex] can't get \ in a \special

jaffe@hoss.unl.edu (David Jaffe) (03/16/91)

How do I get a backslash to be outputted as part of a special?  The only
thing I can come up with is to change catcodes before the special, which
is not an entirely satisfactory solution.  I want the string (f\(x\)) to
be outputted, which postscript will subsequently convert into the string
f(x).

\special{   ...     (f\(x\))    ...   }

obviously won't work.

David Jaffe (jaffe@hoss.unl.edu)
University of Nebraska -- Lincoln

krab@iesd.auc.dk (Kresten Krab Thorup) (03/16/91)

>>>>> On 15 Mar 91 21:14:18 GMT, jaffe@hoss.unl.edu (David Jaffe) said:

|> How do I get a backslash to be outputted as part of a special?  The only
|> thing I can come up with is to change catcodes before the special, which
|> is not an entirely satisfactory solution.  I want the string (f\(x\)) to
|> be outputted, which postscript will subsequently convert into the string
|> f(x).

|> \special{   ...     (f\(x\))    ...   }

|> obviously won't work.

No... you must use the \string command; like:

\special{   ...     (f\string\( x\string\) )    ...   }

read in the TeX book pages 40, 213-214, 215.

|> David Jaffe (jaffe@hoss.unl.edu)
|> University of Nebraska -- Lincoln

/Kresten
--


			        /  |__  __/   |  /
			       /_/_|   / ___/   |
			    _____/  __/ __/__/__|
				     ____/

			LaTeX's not crap --- that's me