2010-07-05 103 views
3

在我的文檔中,我使用包術語表來創建術語表。除了文本中的單詞和詞彙表中的相應條目之間沒有鏈接(因此您可以單擊要解釋的單詞並進入術語表條目),一切都可以正常工作。如何鏈接到術語表項目(使用包術語表)

我的文檔中最重要的部分:

%----Header---- 
... 
\usepackage[nonumberlist,acronym,toc,style=altlist]{glossaries} 

\usepackage[ 
colorlinks=true, 
pdfborder=0 0 0, 
pdfpagelabels, 
plainpages=false, 
linktocpage=false, 
pdfcreator={LaTeX}]{hyperref} 
... 
%Glossary entries 
\newglossaryentry{glos:twitter}{name=Twitter, 
description={Mikroblogging-Service.}} 

%----Main document---- 
\begin{document} 
\chapter{Introduction} 
This text is a normal glossary item: \gls{glos:twitter}. 
This text should also link to the glossary item: \glslink{glos:twitter}{Link to Twitter} 
but there is no link 
... 
\printglossary 
\end{document} 

正如你看到的我還使用了包hyperref宏,但似乎沒有機制,在正文的詞彙自動鏈接的話。 我也嘗試過使用\ ref和\ label,但是當被引用的元素在主文檔之外時(例如我的詞彙表),它不起作用。 我正在使用來自miktex的makeglossaries-script(在構建時調用makeglossaries main),但這也不會給我一個鏈接。

任何人都知道一種方法來做到這一點?或者,也許我應該使用另一個包,而不是支持這樣的功能的詞彙表?

我也很感謝任何可以使用這個功能的例子。

編輯:

我剛剛得到一個工作小例子,其中GLS/glslink實際工作。似乎詞彙表項目的鏈接與我在文檔中使用的其中一個包裹有關。將不得不嘗試將我的軟件包逐個添加到示例中,以查看哪個軟件包是原因。例如:

\listfiles 
\documentclass{article} 

\usepackage[ 
colorlinks=true, 
pdfborder=0 0 0, 
pdfpagelabels, 
plainpages=false, 
linktocpage=false, 
pdfcreator={LaTeX}]{hyperref} 
\usepackage[nonumberlist,acronym,toc,style=altlist,]{glossaries} 
\makeglossaries 

%Glossary entries 
\newglossaryentry{glos:twitter}{name=Twitter, 
description={Mikroblogging-Service.}} 

%----Main document---- 
\begin{document} 

\chapter{Introduction} 
Ein normales Wort aus dem Glossar: \gls{glos:twitter}. 
Dieses Wort soll zum Glossar verlinkt werden: \glslink{glos:twitter}{Link to Twitter} 
funktioniert aber nicht... 
\clearpage 
\printglossary 
\end{document} 
+2

我不確定這是否是這個原因,但是如果在適當的時候沒有加載'hyperref'會導致有點奇怪的問題。所以你可能會嘗試在加載'詞彙表之前加載*。 – phimuemue 2010-07-05 16:26:13

+0

謝謝!有趣。我一直認爲我必須在最後加載hyperref才能讓它正常工作!不幸的是,它仍然不起作用。我嘗試了所有組合,改變詞彙表和超鏈接的順序,仍然沒有鏈接。 任何其他提示?網上有一個功能齊全的例子,超鏈接的工作是否正確? – ifischer 2010-07-06 05:36:05

回答

1

知道了!!!

正如我的乳膠碼提取物沒有提及,在我的DocumentClass的財產草案設置爲。當刪除此屬性或將其設置爲false時,gls/glslink可以正常工作。