You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This article describes how it is possible in LaTeX to render a "closed square root".
I would like to draw one myself, but the code provided does not work. I suppose I am doing something wrong, because I literally started using this library today.
This is the LaTeX code provided by the article
% New definition of square root:
% it renames \sqrt as \oldsqrt
\let\oldsqrt\sqrt
% it defines the new \sqrt in terms of the old one
\def\sqrt{\mathpalette\DHLhksqrt}
\def\DHLhksqrt#1#2{%
\setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0
\advance\dimen0-0.2\ht0
\setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%
{\box0\lower0.4pt\box2}}
This is the result from the article. I am thinking I could just do something like...
TeXFormula fx = new TeXFormula("% New definition of square root:\r\n" +
"% it renames \\sqrt as \\oldsqrt\r\n" +
"\\let\\oldsqrt\\sqrt\r\n" +
"% it defines the new \\sqrt in terms of the old one\r\n" +
"\\def\\sqrt{\\mathpalette\\DHLhksqrt}\r\n" +
"\\def\\DHLhksqrt#1#2{%\r\n" +
"\\setbox0=\\hbox{$#1\\oldsqrt{#2\\,}$}\\dimen0=\\ht0\r\n" +
"\\advance\\dimen0-0.2\\ht0\r\n" +
"\\setbox2=\\hbox{\\vrule height\\ht0 depth -\\dimen0}%\r\n" +
"{\\box0\\lower0.4pt\\box2}}");
...but it doesn't work. Please help me.
The text was updated successfully, but these errors were encountered:
This article describes how it is possible in LaTeX to render a "closed square root".
I would like to draw one myself, but the code provided does not work. I suppose I am doing something wrong, because I literally started using this library today.
This is the LaTeX code provided by the article
This is the result from the article. I am thinking I could just do something like...
...but it doesn't work. Please help me.
The text was updated successfully, but these errors were encountered: