TikZ-相对于文本的标注位置

TikZ-相对于文本的标注位置

给出这个最小可编译示例:

\documentclass[a4paper,11pt,openany]{memoir}

\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{tikz}
    \usetikzlibrary{hobby}
    \usetikzlibrary{ocgx}
    \usetikzlibrary{shapes.callouts}

\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline=.5ex]\node(#1){};}

\newcounter{contatoreRiquadri}
\setcounter{contatoreRiquadri}{1}

\tikzset{stileCallout/.style={
    draw=gray,
    thick,
    rectangle callout,
    anchor=pointer,
    align=justify,
    fill=gray!17}
    }

\NewDocumentCommand{\parolaLinkRiquadro}{r[] m}{%
    \switchocg{#1}{\textsf{\textcolor{gray}{#2}}}\tikzmark{#1}%
}

\NewDocumentCommand{\riquadroEsplicativo}{O{opacity=1,text opacity=1} m O{270:1cm} m O{5cm} m m}{%
\begin{tikzpicture}[remember picture,overlay]
\begin{scope}[ocg={ref=#2,status=invisible,name={#4}}]
\node[stileCallout,text width=#5,callout relative pointer={(#3)},#1] at (#2) {\textcolor{black}{\textbf{``}\,#4\,\textbf{''.}}\par\centering\href{#6}{#7}\par};
\end{scope}
\end{tikzpicture}%
}

\NewDocumentCommand{\riquadro}{m O{opacity=1,text opacity=1} m O{270:1cm} m O{5cm}}{%
    \parolaLinkRiquadro[riquadro\thecontatoreRiquadri]{\textsf{\textcolor{gray}{#1}}}%
    \riquadroEsplicativo[#2]{riquadro\thecontatoreRiquadri}[#4]{#3}[#6]{#5}{#1}%
    \addtocounter{contatoreRiquadri}{1}%
    }



\begin{document}
\lipsum[1]
\riquadro{\textbf{CLICK HERE!}}
    {long long long long long long long long long long long long long long long long long long long long long long long long text}
    [180:1cm]{and than click here}
\lipsum[2]

\end{document}

如果我将其作为标注的第二个可选参数\riquadro [270:1cm]写入多于 在...前面如果我把[90:1cm]它画出来以下 在后面文本。我该怎么做才能总是在...前面文本。



相关内容