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}}");
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.