0

I want to add \widearcarrow (or same command) from kpfonts without using this package because I already used other font. I tried to use \usefont and \symbol command but I dont know how to use them. Thank for your help!

Using red box's symbol

1 Answers1

3

You already have all the data. Just put them together: the symbol should point to the first slot in the series and TeX will provide the one with the right width.

\documentclass{article}
\usepackage{amsmath}

\DeclareSymbolFont{kplargesymbols}{OMX}{jkp}{m}{n}
\DeclareMathAccent{\widearc}{\mathalpha}{kplargesymbols}{"86}
\DeclareMathAccent{\widearcarrow}{\mathalpha}{kplargesymbols}{"8C}

\begin{document}

$\widearcarrow{A}$
$\widearcarrow{AA}$
$\widearcarrow{AAA}$
$\widearcarrow{AAAA}$

$\widearc{A}$
$\widearc{AA}$
$\widearc{AAA}$
$\widearc{AAAA}$

\end{document}

enter image description here

egreg
  • 1,121,712
  • Can you tell me why you not declare fontencoding and fontsubstitution be like:

    \makeatletter \DeclareFontEncoding{LS2}{}{} \DeclareFontSubstitution{LS2}{stix}{m}{n} \DeclareSymbolFont{operators}{LS2}{stix}{m}{n} \DeclareMathSymbol{\sml} {\mathbin}{operators}{"EF} \makeatother

    – Kanegusa199 May 14 '17 at 15:15
  • @MinhHoàng The OMX encoding is predefined and the .fd file for jkp already has the necessary information. – egreg May 14 '17 at 15:21