LyXAdding a glossary entry with hyperref

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
blubbi
Posts: 4
Joined: Thu Nov 12, 2015 2:20 pm

Adding a glossary entry with hyperref

Post by blubbi »

Hello,

I wonder whether it is possible to add a glossary entry in the text, which is clickable and leads to the corresponding entry where the glossary is created.
I activated the hyperref-options in the document settings, but there is no link at the position of the entry.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: Adding a glossary entry with hyperref

Post by Johannes_B »

Can you add a minimal example exported to LaTeX to show us what you currently have? That would be very helpful.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
blubbi
Posts: 4
Joined: Thu Nov 12, 2015 2:20 pm

Adding a glossary entry with hyperref

Post by blubbi »

This is a minimal example

Code: Select all

% Quellcode vorschauen

%% LyX 2.0.8.1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\RequirePackage{fix-cm}
\documentclass[12pt,ngerman]{scrreprt}
\renewcommand{\rmdefault}{cmr}
\renewcommand{\familydefault}{\rmdefault}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[a4paper]{geometry}
\geometry{verbose,bmargin=3cm,lmargin=2.5cm,rmargin=2.5cm,footskip=3cm}
\pagestyle{plain}
\usepackage{babel}
\usepackage{setspace}
\usepackage{nomencl}
% the following is useful when we have the old nomencl.sty package
\providecommand{\printnomenclature}{\printglossary}
\providecommand{\makenomenclature}{\makeglossary}
\makenomenclature
\onehalfspacing
\usepackage[unicode=true,
 bookmarks=true,bookmarksnumbered=true,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
 {hyperref}
\hypersetup{pdftitle={title},
 pdfauthor={author}}

\makeatletter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{enumitem}		% customizable list environments
\newlength{\lyxlabelwidth}      % auxiliary length 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage[utf8]{inputenc}
\usepackage{charter}
\usepackage[scaled=.92]{helvet}
\usepackage{courier}
\usepackage{microtype}

\pagenumbering{roman}
\let\myTOC\tableofcontents
\renewcommand\tableofcontents{%
\myTOC
\clearpage
\pagenumbering{arabic}
}

\makeatother

\begin{document}

\title{Testdocument}

\maketitle

\chapter{A test}


\section{Test}

Here comes a nomenclature entry: strange word\nomenclature{strange word}{explanation of strange word} 

\settowidth{\nomlabelwidth}{strange word}
\printnomenclature{}
\end{document}
In my LyX editor I added a nomenclature entry for "strange word" and the entry is created in the nomenclature. What I want is a hyperlink from where the word is mentioned to the explanation in the nomenclature.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Adding a glossary entry with hyperref

Post by Johannes_B »

Package nomencl is quite old, newer and more powerful alternatives would be package acro and glossaries.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply