
내 석사 논문에서는 모든 약어와 기호를 추적하기 위해 용어집 패키지를 사용합니다. 둘을 다르게 하기 위해 두 개의 서로 다른 용어집을 만들었습니다. 하나는 표준 약어 패키지를 사용하고 하나는 내가 직접 정의한 기호 목록입니다(하나는 기호용, 하나는 단위용, 하나는 설명용, 하나는 페이지용으로 4개의 열이 필요했기 때문에 내 자신의 스타일을 사용했습니다).
나는 또한 로마자와 아랍어 번호 매기기를 모두 사용합니다. (기호) 용어집에서 참조를 클릭하면 텍스트의 위치로 올바르게 리디렉션됩니다. 그러나 텍스트에서 (기호) 참조를 클릭하면 첫 번째 페이지로 리디렉션됩니다(기호 목록의 올바른 위치 대신).
그러나 약어 목록의 경우 올바르게 작동합니다. 내 새 스타일의 정의에 오류가 있는 것 같습니다. 번호 매기기 변경 사항을 제거하더라도 여전히 첫 번째 페이지로 리디렉션됩니다.
hyperrefname
문제가 해결되지 않는 것 같습니다. 어떻게 해결할 수 있나요?
나는최소한의 작업 예(MWE)는 모든 패키지와 Perl 컴파일러를 사용하여 실행할 수 있습니다.
\documentclass[a4paper]{book}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{hyperref}
\hypersetup{colorlinks=true, linkcolor=Maroon, citecolor=ForestGreen, filecolor=magenta, urlcolor=magenta, hypertexnames=false}
%% Glossary properties
\usepackage[nomain,acronym,toc,section]{glossaries}
\newglossary{symbol}{sbl}{smb}{Symbols}
\usepackage{array}
\makeglossaries
\usepackage[xindy]{imakeidx}
\makeindex
%% My own glossary to display the units
\newglossarystyle{tabx4col}{%
% Put the glossary in a longtable environment:
\renewenvironment{theglossary}%
{\begin{longtable}{@{}p{0.12\textwidth}@{}p{0.12\textwidth}@{}p{0.56\textwidth}rp{0.15\textwidth}}}%
{\end{longtable}}%
\renewcommand*{\glossaryentryfield}[5]{%
\glstarget{\textbf{##1}}{\textbf{##2}}% Name
& $[$\glsentryuseri{##1}$]$% Units
& ##3% Description
& ##5% Page list
\\% end of row
}%
%% Nothing between groups:
\renewcommand*{\glsgroupskip}{}%
}
%% Abbreviations
\newacronym{abr1}{ABR1}{Abbreviation 1}
\newacronym{abr2}{ABR2}{Abbreviation 2}
%% Symbols
\newglossaryentry{sym1}
{%
type=symbol,
name={\ensuremath{\alpha}},
description={The first symbol, with a very long description that spans multiple lines},
user1={kg},
sort=alpha
}
\newglossaryentry{sym2}
{%
type=symbol,
name={\ensuremath{\beta}},
description={the second symbol},
user1={m},
sort=beta
}
\begin{document}
\pagenumbering{roman}
\tableofcontents
{\let\cleardoublepage\clearpage
\chapter*{List of abbreviations and symbols}
\addcontentsline{toc}{chapter}{List of abbreviations and Symbols}
\printglossary[type=\acronymtype,title=Abbreviations,toctitle=Abbreviations]
\printglossary[type=symbol,style=tabx4col]
}
\chapter{Introduction}
\pagenumbering{arabic}
\gls{abr1} \gls{abr2} \gls{sym1} \gls{sym2}
\chapter{First chapter}
\gls{abr1} \gls{abr2} \gls{sym1} \gls{sym2}
\end{document}
답변1
테스트 파일은 다음 hyperref
라인에 따라 여러 경고를 생성합니다.
pdfTeX warning (dest): name{glo:sym1} has been referenced but does not exist,
replaced by a fixed one
이는 다소 비밀스럽기는 하지만 이는 하이퍼링크 대상 메커니즘 glossaries
에 문제가 있음을 의미할 수 있습니다 . glossaries
이 링크가 존재하지 않기 때문에 하이퍼링크를 통해 문서의 첫 페이지로 이동하게 됩니다. 명령은 \glstarget
용어집 스타일로 이 하이퍼링크를 설정합니다. 첫 번째 인수는 항목의 레이블이어야 하며 문제는 다음과 같습니다.
\glstarget{\textbf{##1}}{\textbf{##2}}% Name
첫 번째 인수 는 \textbf
대상 메커니즘을 혼란스럽게 합니다. 문제를 제거하려면 제거하기만 하면 됩니다.
\glstarget{##1}{\textbf{##2}}% Name