Graphics, Figures & TablesGlossary with images

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
thibaud74
Posts: 13
Joined: Fri May 27, 2011 4:33 pm

Glossary with images

Post by thibaud74 »

Hi,

I'm trying to create a glossary about volcanos. I want use pictures, but when I display them, they overlap the (short) text. I tried to manage with minipage and flushleft insctructions, but it's not really clear for me. Here is my code :

Code: Select all

\documentclass[10pt,a4paper,frenchb]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[colorlinks]{hyperref}
\usepackage{graphicx,xcolor}
\usepackage{picins}
\usepackage[nonumberlist,shortcuts,notree]{glossaries}
\makeglossaries
\usepackage[frenchb]{babel}

\begin{document}

\newglossaryentry{aa}
{
 name={'a'\=a},
 description={
 \begin{minipage}[t]{1\textwidth}
  \parpic[r]{\includegraphics[width=4cm]{images/Aa_large.jpg}} 
 \begin{flushleft}
   Type de de lave fluide, rugueuse et à blocs apparents, et à viscosité élevée. Provient de l'hawaïen signifiant <<brûler>>, <<feu>>, <<colère>> (furie dans le regard), puis <<lave de pierre>>
\end{flushleft}
 \end{minipage}
 }
}

\newglossaryentry{accretion}
{
 name={accrétion},
  description={Phénomène d'accroissement d'une région continentale ou océanique par apport de matière. Les îles volcaniques naissent de l'accrétion, la matière est apportée par les eruption volcaniques qui dégagent de la lave. En s'accumulant au fil du temps cette lave peut atteindre la surface de l'eau et s'élever au-dessus. L'île de La Réunion naquit ainsi, tout comme l'archipel d'Hawaï ou les atolls.
  \newline  Source: \url{http://fr.wikipedia.org/wiki/Accrétion}},
   see=[cf. aussi]{eruption}
}

\newglossaryentry{arc}
{
 name={arc volcanique},
  description={Un arc volcanique est un alignement de volcans selon une courbe en zone de subduction},
   see=[Cf. aussi]{asthenosphere}
}

\newglossaryentry{asthenosphere}
{
 name={asthénosphère},
  description={Partie ductile (déformable sans rupture) du manteau supérieur terrestre}
}

\glsaddall
\printglossaries
\end{document}
Image
In this example, the picture overlap the text and the description is not aligned with the name of the entry. I played with flush and minipage but I can't success ?

Best,
Thibaud.

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

thibaud74
Posts: 13
Joined: Fri May 27, 2011 4:33 pm

Glossary with images

Post by thibaud74 »

All right, I used the package array and created an array with the "b" argument:

Code: Select all

description={
\begin{tabular}{b{6.7cm}c}
 Type de de \glspl{lave} fluide, rugueuse et à blocs apparents, et à \glspl{viscosite} élevée. Provient de l'hawaïen signifiant <<brûler>>, <<feu>>, <<colère>> (furie dans le regard), puis <<lave de pierre>> & \includegraphics[width=4cm]{images/Aa_large.jpg}  \end{tabular} }
}

With the glossary, you have to the nopostdot option to avoid having a dot in a third column in the preambule.

Code: Select all

\usepackage{array}
\usepackage[nopostdot]{glossaries}
Post Reply