If you don’t want to read the rest, just send “whitespace” to the backend, and scan the mini program code.
Since the inception of assembly language, many students have requested a whitespace version. Although some hidden answer solutions can be found online, they have compatibility issues with elegantbook to varying degrees. After many attempts, I was still unable to succeed and was quite dissatisfied; I was just too inexperienced.
Later, even with chatgpt, I couldn’t find a good solution. Subsequent attempts with Doubao, Tongyi Qianwen, and others also yielded no results, so it was left aside for a long time.
Today, I thought I would try using Gemini (actually, I had used it before), because it has been updated, and after four or five rounds, I really managed to make it work! Below is some modified code that I would like to share with everyone; theoretically, you can do it too.
Add after <span>equirepackage{indentfirst,comment}</span>:
<span>equirepackage{environ}</span>
Redefine the <span>solution</span> and <span>proof</span> environments:
ewenviron{proof}{%
oindent extbf{ extcolor{second}{ extit{Proof}};}
exttt{if} exttt{( extbackslash ELEGANT@result == noanswer)}{%
egingroup
exttt{let} exttt{( extbackslash originaltextcolor = extcolor)}
exttt{let} exttt{( extbackslash originalcolor = extcolor)}
exttt{white} exttt{( extbackslash cfs)}
exttt{renewcommand} exttt{( extbackslash textcolor)}[2]{ exttt{( extbackslash originalcolor{white}##2)}}
exttt{renewcommand} exttt{( extbackslash color)}[1]{ exttt{( extbackslash originalcolor{white})}}
exttt{hypersetup} exttt{(linkcolor=white, anchorcolor=white, citecolor=white, filecolor=white, menucolor=white, urlcolor=white)}
exttt{BODY}
exttt{endgroup}
}{
exttt{color{black!90}} exttt{( extbackslash cfs)}
exttt{BODY}
}
}
ewenviron{solution}{
oindent extbf{ extcolor{main}{ extit{Solution}}}
exttt{if} exttt{( extbackslash ELEGANT@result == noanswer)}{%
egingroup
exttt{let} exttt{( extbackslash originaltextcolor = extcolor)}
exttt{let} exttt{( extbackslash originalcolor = extcolor)}
exttt{white} exttt{( extbackslash citshape)}
exttt{renewcommand} exttt{( extbackslash textcolor)}[2]{ exttt{( extbackslash originalcolor{white}##2)}}
exttt{renewcommand} exttt{( extbackslash color)}[1]{ exttt{( extbackslash originalcolor{white})}}
exttt{hypersetup} exttt{(linkcolor=white, anchorcolor=white, citecolor=white, filecolor=white, menucolor=white, urlcolor=white)}
exttt{BODY}
exttt{endgroup}
}{
exttt{citshape}
exttt{BODY}
}
}