TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For example either




would result rather huge tilde over the letter H, K, M, N, W, and X, please see the following alphabet:

The \widetilde \bm alphabet

I can understand the command adaptively adjust the width for specific letters, but how could I customize this width?

share|improve this question
I suggest removing the references to \bold... (in title and in tags) since this happens with non-bold symbols as well. – yo' Mar 19 '12 at 19:53
@tohecz Sure, thanks for the heads up. – Shuhao Cao Mar 19 '12 at 20:53
up vote 5 down vote accepted

This code defines three macros:

  1. \mathcenterto{#1}{#2} that typesets #2 to be centered to the size of #1;
  2. \widetildeto{#1}{#2} that put the wide tilde over #2 but it thinks it is of size #1. If you wish to have all wide tildes in the whole document to be the same, you can put \def\widetilde{\widetildeto{X}} or any other letter instead of X;
  3. \widehatto{#1}{#2} for \widehat.

Remark: it needs mathtools package besides amsmath!

Warning: the parameters cannot contain active macros, becuase #1 gets expanded twice and #2 get expanded 3 times! You can still use most math macors like \vec, \bm, \frac, ... Prohibited are macros like \newcommand, \addtocounter, ...





\widetildeto{I}{W} \widetilde{I}

\widetilde{W} \widetildeto{W}{I}


\widetilde{W} \widetilde{I}

share|improve this answer
Thanks a lot, works perfectly. I am a little confused about the remark about \newcommand though, is this the reason why you used \def instead of \newcommand? – Shuhao Cao Mar 19 '12 at 20:56
the mathtools package loads the amsmath package, so you only need to use \usepackage{mathtools} :) – cmhughes Mar 19 '12 at 21:09
@cmhughes I know, but I tend to load them both. It doesn't hurt and when you use commands from both, it seems to me somehow "cleaner" ... Just a matter of taste – yo' Mar 20 '12 at 9:23
@Jon No, I use \def because I grew up using TeX primitives instead of the LaTeX ones. It has nothing to do with the Remark. The Remark just says: Don't put anything like \newcommand (or \def) or such into the patameters of \widetildeto and other 2 defined commands. – yo' Mar 20 '12 at 9:25
@tohecz Thanks a lot, I got it! Please pardon my reading comprehension. :'( – Shuhao Cao Mar 20 '12 at 14:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.