Math & ScienceRenew Shortcut for in-line Math Environment

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

Renew Shortcut for in-line Math Environment

Post by Willie »

Hello. I want to use LaTeX's shortcut \( \) for math environment rather than TeX's $ because the output looks better... However, writing \( \) every time is annoying, and looks less clear in the source code.

My question - is there a way to override the $ shortcut, so that when typing it will actually start LaTeX's enviroment \( \) ?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Renew Shortcut for in-line Math Environment

Post by localghost »

Willie wrote:[…] I want to use LaTeX's shortcut \( \) for math environment rather than TeX's $ because the output looks better […]
Please show the mismatch clearly with a visual example along with the corresponding code. The only difference between those two is that the first one is fragile and the second one is robust. There should be no recognizable variation in their output.


Best regards and welcome to the board
Thorsten
Willie
Posts: 42
Joined: Sat Aug 27, 2011 3:43 am

Re: Renew Shortcut for in-line Math Environment

Post by Willie »

Ok. Maybe it is the same, I don't recognize a difference now but I thought I saw before.
anyway - what do you mean more robust? is there a preference to \( \)?
because $ is much more convenient...
and also - is what i asked to define possible theoretically?

thanks
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Renew Shortcut for in-line Math Environment

Post by localghost »

Willie wrote:[…] what do you mean more robust? is there a preference to \( \)? because $ is much more convenient […]
It's quite the other way round. The $…$ environment is preferable. And robust means that it can be used in moving arguments (e. g. of sectioning commands) without getting errors. As far as I know the fixltx2e package makes also \(…\) robust.
Post Reply