我一直在尝试自定义部首符号的形状
这样看起来更纤薄,左侧突出部分占用的空间很小。
这是我的尝试:
\documentclass{standalone}
\makeatletter
\RequirePackage{epic}
\RequirePackage{eepic}
\def\@drawradical#1#2{% #1: total height, #2: width of radical
\begingroup
\@tempdima#1\p@ \@tempdimb#2\p@
\[email protected]\@tempdima
\edef\@radical@coordAx{0}%
\edef\@radical@coordAy{\strip@pt\dimen@}%
\[email protected]\@tempdimb \[email protected]\@tempdima
\edef\@radical@coordBx{\strip@pt\dimen@}%
\edef\@radical@coordBy{\strip@pt\dimen@ii}%
\[email protected]\@tempdimb \dimen@ii-\@tempdima
\edef\@radical@coordCx{\strip@pt\dimen@}%
\edef\@radical@coordCy{\strip@pt\dimen@ii}%
\dimen@\fontdimen8\textfont3\relax
\edef\@sqrt@linethickness{\strip@pt\dimen@\space}%
\[email protected]\dimen@
\edef\@radical@coordDx{\strip@pt\@tempdimb}%
\edef\@radical@coordDy{\strip@pt\dimen@}%
\unitlength1pt
\begin{picture}(0,0)
\drawline(\@radical@coordAx,\@radical@coordAy)(\@radical@coordBx,\@radical@coordBy)
\drawline(\@radical@coordCx,\@radical@coordCy)(\@radical@coordDx,\@radical@coordDy)
\thicklines
\drawline(\@radical@coordBx,\@radical@coordBy)(\@radical@coordCx,\@radical@coordCy)
\end{picture}
\endgroup}
\def\@sqrt@divide#1/#2{%
\ifdim#1<32\p@
\multiply#1 256\relax \divide#2 256\relax
\else
\ifdim#1<64\p@
\multiply#1 128\relax \divide#2 512\relax
\else
\ifdim#1<128\p@
\multiply#1 64\relax \divide#2 1024\relax
\else
\ifdim#1<256\p@
\multiply#1 32\relax \divide#2 2048\relax
\else
\ifdim#1<512\p@
\multiply#1 16\relax \divide#2 4096\relax
\else
\multiply#1 8\relax \divide#2 8192\relax
\fi
\fi
\fi
\fi
\fi
\divide#1 by #2\relax}
\DeclareRobustCommand{\sqrt}{\@testopt\@sqrt{}}
\def\@sqrt[#1]#2{%
{\@save@counters
\mathchoice
{\@@sqrt\displaystyle {#1}{#2}}%
{\@@sqrt\textstyle {#1}{#2}}%
{\@@sqrt\scriptstyle {#1}{#2}}%
{\@@sqrt\scriptscriptstyle{#1}{#2}}}}
\def\@@sqrt#1#2#3{%
\hbox{%
\@restore@counters
\setbox\z@\hbox{\m@th$#1#3$}%
\dimen@\ht\z@ \advance\dimen@\p@
\dimen@ii\dp\z@ \advance\dimen@ii\p@
\setbox\z@\hbox{\m@th$#1%
\overline{%
\box\z@
\vrule\@width\z@ \@height\dimen@ \@depth\dimen@ii}$}%
\dimen@\ht\z@ \advance\dimen@\dp\z@
\ifx#1\scriptscriptstyle \let\@tempa\ssf@size
\else
\ifx#1\scriptstyle \let\@tempa\sf@size
\else \let\@tempa\tf@size
\fi
\fi
\dimen@ii\@tempa\p@ \[email protected]\dimen@ii
\edef\@tempa{\noexpand\@drawradical
{\strip@pt\dimen@}{\strip@pt\dimen@ii}}%
\setbox4\hbox{\raise\ht\z@\hbox to\dimen@ii{\@tempa\hfil}}%
\def\@tempa{#2}%
\ifx\@tempa\@empty
\box4\relax
\else
\setbox\tw@\hbox{\m@th$\scriptscriptstyle #2$\hskip.5\dimen@ii}%.25-->.5
\dimen@\ht\z@ \advance\dimen@-\ht\tw@
\setbox\tw@\hbox{\raise.5\dimen@\box\tw@}%%.6-->.5 2017-10-18
\ifdim\wd4<\wd\tw@ \box\tw@ \llap{\box4}%
\else \box4 \llap{\box\tw@}%
\fi
\fi
\box\z@}}
\def\@save@counters{%
\def\@elt##1{\noexpand\setcounter{##1}{\number\csname c@##1\endcsname}}%
\edef\@restore@counters{\cl@@ckpt}}
%\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatother
\begin{document}
$\sqrt{10}$
\end{document}
其结果为:
显然,对角线两端的连接并不顺畅。
我怎么解决这个问题?
我需要征求你的建议。
谢谢。