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

How to write a tensor?

1,029 views
Skip to first unread message

Seak, Teng-Fong

unread,
Nov 26, 1999, 3:00:00 AM11/26/99
to
Does anyone of you know how to write a tensor in latex? I just know how

to put the double arrow on top of a variable, say T, in this way:

\stackrel{\Rightarrow}{T}

but I don't think this is the correct method. If the variable is more
than one character, the arrow's length isn't adjusted, eg

\stackrel{\Rightarrow}{T_{i,n}}

Actually, I would expect something similar to writing a vector, ie

\overrightarrow{T_{i,n}}

but I don't know the magic word to replace "overrightarrow" :-)

Thanks in advance.

Seak


James Kilfiger

unread,
Nov 26, 1999, 3:00:00 AM11/26/99
to
Seak, Teng-Fong wrote:
>Does anyone of you know how to write a tensor in latex? I just know how
>to put the double arrow on top of a variable, say T, in this way:
>\stackrel{\Rightarrow}{T}

I'm sure someone has done this and put it in a package somewhere.
but you can define a macro in a personal style file (ie save this as
overRightarrow.sty, and load it with usepackage.)

\newcommand\reldoublebar{\mathrel{\smash=}}
\newcommand{\Rightarrowfill@}[1]{%
\m@th \setboxz@h {$#1\reldoublebar$}\ht \z@ \z@
$#1\copy\z@
\mkern -6mu
\cleaders\hbox{$#1\mkern -2mu\box \z@ \mkern -2mu$}\hfill
\mkern -6mu
\mathord \Rightarrow $}
\newcommand{\overRightarrow}{\mathpalette{\overarrow@\Rightarrowfill@}}


You use the command \overRightarrow{T(p,q,r)}

James

Seak, Teng-Fong

unread,
Dec 5, 1999, 3:00:00 AM12/5/99
to
James Kilfiger wrote:

OK, thanks a lot. It works :-)

Actually, I later on found out that there're rightarrow and Rightarrow,

longrightarrow and Longrightarrow, and similar words for left arrows.
Capitalized words means double arrows. By extrapolation, I tried
Overrightarrow but it didn't work. What a shame :-(

I'm wondering how latex is standardized nowadays. It would be very
natural to have Overrightarrow as a standard without users redefining
their own macros. I'm using tetex distribution. Or is this already in
latex but not yet in tetex?


Timothy Murphy

unread,
Dec 6, 1999, 3:00:00 AM12/6/99
to
"Seak, Teng-Fong" <seak.te...@iname.com> writes:

> I'm wondering how latex is standardized nowadays. It would be very
>natural to have Overrightarrow as a standard without users redefining
>their own macros. I'm using tetex distribution. Or is this already in
>latex but not yet in tetex?

This is more-or-less an oxymoron, as teTeX includes LaTeX.

There are thousands of LaTeX packages,
many of which are not included in teTeX or any TeX distribution.

In your case, the obvious package would be amsmath
(which is in teTeX and every TeX distribution).
You can find documentation for this (and other packages)
by "netscape .../texmf/doc/".

I'm not quite sure exactly what you are trying to do,
but it might be worth looking at the @>>> command in amsmath.

--
Timothy Murphy
e-mail: t...@maths.tcd.ie
tel: +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

James Kilfiger

unread,
Dec 6, 1999, 3:00:00 AM12/6/99
to
> I'm wondering how latex is standardized nowadays.
There is a standard kernal, a colletion of standard classes,
and a colletion of standard packages, together with lots of
not so standard packages, tetex has all the standard stuff and
quite a lot of the non-standard. Everything else can be found at CTAN
(except the overrightarrow style, but expect it to be in a the fragments
directory soon!)

James

dasovi 16

unread,
Mar 9, 2022, 6:57:18 PM3/9/22
to
El viernes, 26 de noviembre de 1999 a las 9:00:00 UTC+1, Seak, Teng-Fong escribió:
> Does anyone of you know how to write a tensor in latex? I just know how
> to put the double arrow on top of a variable, say T, in this way:
> \stackrel{\Rightarrow}{T}
> but I don't think this is the correct method. If the variable is more
> than one character, the arrow's length isn't adjusted, eg
> \stackrel{\Rightarrow}{T_{i,n}}
> Actually, I would expect something similar to writing a vector, ie
> \overrightarrow{T_{i,n}}
> but I don't know the magic word to replace "overrightarrow" :-)
> Thanks in advance.
> Seak

Hi Seak,
A way to do it is by using the vector twice ,for instance, \vec{\vec{T}}. Not the more stylish way, but simple and effective.
I see you proposed other ways, but for me this was simpler, hope it helps.
Best regards,
David.

balf

unread,
Mar 11, 2022, 3:10:40 PM3/11/22
to
You also have the `esvect` package and its \vv command. Furthermore, you can choose between 8 different arrow tips.
Best regards to all,
Bernard
0 new messages