[OS X TeX] \(...\) vs $...$ for inline equations.

Jérôme Laurens jerome.laurens at u-bourgogne.fr
Fri Oct 1 02:11:43 EDT 2004


Le 30 sept. 04, à 16:00, Herb Schulz a écrit :

> On 9/30/04 5:37 AM, "Jérôme Laurens" <jerome.laurens at u-bourgogne.fr> 
> wrote:
>
>>>
>>> Howdy,
>>>
>>> I just took a look at the definitions of \( and \) in latex.ltx and
>>> they
>>> seem rather innocuous. Because the open/close of the equation is no
>>> longer
>>> symmetric \( checks to make sure you're not in math mode already 
>>> before
>>> issuing a $ and \) makes sure you are in math mode before issuing the
>>> $.
>>> Maybe there is something in the generation of the error message that
>>> isn't
>>> robust? When was that statement made? Maybe later versions of LaTeX2e
>>> became
>>> more robust; I seem to remember something like that happening as time
>>> went
>>> by.
>>>
>>
>> I should not rely on the latex.ltx definition as it is so easy to 
>> patch
>> a built in command.
>> So many packages just override built in commands to extend their
>> capabilities
>>
>
> Howdy,
>
> I'd guess tex4ht does something like that since the online 
> documentation (in
> a very poor state of affairs if you ask me) says it treats \(...\)
> differently from $...$. However, do you know of other packages that do
> similar things?

I once had to override the \( for a private use and it was very 
efficient,
that's all I know.

BTW, when doing such things I tried to patch the '$' character making 
it active.
I could not achieve my goals most certainly because of my ignorance.
Some TeXpert would certainly be successful in patching the '$' 
behaviour,
which means that '$' is not as safe as it is claimed as compared to 
'\('.
These are the drawbacks paid for the huge power of TeX.

We can see that there is no final answer to the question of using $ vs 
\(
Personally, I would recommand \( just because replacement is so easy 
from \( to $,
and can be automated by a frontend.

--------------------- 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 MacOSX-TeX mailing list