Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

unary vs binary operators (LaTeX)

425 views
Skip to first unread message

David Rosoff

unread,
Jun 10, 2003, 2:09:29 AM6/10/03
to
Hi,

I would like to know whether one can force the binary operator \ast
(asterisk character) to act as a unary operator throughout a document, or
alternatively, whether one can force the spacing to be the same either way
it is used.

(Context: I'm writing about the Hodge star operator, which is a unary
operator, but frequently it is iterated. LaTeX seems to be parsing it as a
unary operator in the context $\ast \omega$, and binary in the context
$\ast \ast \omega$ or even $\omega + \ast \omega$.)

Thanks in advance,

-dave


Maurizio Loreti

unread,
Jun 10, 2003, 3:18:38 AM6/10/03
to
David Rosoff <ros...@math.washington.edu> writes:

> I would like to know whether one can force the binary operator \ast
> (asterisk character) to act as a unary operator

\mathord

--
Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html
Dept. of Physics, Univ. of Padova, Italy ROT13: ybe...@cq.vasa.vg

Donald Arseneau

unread,
Jun 10, 2003, 3:35:12 PM6/10/03
to
David Rosoff <ros...@math.washington.edu> writes:

> I would like to know whether one can force the binary operator \ast
> (asterisk character) to act as a unary operator throughout a document, or

Just \ast or * also?

\DeclareMathSymbol{*}{\mathop}{symbols}{"03} % \ast
\DeclareMathSymbol{\ast}{\mathop}{symbols}{"03}

Donald Arseneau as...@triumf.ca

Dan Luecking

unread,
Jun 10, 2003, 3:49:16 PM6/10/03
to
On 10 Jun 2003 09:18:38 +0200, Maurizio Loreti <m...@foobar.it> wrote:

>David Rosoff <ros...@math.washington.edu> writes:
>
>> I would like to know whether one can force the binary operator \ast
>> (asterisk character) to act as a unary operator
>
>\mathord

I believe Mr Loreti means \renewcommand{\ast}{\mathord{*}},
which will use precisely the symbol that * alone uses, but
convert it to an ordinary symbol. In some contexts
\mathop{*}\nolimits
might be preferred.


Dan

--
Dan Luecking Department of Mathematical Sciences
University of Arkansas Fayetteville, Arkansas 72701
luecking at uark dot edu

Maurizio Loreti

unread,
Jun 11, 2003, 1:22:40 AM6/11/03
to
Dan Luecking <luec...@uark.edu> writes:

> On 10 Jun 2003 09:18:38 +0200, Maurizio Loreti <m...@foobar.it> wrote:
>
> >David Rosoff <ros...@math.washington.edu> writes:
> >
> >> I would like to know whether one can force the binary operator \ast
> >> (asterisk character) to act as a unary operator
> >
> >\mathord
>
> I believe Mr Loreti means \renewcommand{\ast}{\mathord{*}},

Well, no :-0

My suggestion (a little bit too short, I realize) was not to redefine
the original command (\ast may be needed as a true binary operator
elsewhere) but to define a new one or to use a straight \mathord{\ast}
in the text. BTW, I am not so sure that * and \ast are required to
generate the same character for every available font; use
\mathord{\ast} and not \mathord{*}.

David Rosoff

unread,
Jun 11, 2003, 5:32:32 AM6/11/03
to
On 11 Jun 2003, Maurizio Loreti wrote:

> Dan Luecking <luec...@uark.edu> writes:
>
> > On 10 Jun 2003 09:18:38 +0200, Maurizio Loreti <m...@foobar.it> wrote:
> >
> > >David Rosoff <ros...@math.washington.edu> writes:
> > >
> > >> I would like to know whether one can force the binary operator \ast
> > >> (asterisk character) to act as a unary operator
> > >
> > >\mathord
> >
> > I believe Mr Loreti means \renewcommand{\ast}{\mathord{*}},
>
> Well, no :-0
>
> My suggestion (a little bit too short, I realize) was not to redefine
> the original command (\ast may be needed as a true binary operator
> elsewhere) but to define a new one or to use a straight \mathord{\ast}
> in the text. BTW, I am not so sure that * and \ast are required to
> generate the same character for every available font; use
> \mathord{\ast} and not \mathord{*}.

Thanks for the tips, works great. I would rather have not used this
operator at all: what a lousy choice for a unary operator!

Cheers,

-dave


Dan Luecking

unread,
Jun 11, 2003, 1:29:50 PM6/11/03
to
On 11 Jun 2003 07:22:40 +0200, Maurizio Loreti <m...@foobar.it> wrote:

>Dan Luecking <luec...@uark.edu> writes:
>
>> On 10 Jun 2003 09:18:38 +0200, Maurizio Loreti <m...@foobar.it> wrote:
>>
>> >\mathord
>>
>> I believe Mr Loreti means \renewcommand{\ast}{\mathord{*}},
>
>Well, no :-0
>
>My suggestion (a little bit too short, I realize) was not to redefine
>the original command (\ast may be needed as a true binary operator
>elsewhere) but to define a new one or to use a straight \mathord{\ast}
>in the text. BTW, I am not so sure that * and \ast are required to
>generate the same character for every available font; use
>\mathord{\ast} and not \mathord{*}.

As I said in the snipped part, one is guaranteed that \mathord{*}
will produce the same character as * alone (so of course if *
is not correct, don't use it!).

Also, the original poster asked that \ast have certain behavior and
so one has to redefine \ast for this to happen.

0 new messages