Document Classesmemoir | Glossary with Illustrations

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
pyrogerg
Posts: 9
Joined: Fri Aug 12, 2011 1:24 am

memoir | Glossary with Illustrations

Post by pyrogerg »

Hello,

I am new to LaTeX and working on a regional flora, a book that will identify and describe plants. Botanical nomenclature requires a glossary with illustrations for many terms. I've been trying to create the glossary using the function provided by the memoir class, but I'm having difficulty with it.

I have created a minimum working example "MWE.tex", which produces a minimal glossary by the following steps:
  • Create basic.gst configuration file for MakeIndex (code file copied from memmoir manual).

    Code: Select all

    %%% basic.gst basic makindex glossary style file
    %%% Output style parameters 
    preamble "\\begin{theglossary}" 
    postamble "\n\\end{theglossary}\n"
    item_0	"\n\\glossitem" 
    delim_0	"{\\memglonum{" 
    encap_suffix "}}}" 
    headings_flag 1 
    heading_prefix "\\doglobookmark{" 
    heading_suffix "}"
    %%% Input style parameters 
    keyword "\\glossaryentry"
  • Create glo file by typesetting MWE.tex.
  • Create gls file by entering the following at the command line:

    Code: Select all

    makeindex -s basic.gst -o MWE.gls MWE.glo
  • Edit gls file to remove references to the doglobookmark macro*.
    Typeset MWE.tex again.
*Note: The gls file must be edited to remove the doglobookmark marcro or LaTex will return an error that it is an undefinied control sequence. I'd like to fix this, but it is a lower priority than the graphics.

Having created a glossary, I have no idea how to get the illustration graphics into it. Is there a way to do this using either memoir's glossary or some other glossary package that won't conflict with memoir? Otherwise, I'll resort to formatting the glossary manually as another chapter. If I take that route, I could use a suggestion as to how I can create a horizontal space between terms and their definitions, such that the definitions are left aligned with each other to the right of the terms.

Thanks in advance,
Gregory
Attachments
MWE.tex
(957 Bytes) Downloaded 276 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

memoir | Glossary with Illustrations

Post by nlct »

memoir has a fairly limited glossary mechanism. You might find it easier to use the glossaries package. For example (suppose you have an image file called "test.png"):

Code: Select all

\documentclass{memoir}

\usepackage[nonumberlist]{glossaries}
\usepackage{graphicx}

\makeglossaries

\newglossaryentry{awn}{name=awn,description={Hair- or bristle-like
appendage.\begin{center}\includegraphics{test}\end{center}}}

\begin{document}
\chapter{Sample}

\gls{awn}

\printglossaries

\end{document}
(There's a beginner's guide on CTAN or there's also an article in the Know How section.)

If you want to get a bit more fancy, you could store the image in one of the user keys and define your own custom glossary style.

Regards
Nicola Talbot
Post Reply