2

I want to to ask how I can type this matrix, especially that ^ over alphabetic characters.

enter image description here

I have something like this:

\begin{eqnarray}
    \begin{pmatrix}
        a+b & \overset{}{\epsilon + \omega} &  \overset{}{\pi} \\
        \vec{a} & \overleftrightarrow{AC} & \beta
    \end{pmatrix}
 \end{eqnarray}
Au101
  • 10,278
Oggy
  • 35

3 Answers3

1

One way to produce the really-wide hat symbol is to employ the mtpro2 package. Note that the full mtpro2 package is not free of charge. However, its lite subset -- which is all that's needed to produce the screenshot of interest, is in fact free of charge.

enter image description here

\documentclass{article} 
\usepackage{amsmath} % for 'pmatrix' env.
\usepackage{times}        % Times Roman text font
\usepackage[lite]{mtpro2} % Times Roman math font
\begin{document}
\begin{equation}
  \begin{pmatrix}
    a+b     & \widehat{\xi + \omega}  & \hat{\pi} \\
    \vec{a} & \overleftrightarrow{AC} & \beta
  \end{pmatrix}
\end{equation}
\end{document}
Mico
  • 506,678
1

With the default fonts, you have two possibilities for the widehat: either the extensible character \widehat from yhmath or the character of the same name in mathabx. I don't load here mathabx, but define the latter character as \varwidehat. I also suggest the old-arrows package so that \overleftrightarrow doesn't touch capital letters:

\documentclass[12pt, a4paper]{article}
\usepackage{amsmath}%
\usepackage{yhmath}
\usepackage{old-arrows}

\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
      <5> <6> <7> <8> <9> <10>
      <10.95> <12> <14.4> <17.28> <20.74> <24.88>
      mathx10
      }{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\DeclareMathAccent{\varwidebar}{0}{mathx}{"73}
\DeclareMathAccent{\varwidehat}{0}{mathx}{"70}

\begin{document}

\[ \begin{pmatrix}
    a+b & \widehat{\xi + \omega} & \overset{}{\pi} \\
    \vec{a} & \overleftrightarrow{AC} & \beta
\end{pmatrix}\qquad \begin{pmatrix}
    a+b & \varwidehat{\xi + \omega} & \overset{}{\pi} \\
    \vec{a} & \overleftrightarrow{AC} & \beta
\end{pmatrix}\]%

\end{document}

enter image description here

Bernard
  • 271,350
1

FWIW, in ConTeXt with \widehat always expands to the width of it's argument. So, simply using \widehat{ξ + ω} works.

\definemathmatrix[pmatrix][matrix:parentheses][simplecommand=pmatrix]
\starttext
\startformula
  \pmatrix{ a + b, \widehat{ξ + ω}, \hat π;
           \vec a, \overleftrightarrow{AC}, β}
\stopformula
\stoptext

which gives

enter image description here

Aditya
  • 62,301