[OS X TeX] tabular newbie question

Samuel Lelievre samuel.lelievre at univ-rennes1.fr
Sun Nov 28 22:12:33 CET 2004


>Le 28 nov. 04, à 19:28, Hendrik Chaltin a écrit :
>
>>On 28 Nov 2004, at 19:34, Samuel Lelievre wrote:
>>
>>>  You can tell TeX to treat a special character as normal by using
>>>the command \string.
>>
>>I use \_ (e.g. sv\_gravity).
>>
>>If I write sv\string_gravity,
>>I get a single dot as an exponent after "sv".
>>
>>Is a package responsable for that?
>>
>>HC
>
>What happens is that whan you type \string_ you 
>ask TeX for the character at position 95 (I 
>think) in the current font. Which in computer 
>roman is a small dot as an exponent...

Oops... seems I suggested a "solution" without testing it.
As a coincidence I had had the same problem with _ the other day,
and using \string did work. The difference is that it was inside
a \texttt{} argument; so it was another font that was called.

Indeed, I just tried the following short piece of LaTeX:

   \documentclass{article}
   \begin{document}

   sv\string_gravity

   \texttt{sv\string_gravity}

   \end{document}

and saw the "superscript dot" (or is it a "dot accent"?).

I often use \string to escape characters such as backslash, braces,
etc., but for some reason nearly always inside a \texttt{} argument.
I never guessed this would lead to messy output ouside \texttt{}.
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list