这是soulpos包链接::https://www.ctan.org/tex-archive/macros/latex/contrib/soulpos
我根据 soulpos 手册编写了代码,但我不知道如何使用 \ulpgfB \ulpgfC 定义?
\documentclass{book}
\usepackage{xcolor}
\usepackage{soulpos}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
\ulposdef{\ulpgfB}{\raisebox{-.75ex}{%
\begin{tikzpicture}\clip (0,-1pt) rectangle (\ulwidth,1pt);
\draw[color=black!40,line width=.7pt,decorate,
decoration={snake,amplitude=.3pt,segment length=1mm,}](0,0) -- +(\ulwidth+3pt,0);\end{tikzpicture}}}
\ulposdef\ulpgfC[xoffset=.15em]{%
\ifulstarttype{0}{\def\arr{|}}{\def\arr{<}}\ifulendtype{0}{\edef\arr{\arr-|}}{\edef\arr{\arr->}}%
\raisebox{-.7ex}{\tikz\draw[\arr,color=black!40,line width=1pt](0,0) -- +(\ulwidth-1pt,0);}}
\begin{document}
thanks \ulpgfB{thanks} thanks
thanks \ulpgfC{hrhhgrh} thanks
\end{document}