0

How would the double vector notation be written above the T?

enter image description here

I came across it in Griffith's E&M as shorthand for a tensor.

  • 1
    Maybe \overleftrightarrow – Symbol 1 Jul 07 '20 at 03:05
  • 1
    This may be relevant: https://tex.stackexchange.com/q/162337/218142. "Double headed" vector. – LaTeXereXeTaL Jul 07 '20 at 03:41
  • This post may be interesting: https://tex.stackexchange.com/a/479765/201158 – ZhiyuanLck Jul 07 '20 at 04:05
  • \overleftrightarrow seems to be the macro that's used in the text -- just in a different font – Evan Dodson Jul 07 '20 at 04:32
  • 1
    @EvanDodson I know that symbol and I use it too, but it's an old notation. Generally in the various books of classical electrodynamics the sans serif character as in MWE is used: \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} $\boldsymbol{\mathsf{T}}$ \end{document} – Sebastiano Jul 07 '20 at 12:15
  • @Sebastiano that looks much cleaner -- I'll probably start using that in my notes – Evan Dodson Jul 07 '20 at 15:53
  • @EvanDodson I'm always glad to help everyone. If you search this book, Introduction to Electrodynamics di David J. Griffiths probably there is my notation, always if I not make mistaken :-(. – Sebastiano Jul 07 '20 at 15:57

2 Answers2

2

$\overleftrightarrow T$ is what gives the closest result.

enter image description here

2

The main idea is from https://tex.stackexchange.com/a/479765/201158 enter image description here

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\makeatletter
\newlength\lrvec@height
\newlength\lrvec@width
\newif\iflrvec@same@height
\def\lrvec{\@ifstar\slrvec@\lrvec@}
\newcommand{\slrvec@}[2][.4ex]{
  \lrvec@same@heighttrue
  \mathpalette\lrvec@@{{#1}{#2}}
}
\newcommand{\lrvec@}[2][.4ex]{
  \lrvec@same@heightfalse
  \mathpalette\lrvec@@{{#1}{#2}}
}
\def\lrvec@@#1#2{\lrvec@@@#1#2}
\def\lrvec@@@#1#2#3{%
  \iflrvec@same@height
    \settoheight{\lrvec@height}{$\m@th#1 \mathbf{T}#3$}
  \else
    \settoheight{\lrvec@height}{$\m@th#1#3$}
  \fi
  \settowidth{\lrvec@width}{$\m@th#1#3$}
  \kern.08em
  \raisebox{#2}{\raisebox{\lrvec@height}{\rlap{%
    \kern-.05em
    \begin{tikzpicture}[<-> /.tip={To[width=.4em, length=.2em]}]
      \draw [<->] (-.05em,0)--(\lrvec@width+.05em,0);
    \end{tikzpicture}%
  }}}%
  #3
  \kern.08em
}
\makeatother

\begin{document} Overleftrightarrow: $\lrvec{\mathrm{T}}\lrvec{a}$

With same height: $\lrvec{\mathrm{T}}\lrvec{c}$

Above arrow sep: $\lrvec{a}\lrvec[1ex]{a}$

In script: $T_{\lrvec{a}}$

In display math:

[ \lrvec{a}\lrvec{\sum_{i=1}^{n} a^n} ] \end{document}

ZhiyuanLck
  • 4,516