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.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThe 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}
\overleftrightarrow
\overleftrightarrow
seems to be the macro that's used in the text -- just in a different font\documentclass{article} \usepackage{amsmath,amssymb} \begin{document} $\boldsymbol{\mathsf{T}}$ \end{document}