Generalcreate legend over symbols used

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
katjag
Posts: 1
Joined: Tue Sep 25, 2007 10:37 am

create legend over symbols used

Post by katjag »

I'd like to create a legend over symbols, e.g. containing boxes of different colors and diffent types of arrows. Next to the symbol the description what it means should be.
Is there a possibility to realize this in LaTeX? I thought about using a table or a minipage but I can't manage to include a figure.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

create legend over symbols used

Post by gmedina »

I am not sure I understood your question. The following example uses the \overset command of the amsmath packages to place a box with some information above the usual functional symbol. The example looks ugly, but I only meant it as ... well, an example:

Code: Select all

\documentclass{article}
\usepackage{xcolor}
\usepackage{amsmath}

\begin{document}

text text text 
$\overset{\colorbox{blue}{\parbox{3.7cm}{\centering%
 $A$ is the domain of $f$\\%
 $B$ is the codomain of $f$\\[1em]%
 \colorbox{gray}{\textcolor{red}{Other notation:}}\\[0.5em]%
 $A\xrightarrow{f}B$}}}%
 {f:A\rightarrow B}$
text text text

\end{document}
Anyway, to have extensible arrows, harpoons, hookarrows and sophisticated boxing you can use the packages in the mh bundle. To be able to use color, use the xcolor package; and use the fancybox package for ornamental boxes.

Edit: I added the links to the packages.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply