Created
January 7, 2014 14:08
-
-
Save t-uda/8299787 to your computer and use it in GitHub Desktop.
$\left(\hat{ ... }\right)$ のカッコが大きくて気持ち悪い ref: http://qiita.com/t_uda/items/05441624c28b802ca12e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\[ | |
f\left(\hat{X}\right) {\lVert v \rVert}_{P\left(\hat{X}\right)} | |
\] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\[ | |
f\left(\Hat{X}\right) {\lVert v \rVert}_{P\left(\Hat{X}\right)} | |
\] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% 縦に大きくならないハット付き文字を作る。 | |
%%%% \hbox to 0pt : 幅 0pt のボックスを作る。 | |
%%%% \phantom : その文字列の大きさで何も表示されないボックスを作る。 | |
%%%% \raisebox : ボックスの位置・サイズを変更する。 | |
%%%% \mathchoice : 数式モードに応じて条件分岐する。 | |
\def\Hat#1{{\fboxsep0pt\mathchoice | |
{\hbox to 0pt{\phantom{$\displaystyle #1$} }\raisebox{0ex}[0pt][0pt]{$\displaystyle\hat{#1}$}} | |
{\hbox to 0pt{\phantom{$\textstyle #1$} }\raisebox{0ex}[0pt][0pt]{$\textstyle\hat{#1}$}} | |
{\hbox to 0pt{\phantom{$\scriptstyle #1$} }\raisebox{0ex}[0pt][0pt]{$\scriptstyle\hat{#1}$}} | |
{\hbox to 0pt{\phantom{$\scriptscriptstyle #1$}}\raisebox{0ex}[0pt][0pt]{$\scriptscriptstyle\hat{#1}$}} | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment