Advertisement
Guest User

\mathchoice augmented doublehat

a guest
Feb 7th, 2011
306
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. \newlength{\dhatheight}
  2. \newcommand{\hhatDS}[1]{%
  3.     \settoheight{\dhatheight}{\ensuremath{\hat{#1}}}%
  4.     \addtolength{\dhatheight}{-0.35ex}%
  5.     \hat{\vphantom{\rule{1pt}{\dhatheight}}%
  6.     \smash{\hat{#1}}}}
  7. \newcommand{\hhatTS}[1]{%
  8.     \settoheight{\dhatheight}{\ensuremath{\hat{#1}}}%
  9.     \addtolength{\dhatheight}{-0.35ex}%
  10.     \hat{\vphantom{\rule{1pt}{\dhatheight}}%
  11.     \smash{\hat{#1}}}}    
  12. \newcommand{\hhatS}[1]{%
  13.     \settoheight{\dhatheight}{\ensuremath{\scriptstyle{\hat{#1}}}}%
  14.     \addtolength{\dhatheight}{-0.175ex}%
  15.     \hat{\vphantom{\rule{1pt}{\dhatheight}}%
  16.     \smash{\hat{#1}}}}
  17. \newcommand{\hhatSS}[1]{%
  18.     \settoheight{\dhatheight}{\ensuremath{\scriptscriptstyle{\hat{#1}}}}%
  19.     \addtolength{\dhatheight}{-0.07ex}%
  20.     \hat{\vphantom{\rule{1pt}{\dhatheight}}%
  21.     \smash{\hat{#1}}}}
  22. \newcommand{\hhat}[1]{\mathchoice{\hhatDS{#1}}{\hhatTS{#1}}{\hhatS{#1}}{\hhatSS{#1}}}
Advertisement
RAW Paste Data Copied
Advertisement