# Cross-Referenced Index/Dictionary

I am undergoing some amateur Greek studies and would like to construct a dictionary of sorts with LaTeX. I would obviously like some sort of alpha-beta-cal listing of vocabulary words I encounter, with the ability to cross-reference synonyms, root words, derivations, etc. I will also likely have some sort of area at the beginning of the document containing study texts which reference the word list. As I am a general TeX noob I was wondering if and where anything like this has been done as a template.

### EDIT

After some fiddling around, here is a perfunctory sample of what I am after:

## Preamble

\documentclass{article}

\usepackage{hyperref}

\usepackage[greek]{babel}
\selectlanguage{greek}
\languageattribute{greek}{polutoniko}

\title{\latintext{Greek Studies}}

\date{2015-12-20}

\author{\latintext{Nathaniel Bond}}


## Study Text Sample

\section{\texorpdfstring{\latintext{Study Texts}}{}}

\subsection{\texorpdfstring{\latintext{Colossians 1:15-17}}{}}

<'os >estin e>ikwn to~u Jeo~u to~u >aor'atou, prot'otikos p'ashs kt'isews;
<'oti >en a>ut~w| >ekt'isjh ta p'anta, ta >en to~is o>urano~is kai ta >epi t~hs g~hs, ta <orata kai ta >a'orata, e>'ite jr'onoi, e>'ite kuri'othtes, e>'ite >arqa'i, e>'ite >exous'iai; ta p'anta di> a>uto~u kai e>is a>uton >'ektistai;
kai a>ut'os >esti pro p'antwn, kai ta p'anta >en a>ut~w| sun'esthke.

\latintext
Who [Christ Jesus] is the image of the invisible God, the firstborn of every creature:
For by him were all things created, that are in heaven, and that are in earth, visible and invisible, whether they be thrones, or dominions, or principalities, or powers: all things were created by him, and for him:
And he is before all things, and by him all things consist.
\greektext


## Lexicon Sample

\section{\texorpdfstring{\latintext{Lexicon}}{}}

\subsection{P p}
\subsubsection{p~as}

\latintext
[G3956] pas; including all the forms of declension; apparently a primary word; all, any, every, the whole:—all (manner of, means), alway(-s), any (one), × daily, + ever, every (one, way), as many as, + no(-thing), X thoroughly, whatsoever, whole, whosoever.
\greektext

\subsubsection{p'anta}

\latintext
See \greektext p~as

\subsubsection{p'antwn}

\latintext
See \greektext p~as

\subsubsection{p'ashs}

\latintext
See \greektext p~as

\subsubsection{prwt'otokos}

\latintext
[G4416] pro-tot-ok'-os; from G4413 and the alternate of G5088; first-born (usually as noun, literally or figuratively):—firstbegotten(-born).
\greektext

\newpage

1. Ideally, I would be able to do something like mouse over the Greek words and the PDF be marked up with a tooltip containing the Strong's definition given in the lexicon, by virtue of the Greek text being identical to the text of the subsubsection giving the definition.
2. If that is not possible, at least the ability to click a word and it link to the definition subsubsection would be good.
3. Either way, if possible, I would prefer not to have to mark up each Greek word with hyperlink notation - it would have a link automatically made to the subsubsection with matching text.

Any pointers appreciated, though I would prefer 64 bit over 32.

• What type of cross-reference? Simple text, or a link? And welcome. :) – Alenanno Dec 20 '15 at 19:59
• Welcome to TeX.SX! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help. – Martin Schröder Dec 20 '15 at 20:01
• This sounds like a task for glossaries, but without more information it's hard to try a solution. – user31729 Dec 20 '15 at 21:01
• glossaries with xindy? – cfr Dec 20 '15 at 21:49
• I have edited my answer, thanks. Please see above. – Bondolin Dec 20 '15 at 22:49

You don't have to manually set the hyperlink if you use glossaries but you do need to say something like \gls{<identifier>} to print the term in the text. If you don't use that package, you have to mark it somehow.
If the target is always a sectional heading, you could do something fancy with a \ref and \label but glossaries would be easier, I would think.
For example, glossaries uses the indexing facilities of makeindex and/or xindy etc., which means that the entries can be automatically sorted. It also offers a range of styles for formatting the list of entries as a whole and when used within the text.
If you don't want to mark up the text by hand, you could script it - for example, a little sed, a little gawk - to pre-process the *.tex` source before compilation.