
나는 glossaries
약어 설명의 모양을 글꼴로 변경하고 싶습니다.없이세리프.
약어 이름을 변경할 수 있었지만 설명도 변경할 수 있는 스위치를 찾을 수 없는 것 같습니다.
사용자 정의 용어집 형식을 도입하지 않고도 쉬운 방법이 있습니까?
MWE:
\documentclass[]{report}
\usepackage[
%nomain,
nonumberlist,
acronym,
section
]
{glossaries}
\renewcommand{\glsnamefont}[1]{\textsf{#1}} %Change acronym name font
\makeglossaries
\newacronym{NVP}{NVP} {Natural Ventilation Potential}
\begin{document}
\glsaddall
\printglossaries
\sffamily for comparison, this should be without serifs.
\end{document}
답변1
\glsnamefont
항목 이름이 용어집에 표시되는 방식에만 영향을 미칩니다. 기본 long-short
약어 스타일의 경우 필드에 짧은 형식만 나타납니다 name
. 긴 형식이 description
필드에 배치됩니다.
사용자 정의 용어집 형식을 도입하지 않고도 쉬운 방법이 있습니까?
glossaries
단순히 전체 용어집을 산세리프체로 작성하지 않는 한 기본 패키지에는 적합하지 않습니다 .
\documentclass[]{report}
\usepackage[
%nomain,
nonumberlist,
acronym,
section
]
{glossaries}
\renewcommand{\glsnamefont}[1]{\textsf{#1}} %Change acronym name font
\renewcommand{\glossarypreamble}{\begin{sffamily}}
\renewcommand{\glossarypostamble}{\end{sffamily}}
\makeglossaries
\newacronym{NVP}{NVP} {Natural Ventilation Potential}
\begin{document}
\glsaddall
\printglossaries
\sffamily for comparison, this should be without serifs.
\end{document}
숫자 목록을 표시하지 않았으므로 이는 산세리프에서 name
및를 설정하는 것과 실제로 다르지 않습니다.description
대안은(새 용어집 스타일을 정의하고 싶지 않은 경우) 다음을 사용하는 것입니다.glossaries-extra
확장 패키지. 두 가지 가능한 옵션이 있습니다:
스타일을 사용 long-em-short-em
하고 글꼴 명령을 에서 로 변경 \emph
합니다 \textsf
. 이렇게 하면 문서 텍스트( 를 사용하는 경우 \gls
)와 용어집 모두에서 스타일이 수정됩니다.
\documentclass[]{report}
\usepackage[
%nomain,
nonumberlist,
acronym,
section
]
{glossaries-extra}
\makeglossaries
\setabbreviationstyle[acronym]{long-em-short-em}
\renewcommand*{\glslongemfont}[1]{\textsf{#1}}%
\renewcommand*{\glsabbrvemfont}[1]{\textsf{#1}}%
\newacronym{NVP}{NVP} {Natural Ventilation Potential}
\begin{document}
\glsaddall
\printglossaries
\sffamily for comparison, this should be without serifs.
\end{document}
또는 용어집의 필드만 수정하려는 경우 description
(문서에 긴 형식이 표시되는 방식은 변경하지 않음) glossdescfont
다음과 같이 속성을 설정할 수 있습니다.
\documentclass[]{report}
\usepackage[
%nomain,
nonumberlist,
acronym,
section
]
{glossaries-extra}
\makeglossaries
\glssetcategoryattribute{acronym}{glossdescfont}{textsf}
\glssetcategoryattribute{acronym}{glossnamefont}{textsf}
\setabbreviationstyle[acronym]{long-short}
\newacronym{NVP}{NVP} {Natural Ventilation Potential}
\begin{document}
\glsaddall
\printglossaries
\sffamily for comparison, this should be without serifs.
\end{document}
여기 내가 사용했습니다
\glssetcategoryattribute{acronym}{glossnamefont}{textsf}
대신에
\renewcommand{\glsnamefont}[1]{\textsf{#1}}
따라서 글꼴 변경은 두문자어에만 영향을 미칩니다(일반 용어와 두문자어가 혼합된 경우).