[texhax] use of " in LaTeX

Nikolas Arend Nikolas.Arend at gmx.net
Wed Jul 19 21:17:49 CEST 2006


Alex Scorpan wrote:
>> or define a new command such as
>>
>> \newcommand{\inchsign}{^{\prime\prime}}
>>     
>
>   
>> and use it like $123\inchsign$ to spare a bit of typing.
>>     
>
> Or
> 	\newcommand\inchsign{\ensuremath{''}}
> and use it like
> 	It's 123\inchsign\ long!
> to save you from even more typing (no $'s required).
>
> Or, to get rid of the space "\ ", do
> 	\usepackage{xspace}
> 	\newcommand\inchsign{\ensuremath{''}\xspace}
> and use it like
> 	It's 123\inchsign long.
> (\xspace is smart enough to add a space when needed, but not add one  
> if the next character is a punctuation mark.)
>   

Besides the fact that using \ensuremath might have even other 
advantages, the amount of typing seems to depend more on how he labels 
the command ;-)
Using additional packages seems a bit overkill just for one small new 
command (or a "\ " less).
But anyway, all version will get him there and your're right, less 
typing is always a good thing.

Best,   Nick.



More information about the texhax mailing list