
glossaries
pdfLaTeX에서 패키지를 사용하고 있습니다 . 나는 노력하고있다
본문에 작은 대문자로 표기된 약어를 사용하십시오.
그리고
색인의 경우 용어집에 있는 각 항목 이름의 첫 글자를 대문자로 만듭니다.
이미 주위를 둘러보았으나 해결책을 찾지 못했습니다.
용어집을 얻으려면 makeindex
다음과 같이 정의된 명령을 실행합니다.
"/usr/texbin/makeglossaries" %
일반적으로 2개의 외부 파일에서 항목을 로드하지만 MWE를 실행한 후에도 동일한 문제가 발생하므로 이것이 문제라고 생각하지 않습니다. 어쨌든, 내가 사용하고 있는 명령을 표시하기 위해 MWE에 주석으로 삽입했습니다.
그리고 이게 중요한지는 모르겠지만 저는 MinionPro를 메인 폰트로 사용하고 KOMA-Script를 사용합니다.
내 MWE는 다음 스레드를 기반으로 합니다. http://www.latex-community.org/forum/viewtopic.php?f=5&t=9966
\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[toc=true,smallcaps,section,nonumberlist,acronym,nomain]{glossaries}
\newglossary{slg}{sym}{syb}{Nomenclature}
% \input{./text/glossary}
% \loadglsentries{./text/symbols}
\makeglossaries
\newacronym{pcm} {PCM} {phase change material}
\newglossaryentry{sym:hfus}{type=slg,sort={pl:h},
name = {\null$\Delta H_{fus}$},
description={latent heat of fusion}}
\begin{document}
Sample: \gls{sym:hfus}. \gls{sym:hfus}. \gls{pcm}. \gls{pcm}.
\textsc{This is small caps. PCM pcm }
\renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}
\printglossary[type=slg, style=long, nonumberlist=true]
\renewcommand{\glsnamefont}[1]{\MakeUppercase{#1}}
\printglossary[type=acronym, style=long]
\end{document}
결과는 다음과 같습니다.
대문자로 표시되는 유일한 것은 수학 환경의 Fus이며 이것이 어떻게 발생하는지 정말로 이해하지 못합니다. 다른 모든 것(소문자 옵션 및 설명의 대문자)은 작동하지 않습니다.
누군가 내가 뭘 잘못하고 있는지 설명해 주시겠습니까?
답변1
의견에서 언급했듯이 두문자어는 대문자를 사용하여 정의했기 때문에 작은 대문자로 표시되지 않습니다. 설명의 대문자가 작동하지 않는다고 말씀하셨습니다. 설명과 관련된 변경사항이 없기 때문입니다. \glsnamefont
설명이 아닌 이름에 적용됩니다. 설명이 대문자로 시작되도록 하는 새로운 스타일을 정의해야 합니다.
\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[toc=true,smallcaps,section,nonumberlist,acronym,nomain]{glossaries}
\newglossary{slg}{sym}{syb}{Nomenclature}
\makeglossaries
\newacronym{pcm}{pcm}{phase change material}
\newglossaryentry{sym:hfus}{type=slg,sort={pl:h},
name = {\null$\Delta H_{fus}$},
description={latent heat of fusion}}
\newglossarystyle{long-ucdesc}{%
\setglossarystyle{long}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\Glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
}%
}
\begin{document}
Sample: \gls{sym:hfus}. \gls{sym:hfus}. \gls{pcm}. \gls{pcm}.
\textsc{This is small caps. PCM pcm }
\printglossary[type=slg, style=long-ucdesc, nonumberlist=true]
\renewcommand{\glsnamefont}[1]{\MakeUppercase{#1}}
\printglossary[type=acronym, style=long]
\end{document}
이는 다음을 생성합니다.
다음은 설명의 첫 글자를 대문자로 만드는 스타일을 정의합니다.
\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[toc=true,smallcaps,section,nonumberlist,acronym,nomain]{glossaries}
\newglossary{slg}{sym}{syb}{Nomenclature}
\makeglossaries
\newacronym{pcm}{pcm}{phase change material}
\newglossaryentry{sym:hfus}{type=slg,sort={pl:h},
name = {\null$\Delta H_{fus}$},
description={latent heat of fusion}}
\newglossarystyle{long-ucdesc}{%
\setglossarystyle{long}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\Glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
}%
}
\makeatletter
\newglossarystyle{long-initcapsdesc}{%
\setglossarystyle{long}%
\renewcommand{\glsnamefont}[1]{\MakeUppercase{##1}}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\protected@edef\thisdesc{\glsentrydesc{##1}}%
\xcapitalisewords{\thisdesc}\glspostdescription\space ##2\tabularnewline
}%
}
\makeatother
\begin{document}
Sample: \gls{sym:hfus}. \gls{sym:hfus}. \gls{pcm}. \gls{pcm}.
\textsc{This is small caps. PCM pcm }
\printglossary[type=slg, style=long-ucdesc, nonumberlist=true]
\printglossary[type=acronym, style=long-initcapsdesc]
\end{document}
결과:
버전이 4.22 이상인 경우 대신 다음을 glossaries
사용할 수 있습니다 \glsentrytitlecase
.
\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[toc=true,smallcaps,section,nonumberlist,acronym,nomain]{glossaries}
\newglossary{slg}{sym}{syb}{Nomenclature}
\makeglossaries
\newacronym{pcm}{pcm}{phase change material}
\newglossaryentry{sym:hfus}{type=slg,sort={pl:h},
name = {\null$\Delta H_{fus}$},
description={latent heat of fusion}}
\newglossarystyle{long-ucdesc}{%
\setglossarystyle{long}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\Glossentrydesc{##1}\glspostdescription\space ##2\tabularnewline
}%
}
\newglossarystyle{long-initcapsdesc}{%
\setglossarystyle{long}%
\renewcommand{\glsnamefont}[1]{\MakeUppercase{##1}}%
\renewcommand{\glossentry}[2]{%
\glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} &
\glsentrytitlecase{##1}{desc}\glspostdescription\space ##2\tabularnewline
}%
}
\begin{document}
Sample: \gls{sym:hfus}. \gls{sym:hfus}. \gls{pcm}. \gls{pcm}.
\textsc{This is small caps. PCM pcm }
\printglossary[type=slg, style=long-ucdesc, nonumberlist=true]
\printglossary[type=acronym, style=long-initcapsdesc]
\end{document}
와 함께glossaries-extra
다음 속성 을 사용할 수 있습니다 glossdesc
.
\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage[section,nonumberlist,acronym,nomain]{glossaries-extra}
\newglossary{slg}{sym}{syb}{Nomenclature}
\makeglossaries
\setabbreviationstyle[acronym]{long-short-sc}
\newacronym{pcm}{pcm}{phase change material}
\newglossaryentry{sym:hfus}{type=slg,sort={pl:h},
name = {\null$\Delta H_{fus}$},
description={latent heat of fusion}}
\glssetcategoryattribute{acronym}{glossdesc}{title}
\glssetcategoryattribute{general}{glossdesc}{firstuc}
\begin{document}
Sample: \gls{sym:hfus}. \gls{sym:hfus}. \gls{pcm}. \gls{pcm}.
\textsc{This is small caps. PCM pcm }
\printglossary[type=slg, style=long, nonumberlist=true]
\printglossary[type=acronym, style=long]
\end{document}