텍스트 색상을 검정색으로 재설정하기 위해 tikz 노드 [fill=black, text=white] 내에서 색상이 지정된 인용 링크(하이퍼참조)를 방지하는 방법은 무엇입니까?

텍스트 색상을 검정색으로 재설정하기 위해 tikz 노드 [fill=black, text=white] 내에서 색상이 지정된 인용 링크(하이퍼참조)를 방지하는 방법은 무엇입니까?

다음 MWE는 문제를 보여줍니다.

\documentclass[12pt]{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @book{companion,
        author       = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
        title        = {The {LaTeX} Companion},
        date         = 1994,
        edition      = 1,
        publisher    = {Addison-Wesley},
        location     = {Reading, Mass.},
        pagetotal    = 528,
        langid       = {english},
        langidopts   = {variant=american},
        sorttitle    = {LaTeX Companion},
        indextitle   = {LaTeX Companion, The},
        shorttitle   = {LaTeX Companion},
    }
\end{filecontents}

\usepackage[english]{babel}
\usepackage[autolang=other,
    style=alphabetic,
    backend=biber,
    %backref=true,
    ]{biblatex}
\addbibresource{\jobname.bib}

\usepackage{tikz}

\usepackage[pdfencoding=auto,
    final=true,
    colorlinks=true,
    citecolor=yellow,
%   linkcolor=blue,
%   anchorcolor=purple,
%   urlcolor=green,
]{hyperref}

\begin{document}
\begin{tikzpicture}
    \node[draw, rectangle,
        minimum height=100mm,
        text width=10cm,
        align=center,
        fill=black,
        text=white,] {\huge 
            %\hypersetup{citecolor=green}
            Hello World!
            \cite[p. 100]{companion}

            Where am I? %you are there, but invisible due to wrong text color

            \textcolor{white}{Ahh, hello again!}
    };
\end{tikzpicture}

\noindent
I have two problems:
\begin{enumerate}
\item
Manually resetting the textcolor is inefficient and

\item
even if the textcolor is reset right after the cite command the text until the cite's closing bracket ', p. 100]' is not affected (it remains invisible).
\end{enumerate}

Question: Is there a comfortable solution to get the cite mark colored?

\printbibliography  
\end{document}

내가 도대체 ​​뭘 잘못하고있는 겁니까? 내 빌드 환경: Win7-64, Texlive 2017, luaLaTeX

답변1

패키지(TeXLive-2017, MiKTeX) 로 생성된 OCG 색상 링크는 ocgx2보고된 두 가지 문제를 모두 해결하는 것으로 보이며, 여기에서 현재 텍스트 색상으로 종이에 인쇄되는 OCG 색상 링크의 보너스가 있습니다 white.

\documentclass[12pt]{article}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @book{companion,
        author       = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
        title        = {The {LaTeX} Companion},
        date         = 1994,
        edition      = 1,
        publisher    = {Addison-Wesley},
        location     = {Reading, Mass.},
        pagetotal    = 528,
        langid       = {english},
        langidopts   = {variant=american},
        sorttitle    = {LaTeX Companion},
        indextitle   = {LaTeX Companion, The},
        shorttitle   = {LaTeX Companion},
    }
\end{filecontents}

\usepackage[english]{babel}
\usepackage[autolang=other,
    style=alphabetic,
    backend=biber,
    %backref=true,
    ]{biblatex}
\addbibresource{\jobname.bib}

\usepackage{tikz}

\usepackage[pdfencoding=auto,
    final=true,
%    colorlinks=true,
    citecolor=yellow,
%   linkcolor=blue,
%   anchorcolor=purple,
%   urlcolor=green,
]{hyperref}
\usepackage[ocgcolorlinks]{ocgx2}

\begin{document}
\begin{tikzpicture}
    \node[draw, rectangle,
        minimum height=100mm,
        text width=10cm,
        align=center,
        fill=black,
        text=white,] {\huge 
            %\hypersetup{citecolor=green}
            Hello World!
            \cite[p. 100]{companion}

            Where am I?

            %\textcolor{white}{Ahh, hello again!}
            Ahh, hello again!
    };
\end{tikzpicture}

%\noindent
%I have two problems:
%\begin{enumerate}
%\item
%Manually resetting the textcolor is inefficient and
%
%\item
%even if the textcolor is reset right after the cite command the text until the cite's closing bracket ', p. 100]' is not affected (it remains invisible).
%\end{enumerate}
%
%Question: Is there a comfortable solution to get the cite mark colored?

\printbibliography  
\end{document}

관련 정보