[Tex/LaTex] Changing Figure label to Map or some other label

captions

I am writing a report that has graphics, photos and maps. If I use the figure environment everything is labeled as a figure in the caption. However, what I would like to do is where I have a map to have the map labeled appropriately e.g. Map 1: caption text; Map 2: caption text etc and to be able to refer to it in the text Map \ref{map01}. Same as for Photographs.

I have looked at some of the FAQs but does not seem to have what I want. Is it possible.

Best Answer

If you use the tocbasic package from the KOMA-Script bundle you can also print a list of photos and a list of maps.

\documentclass{article}
\usepackage{tocbasic}
\DeclareNewTOC[%
  type=photo,
  float,
  name=Photo,
  listname={List of Photos},
  ]{pho}
\DeclareNewTOC[%
  type=map,
  float,
  name=Map,
  listname={List of Maps},
  ]{map}
\makeatletter
% entries to the lists should have the same layout like entries to the list of figures
  \renewcommand\l@photo{\l@figure}
  \renewcommand\l@map{\l@figure}
\makeatother
\begin{document}
\listoffigures
\listofphotos
\listofmaps

\begin{figure}[ht] \centering\fbox{Figure}\caption{A figure} \end{figure}
\begin{photo}[ht] \centering\fbox{Photo}\caption{A photo} \end{photo}
\begin{map}[ht] \centering\fbox{Map}\caption{A map} \end{map}
\end{document}

enter image description here

There is also a nonfloat option for \DeclareNewTOC. It defines the (additional) nonfloating environment <name>- (for example photo-).

Related Question