4

I can not understand why the following tex file does not compile.

\documentclass{elsarticle}
\usepackage[hmargin=1in,vmargin=1in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{arcs}

\usepackage{tikz}

\begin{document}
$\overarc{POQ}$ $+ \widehat{QOR} + \widehat{ROP}= 2\pi r$
\end{document}
user12290
  • 3,341

1 Answers1

1

Discussed for other oversymbols here Really wide hat symbol. Using scalerel, a variant of that solution is used here:

\documentclass{article}
\usepackage{scalerel}

\newcommand\reallywidehat[1]{%
\begin{array}{c}
\stretchto{
  \scaleto{
    \scalerel*[\widthof{#1}]{\bigwedge}
    {\rule[-\textheight/2]{1ex}{\textheight}} %WIDTH-LIMITED BIG WEDGE
  }{1.25\textheight} % THIS STRETCHES THE WEDGE A LITTLE EXTRA WIDE
}{0.5ex}\\           % THIS SQUEEZES THE WEDGE TO 0.5ex HEIGHT
#1\\                   % THIS STACKS THE WEDGE ATOP THE ARGUMENT
\rule{0ex}{.01ex}
\end{array}
}

\newcommand\reallywideparen[1]{%
\begin{array}{c}
\stretchto{
  \scaleto{
    \scalerel*[\widthof{#1}]{\frown}
    {\rule[-\textheight/2]{1ex}{\textheight}} %WIDTH-LIMITED BIG WEDGE
  }{1.25\textheight} % THIS STRETCHES THE WEDGE A LITTLE EXTRA WIDE
}{0.5ex}\\           % THIS SQUEEZES THE WEDGE TO 0.5ex HEIGHT
#1\\                   % THIS STACKS THE WEDGE ATOP THE ARGUMENT
\rule{0ex}{.01ex}
\end{array}
}

\begin{document}
$\reallywideparen{POQ}$ $+ \reallywidehat{QOR} + \reallywidehat{ROP}= 2\pi r$
\end{document}

enter image description here