gls{} が使用されている場合はテキストを強調します

gls{} が使用されている場合はテキストを強調します

現在、修士論文を書いています。PDF版と印刷版も配布します。

ハイパーリンクは印刷版では見栄えがよくないため、ハイパーリンクの下書きオプションを使用してハイパーリンクを削除します。残念ながら、これにより、\glsテキスト内のすべての略語と用語集エントリ(すべて で作成)が目立たなくなるという問題が発生します。\gls{}を使用せずに 内で使用されているテキストを強調するオプションがあるかどうか疑問に思っています\emph{\gls{}}。これにより、読者はこれらの単語が別の場所で説明されていることがわかります。最後のオプションでは、すべてのエントリを変更するために多くの手作業が必要になります。

\documentclass{article}
\usepackage[style=super,toc,acronym]{glossaries}
\makeglossaries
\newglossarystyle{clong}{
    \renewenvironment{theglossary}%
    {\begin{longtable}{p{.3\linewidth}p{\glsdescwidth}}}%
        {\end{longtable}}%
    \renewcommand*{\glossaryheader}{}%
    \renewcommand*{\glsgroupheading}[1]{}%
    \renewcommand*{\glossaryentryfield}[5]{%
        \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}%
    \renewcommand*{\glossarysubentryfield}[6]{%
        & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}%
% Groupskip verhindert den leeren Platz nach anderen Buchstaben
%   \renewcommand{\glsgroupskip}{}
}

\newglossaryentry{ATL-g}{name= {ATL},
    description={Sich wiederholende Tätigkeiten, welche die psychischen und physischen menschlichen Grundbedürfnisse erfüllen}}
\newglossaryentry{ATL}{type=\acronymtype, name={ATL}, description={Aktivitäten des täglichen Leben}, first={Aktivitäten des täglichen Lebens (ATL)\glsadd{ATL-g}}, see=[Glossar]{ATL-g}}

\newacronym{ANN}{ANN}{Artificial Neuronal Network}
\begin{document}
\printglossary[style = clong, type=\acronymtype]
\newpage
\printglossary[style = clong, type=main]
\newpage

\gls{ATL} glossary test with \gls{ANN}

\end{document}

答え1

アップデート:

使用する場合、glossaries-extra異なるエントリ タイプごとにテキスト形式を変更できます。

\documentclass{article}
\usepackage[style=super,toc,acronym]{glossaries-extra}

\glssetcategoryattribute{general}{textformat}{emph}
\glssetcategoryattribute{acronym}{textformat}{emph}

\glssetcategoryattribute{general}{glossnamefont}{emph}
\glssetcategoryattribute{acronym}{glossnamefont}{emph}


\makeglossaries
\newglossarystyle{clong}{
    \renewenvironment{theglossary}%
    {\begin{longtable}{p{.3\linewidth}p{\glsdescwidth}}}%
        {\end{longtable}}%
    \renewcommand*{\glossaryheader}{}%
    \renewcommand*{\glsgroupheading}[1]{}%
    \renewcommand*{\glossaryentryfield}[5]{%
        \glstarget{##1}{##2} & ##3\glspostdescription\space ##5\\}%
    \renewcommand*{\glossarysubentryfield}[6]{%
        & \glstarget{##2}{\strut}##4\glspostdescription\space ##6\\}%
% Groupskip verhindert den leeren Platz nach anderen Buchstaben
%   \renewcommand{\glsgroupskip}{}
}

\newglossaryentry{ATL-g}{name= {ATL},
    description={Sich wiederholende Tätigkeiten, welche die psychischen und physischen menschlichen Grundbedürfnisse erfüllen}}
\newglossaryentry{ATL}{type=\acronymtype, name={ATL}, description={Aktivitäten des täglichen Leben}, first={Aktivitäten des täglichen Lebens (ATL)\glsadd{ATL-g}}, see=[Glossar]{ATL-g}}

\newacronym{ANN}{ANN}{Artificial Neuronal Network}

\begin{document}
\printglossary[style = clong, type=\acronymtype]
\newpage
\printglossary[style = clong, type=main]
\newpage

\gls{ATL} glossary test with \gls{ANN}

\end{document}

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


再定義することでエントリ形式を変更できます\glsentryfmt:

\documentclass{article}
\usepackage{glossaries}
\renewcommand*{\glsentryfmt}{%
  \emph{\glslabel}%
}
\makeglossaries

\begin{document}
\newglossaryentry{utc}{name=UTC, description={Coordinated Universal Time}}
\newglossaryentry{adt}{name=ADT, description={Atlantic Daylight Time}}
\newglossaryentry{est}{name=EST, description={Eastern Standard Time}}

\gls{utc} is 3 hours behind \gls{adt} and 10 hours ahead of \gls{est}.

\printglossaries

\end{document}

関連情報