How to write tensor or leftright double vector notation

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

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

• Maybe \overleftrightarrow Commented Jul 7, 2020 at 3:05
• This may be relevant: tex.stackexchange.com/q/162337/218142. "Double headed" vector. Commented Jul 7, 2020 at 3:41
• This post may be interesting: tex.stackexchange.com/a/479765/201158 Commented Jul 7, 2020 at 4:05
• \overleftrightarrow seems to be the macro that's used in the text -- just in a different font Commented Jul 7, 2020 at 4:32
• @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} Commented Jul 7, 2020 at 12:15

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

The main idea is from https://tex.stackexchange.com/a/479765/201158

\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}