# Tag wikis for graphics-related tags

As everybody knows, we have copious amounts of graphics-related tags on TeX-SE. I've been thinking for some time to try and write up a tag wiki for at least the popular ones, but that seems to be quite tricky as some of the tags are applied inconsistently at times. Actually, having a set of well-defined wikis will also help with the (re)tagging policy.

As the number of tags is quite long, I think we might have one CW post per tag, so that there is place for comments on each answer. Also, since it's going to be different to judge when a tag wiki is good enough, vote for a tag wiki only when you are satisfied with its content. Vote count of something between 5 and 10 votes should be enough indication that the tag wiki is generally good, and the moderators (or those of sufficient privileges) can approve them.

The following template seems reasonable:

Tag name (use also the [tag:foo] syntax to have it as a link directly to the tag in question on the main site)

Excerpt:

Description:

The tags, in no particular order:

Related and not-so-popular:

I have probably missed some as well, feel free to edit them in.

• It might be worthwhile to take a second look at meta.tex.stackexchange.com/questions/689/graphics-images-tags Feb 17, 2011 at 16:04
• @Caramdir: My point exactly. Writing the tag wikis will reveal problems and omissions in the current tagging policy: if you can't write easily a description of the tag given the questions being asked using it, then is has probably been applied inconsistently. Feb 17, 2011 at 16:10
• I only saw this question now. I recently edited tag and figure wikis. They should be replaced with the text below... Feb 18, 2011 at 17:30
• It seems includegraphics is clearly covered by figures and graphics... Feb 18, 2011 at 17:34
• @Martin: Could you transfer those suggestions to the actual tag wikis? It would be a shame if they get lost here. Feb 20, 2011 at 17:59
• @Caramdir: I was kind of hoping for some sort of feedback before that, but the plan is to do that eventually when there's a feeling that they are somewhat complete and accurate. My main concern is with the excerpts, which should be sort of a guide to tagging, and I want to have those ones right at least. Feb 20, 2011 at 18:09

# Graphics graphics

Excerpt: Use the {graphics} for general questions regarding inclusion of graphical material in your document, usually from an external file. If you'd like to discuss vector graphics created programmatically inside a TeX document, use the general {diagrams} tag, or preferably the tag for the vector graphics package you use (e.g. {tikz-pgf} or {pstricks}).

Description:

• What about the inclusion of a vector graphic (eps, pdf)? Feb 17, 2011 at 16:13
• @Caramdir: Hmm, yes, but those are the only vector graphics handled by (La)TeX. I wanted to distinguish here from diagrams which use different mechanism of creating the image. Perhaps all the image formats can be mentioned and be done about it. Feb 17, 2011 at 16:15
• I don't understand what the graphics tag is doing that the figure tag isn't already doing. It seems the distinction between them is not that well defined. Feb 18, 2011 at 17:31
• @Seamus: {figure} is for the float-y stuff (referencing, labelling, captioning, positinoning). Think questions "Why my figure is not positioned where I want it to be". While {graphics} is for \includegraphics-y stuff (you can include an image without it being inside a float). The latter bit covers stuff like "How can I include this weird EPS, cropping, zooming, rotating and stretching it to my will" etc. At least this is how I make a distinction between them, but maybe somebody will try to make that more clear.. [hint] Feb 18, 2011 at 19:40
• I see. We should put this info in the tags soon, because I'm sure the distinction would be useful Feb 21, 2011 at 11:30

# Floats floats

Excerpt: The {floats} tag concerns custom-made floats in addition to those already provided by the TeX macro package you use, and concerns issues such as positioning, labelling, indexing, captioning and listing. Use the {tables} or {figures} tags when asking questions about the standard LaTeX floats.

Description: LaTeX offers a few predefined floats, such as tables and figures. There are, however, some cases when one would like to define their own custom float type to distinguish them from the built-in ones, and to provide specific formatting, positioning or captioning.

A common usage scenario is to have a document with several code listings, which are to be referenced in the text as if they were figures, and to provide a list of the code samples in the beginning of the document for easy reference.

