When I try to typeset $M\uparrow$ or $M\uparrow A$ in (LuaLa)TeX, I
get a good deal of extra spacing around $\uparrow$, which, for my
particular purpose, I would rather not have. I suspect it has to do
with the glyph type (?) associated with $\uparrow$, but I don't know
where to look to learn how and to what it should be changed to achieve
what I want. Could someone in the know please enlighten me?
Thanks,
Pouya
\newcommand\myuparrow{\mathord{\uparrow}}
now \myuparrow has the same spacing as a normal letter (i.e. none)
better use a more suitable name than \myuparrow (use one more
descriptive as to the use for this symbol)
--
/daleif (remove RTFSIGNATURE from email address)
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html
Thank you! Is there a place where I could find a table of the
different glyph types (or whatever they are called) in math-mode? (By
these I mean the likes of \mathop and \mathord.)
Thanks again,
Pouya
there are various sources, I usually use The LaTeX Companion, 2nd edition.
\mathord (ordinary symbol)
\mathop (operator; handle with care)
\mathbin (binary operation)
\mathrel (binary relation)
\mathpunct (punctuation symbol)
\mathopen (opening symbol)
\mathclose (closing symbol)
\mathinner (don't use it, if you don't know what it is)
There's the high level command \DeclareMathOperator from amsmath
that avoids some subtleties of \mathop.
Ciao
Enrico
Actually, it's from the package amsopn (which is loaded by amsmath).
The other way to remove space is to put braces around the symbol:
$M{\uparrow}A$ which has the same effect as $M\mathord{\uparrow}A$.
Consider the space around $=$ in $M=$ and $M=A$. These spaces
have the same source. The symbol in question is intended to be
a relation, and these spaces follow the rules for relations.
To determine what kind of symbol you have you can look in
fontmath.ltx and find (for \uparrow)
\DeclareMathDelimiter{\uparrow}
{\mathrel}{symbols}{"22}{largesymbols}{"78}
This indicates that it is intended to grow when used as
a delimiter with \left and \right. But when used alone
it is a relation (\mathrel) its smallest version is extracted
from the "symbols" font (default is cmsy) and its next larger
version is in the "largesymbols" font (default cmex).
Non-delimiters ar typically defined with \DeclareMathSymbol,
for example:
\DeclareMathSymbol{\star}{\mathbin}{letters}{"3F}
which means \star is a binary operator comming from
the "letters" font (default cmmi) in position 0x3F
If your \uparrow has a meaning other than a relation
(perhaps it is a binary operation for you?) you might
select a macro name that expresses the meaning of
this thing and write
\DeclareMathSymbol{\stepup}{\mathbin}{symbols}{"22}
Dan
To reply by email, change LookInSig to luecking
> Pouya D. Tafti wrote:
> > Hi,
> >
> > When I try to typeset $M\uparrow$ or $M\uparrow A$ in (LuaLa)TeX, I
> > get a good deal of extra spacing around $\uparrow$, which, for my
> > particular purpose, I would rather not have. I suspect it has to do
> > with the glyph type (?) associated with $\uparrow$, but I don't know
> > where to look to learn how and to what it should be changed to achieve
> > what I want. Could someone in the know please enlighten me?
> >
> > Thanks,
> > Pouya
>
> \newcommand\myuparrow{\mathord{\uparrow}}
>
> now \myuparrow has the same spacing as a normal letter (i.e. none)
The same effect can be achieved by using a subformula (curly braces in
math mode):
\newcommand\myuparrow{{\uparrow}}
--
Heiko Oberdiek
You can read the TeX Book or one of the online references (TeX by
Topic, TeX for the Impatient, etc.) for a full explanation. The short
answer is to surround the symbol with braces: $M{\uparrow}$.
Cheers,
Will
Pouya