[OS X TeX] Redefining a math symbol

Ross Moore ross.moore at mq.edu.au
Sat Apr 20 00:03:47 CEST 2013

Hi Jason, Peter, and others

On 20/04/2013, at 5:10, "Vamos, Peter" <P.Vamos at exeter.ac.uk> wrote:

> Jason,
> > But I was interested in learning whether there was a LaTeX command like \DeclareMathOperator, except for binary relations (and which wasn't restricted to only being used in the preamble).

What is the problem with the preamble restriction?
You define a macro, within the preamble, to do the kind of work that you want done, then use it within the body of your document source. This can certainly be done in TeX.

But you should not be fiddling with characters in your source, in non-standard ways. This will cause problems when you combine your work with others, for a collaborative effort, or in a journal publication. It is much better to define a macro that uses the characters unchanged, as a specialized pattern, that then is interpreted by a macro that is defined just once in your preamble.
My previous post showed how to do this. You (or your colleagues or journal production editor) can then tweak the macro expansion to suit their own circumstances, and have it apply to all instances in your LaTeX body. Changing the character, on the other hand, requires finding all instances and fixing these separately, or with a more complicated kind of macro.

> Or maybe a pointer to some source about how LaTeX is told to interpret symbols in math mode… I guess I need to return to the TeXbook.
> Look in the TeXbook p. 154, 170 etc or The LaTex Companion  (2nd ed) pages 435, 525 and the tables thereof. In case you don't have access to these I attach the tables. In LaTeX you can also use \DeclareMathSymbol
> <rant> The most frequently encountered annoyance in mathematical typesetting I find in manuscripts and even in printed publications is the incorrect use of the | symbol i.e. not knowing the difference between \vert (or typing |) and say  \mid.

Yes. One should not be thinking in terms of what the character is, but what it is used for.
Different usages dictate the amount of space between the specific character and the material that occurs on either side. This is best encoded within a macro, and it is the macro — named according to the usage — that should appear within the body source.
Hence using  \mid  as a delimiter, (say in set notation, or bra-ket binary forms) with | (or \vert ) have various other uses requiring it to be placed closer to surrounding characters.

> The second most objectionable howler is… well I better stop here, I am already OT. </rant>

Not too far.

> Peter

Hope this helps,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/macostex-archives/attachments/20130420/d17b044a/attachment.html>

More information about the macostex-archives mailing list