For example, the float package can be used to define a new float as follows:

% usage: \newfloat{<type>}{<placement>}{<ext>}[<within>]
% Define a new float named Program, which can be placed either in the top, the bottom
% or on a special page, use the .lop extension for the float file list, and number
% them separately for each section.

\newfloat{Program}{tbp}{lop}[section]
%...

% Here goes the custom float environment:
\begin{Program}
% You can do whatever you like inside, like include some specially formatted text:
\begin{verbatim}
from __future__ import braces
\end{verbatim}

% .. label it for future reference..
\label{prg:myprog}

% .. and give it a caption
\caption{An important program}
\end{Program}

% finally, you might want to include a list of all your glorious code snippets you made:
\listof{Program}


Other packages that can be used to define or modify floats:

# Figures figures

Excerpt: This tag is to be applied to floats created with the figure environment, and deals with issues such as positioning, labelling, captioning, indexing and listing of said floats. Similar issues, but with custom defined floats should be tagged with {floats}.

Description: The figure environment in LaTeX is a common way to include various graphics such as external images, and provides the means to specify their position (or rather, specify preferred position) as well as captioning, labelling and indexing them.

The simplest syntax is shown below:

\begin{figure}[<p>] % <p> can be one of h, t, b, p, H
% figure definition should be somewhere here
% ...

\label{fig:myfig}
\caption{My figure}
\end{figure}


The figure label and caption are not strictly necessary, but are probably desired most of the time.

A list of all figures in the document can be included as well, by using the \listoffigures command.

# Subfigure subfigure

Excerpt: The {subfigure} tag should be applied to questions about composite floats with separately labelled and captioned components, such as arrangement, labelling, positioning, captioning, referencing and indexing. Use the tag for all packages and environments that provide similar behaviour (such as subfigure and subfig, for example).

Description: Sometimes when creating a figure, one would like to have a few graphics laid side-by-side, each of them captioned and labelled, with a separate caption for the whole figure. The subfig package and its predecessor subfigure (now obsolete) are commonly used, with some extra help from the caption package for subcaption customization.

Here's a sample of some general usage:

\begin{figure}
% Usage: \subloat[<list entry>][<subcaption>]{<body>}
\subfloat[First subfigure]{\label{fig:subfloat-2} ...}

% you can optionally use all sorts of horizontal or vertical white space here:
\hspace{1mm}

\subfloat[Second subfigure]{\label{fig:subfloat-1}...}

% You can have a caption for the whole figure ...
\caption{Figure with two subfigures}

% .. and a label to reference it
\label{fig:composite}
\end{figure}


# Diagrams diagrams

Excerpt: The {diagrams} tag should be used to all sorts of plots, schematics, diagrams, graph trees, etc. that are in the form of a vector graphics. If your diagram is created using {tikz-pgf} or {pstricks}, use these tags instead. For raster graphics, such as photos and illustrations, use the {graphics} tag.

Description: While technically in the same category as graphics, diagrams in TeX & Friends are created using specialized languages or sets of macros that allow programmatic manipulation of the elements of the diagram.

Some of the most popular alternatives are:

With the exception of EPS, TeX & Friends have limited support for other vector formats, such as SVG. Diagrams in these formats can be usually converted readily into either PDF or EPS and be included in the document as graphics.

• TikZ/PGF and PSTricks all provide some form of ...picture environment. Therefore I would say we name it pictures or at least create this as an synonym. However, I realize that beginners will sometimes confuse images, graphics and pictures. Feb 22, 2011 at 18:10
• @MartinScharrer: True, but this tag is more for questions like "How can I make a Venn diagram|Carnaugh map|flowchart|network diagram with <favourite graphics package>?" Otherwise, using only the name of the technology in the question should be enough. Meta-tags are kind of discouraged currently. Feb 23, 2011 at 8:33

# Drawing drawing

Excerpt: Use the {drawing} tag when asking questions how to create a particular type of scheme, diagram, notation, or graph. Consider adding a tag for your preferred drawing technology -- {tikz-pgf}, {pstricks}, {xy-pic} etc.

Description