TransWikia.com

Double sided arrow notation for second-order tensors

TeX - LaTeX Asked by Kostrahb on July 28, 2021

How may I define mytensor to look just like double sided arrow from vec?

I have tried overset{text{tiny$leftrightarrow$}}{#1} as described here but it isn’t exactly what I want (at least with default amsmath). It would suffice in worst case scenario but it would be better to have uniform style in my bachelor thesis.

Also I have found that I can change font via package unicode-math and get what I want (with leftrightarrow) but as I’m not using XeLaTeX nor LuaLaTex that doesn’t work either. Would it be possible to use that font without using XeLaTeX and LuaLaTex?

2 Answers

You might use the old-arrows package that provides arrows with smaller tips. However, using the package would change all arrows in the document, which is possibly not desired, so we can fetch just the necessary bits:

documentclass{article}
usepackage{amsmath}

DeclareFontFamily{OMS}{oasy}{skewcharfont48 }
DeclareFontShape{OMS}{oasy}{m}{n}{%
         <-5.5> oasy5     <5.5-6.5> oasy6
      <6.5-7.5> oasy7     <7.5-8.5> oasy8
      <8.5-9.5> oasy9     <9.5->  oasy10
      }{}
DeclareFontShape{OMS}{oasy}{b}{n}{%
       <-6> oabsy5
      <6-8> oabsy7
      <8->  oabsy10
      }{}
DeclareSymbolFont{oasy}{OMS}{oasy}{m}{n}
SetSymbolFont{oasy}{bold}{OMS}{oasy}{b}{n}

DeclareMathSymbol{smallleftarrow}     {mathrel}{oasy}{"20}
DeclareMathSymbol{smallrightarrow}    {mathrel}{oasy}{"21}
DeclareMathSymbol{smallleftrightarrow}{mathrel}{oasy}{"24}

newcommand{tensor}[1]{overset{scriptscriptstylesmallleftrightarrow}{#1}}

begin{document}
$tensor{x}$                                                
end{document}

The definitions for smallrightarrow and smallleftarrow are not required, but they make no harm.

enter image description here

Correct answer by egreg on July 28, 2021

Use stackrel{leftrightarrow}{x}

image

Answered by Archisman Panigrahi on July 28, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP