Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

widehat incompatibility? #30

Closed
andjorhanson opened this issue Apr 23, 2023 · 1 comment
Closed

widehat incompatibility? #30

andjorhanson opened this issue Apr 23, 2023 · 1 comment

Comments

@andjorhanson
Copy link

Hi - I use \widehat and I also use my own bold "\Hat" macro defined as

%% \newcommand{\Hat}[1]{\hat{\bf #1}}
\renewcommand{\Hat}[1]{\hat{\bf #1}}

%% \newcommand{\Vec}[1]{{\bf #1}}
\renewcommand{\Vec}[1]{{\bf #1}}

\widehat works fine on all kinds of arguments, BUT when I use it this way

R(\theta, \Hat{n}) = R(\arccos{(\Hat{x}\cdot \Hat{y}) }, \widehat{\Hat{x}\times \Hat{y}} )

it WILL NOT COMPILE, always getting this error:


Underfull \hbox (badness 10000) in paragraph at lines 26--27
[83] <img2/2DMatch-a.eps> [84] [85]
./chapter2DRMSD.tex:268: Undefined control sequence.
\macc@adjust ->\dimen@ \macc@kerna
\advance \dimen@ \macc@kernb \kern -\dimen@
l.268 ...at{y}) }, \widehat{\Hat{x}\times \Hat{y}}
) \ ,
? r
OK, entering \nonstopmode.

However, if I PRECEDE it with \compositeaccents, as I must for \wideparen,
then it is fine:

\begin{equation} %
% R(\theta, \Hat{n}) = R(\arccos{(\Hat{x}\cdot \Hat{y}) }, \widehat{\Hat{x}\times \Hat{y}} )
R(\theta, \Hat{n}) = \times R(\arccos{(\Hat{x}\cdot \Hat{u} )},
\compositeaccents\widehat{\Hat{x} \times \Hat{u}} )
\label{Just2DRot.eq}
\end{equation}

The crazy thing is that this always worked without the \compositeaccents until
YESTERDAY, when I tried to compile the WHOLE book for the first time in
a month (getting close to submission!). Did something change in a LaTeX or
TeXShop update that broke \widehat? This ALWAYS worked, for years...

Or is my \Hat macro suddenly illegal as of yesterday? Should I change the
\Hat and \Vec macros ???

Thanks, Andy

@dgalcius
Copy link
Collaborator

Hi,
{yhmath} package redefines \widehat macro. With this version you have to use \compositeaccents with \widehat.
Alternatively, you could use unaltered version of \widehat: put \let\owidehat\widehat before loading {yhmath} and then use \owidehat instead of \widehat. Hope it helps, - deimi

@dgalcius dgalcius closed this as completed May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants