数式で使用されている頭字語の色を削除する

数式で使用されている頭字語の色を削除する

このacronymsパッケージを使用して、次のように数学記号を定義します。

\begin{acronym}[long]
\acro{v}[$\vec{v}$]{View direction vector}
\end{acronym}

\acs{<short>}長い数式モードの式を入力するよりも速い場合、私は他の多くのケースでもこれを行います。

これを使用すると、hyperrefパッケージは出力を特定の色でフォーマットします。これは、読者に短縮版がクリック可能であることを知らせたい GPS などの頭字語に便利です。そのような場合には、上記に似た別の頭字語リストを使用します。

しかし、方程式内の数式に色を付けたくはありません。一部が頭字語として定義され、その他が手動で記述されている場合、読みにくくなるからです。

私の質問は次のとおりです。 hyperref で特定の頭字語リストからリンクの色を削除することはできますか?または、数式モードのリンクの色付けをオフにすることはできますか?

これはここでの最初の質問です。私の問題が明確になったことを願っています :-)


追加された例: (リンクに色を付ける classicthesis と arsclassica を使用していますが、色の取得元は問題ではありません)

\documentclass{scrreprt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% REQUIRED FOR ARSCLASSICA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{subfig}
\usepackage[strict]{changepage}
\usepackage[parts,dottedtoc,eulerchapternumbers,subfig,beramono,pdfspacing] {classicthesis}
\usepackage{arsclassica}

% hyperref and acronym
\usepackage{hyperref}
\usepackage{acronym}

\begin{document}
    \chapter{Text}
    Some text where I want to have \ac{BRDF} as a visibly colored link and in 
    an equation would not want the symbol to be a colored link.

    \begin{equation}
        \acs{fBRDF} = \dots
    \end{equation}

    However it would be nice if it still was a link. It just should not have 
    any color.

    % Two acronym lists
    \chapter{List of Abbreviations}
    \begin{acronym}[GPS]
        \acro{BRDF}{Bidirectional Reflectance Distribution Function}
        \acro{RGB}{Red, Green, Blue}
    \end{acronym}

    \chapter{List of Symbols}
    \begin{acronym}[$f(\vec{l},\vec{v})$]
        \acro{fBRDF}[$f(\vec{l},\vec{v})$]{\acf{BRDF}}
    \end{acronym}

\end{document}

答え1

環境内のリンクの色を一時的に別の値(以前に指定した値以外)に設定し、後で元の色に戻すことができます。

私は、環境xpatchの開始後に色変更コードを追加しequation(マクロ\equation)、その後で元に戻す\endequation(事実上\end{equation}) ためにパッケージを使用しました。

利便性を高めるために、コマンドを定義し\DefaultDocumentLinkColor\DefaultDocumentEquationLinkColor色の名前を保持しました。

ただし、通常のテキスト色では、方程式リンクは認識されません。

\documentclass{scrreprt}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% REQUIRED FOR ARSCLASSICA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{subfig}
\usepackage[strict]{changepage}
\usepackage[parts,dottedtoc,eulerchapternumbers,subfig,beramono,pdfspacing]{classicthesis}
\usepackage{arsclassica}

% hyperref and acronym

\usepackage{xpatch}

\newcommand{\DocumentDefaultLinkColor}{blue}
\newcommand{\DocumentDefaultEquationLinkColor}{black}


\usepackage{hyperref}
\usepackage{acronym}

\hypersetup{linkcolor={\DocumentDefaultLinkColor}}


\xapptocmd{\equation}{\hypersetup{linkcolor={\DocumentDefaultEquationLinkColor}}}{}{}%
\xapptocmd{\endequation}{\hypersetup{linkcolor={\DocumentDefaultLinkColor}}}{}{}%

\begin{document}
    \chapter{Text}
    Some text where I want to have \ac{BRDF} as a visibly colored link and in 
    an equation would not want the symbol to be a colored link. See \ref{listofsymbols}

    \begin{equation}
        \acs{fBRDF} = \dots
    \end{equation}

    However it would be nice if it still was a link. It just should not have 
    any color.

    % Two acronym lists
    \chapter{List of Abbreviations}
    \begin{acronym}[GPS]
        \acro{BRDF}{Bidirectional Reflectance Distribution Function}
        \acro{RGB}{Red, Green, Blue}
    \end{acronym}

    \chapter{List of Symbols} \label{listofsymbols}
    \begin{acronym}[$f(\vec{l},\vec{v})$]
        \acro{fBRDF}[$f(\vec{l},\vec{v})$]{\acf{BRDF}}
    \end{acronym}

\end{document}

ここに画像の説明を入力してください

関連情報