Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have an introduction chapter defined with the command:

\chapter*{Introduction}

The captions of the figures within this chapter, that doesn't have a number like the others, are named:

"Figure 1", "Figure 2", etc.

then when I reference a figure with \ref{labelname} I see a number like 1,2 etc.

I don't like this way to reference a figure, because isn't like the other chapters. The captions of the first chapter for example are:

"Figure 1.1", "Figure 1.2" etc.

I'd like that the captions of the figures in the introduction to be:

"Figure I.1", "Figure I.2" etc.

then when I reference a figure with \ref{labelname} I see a number like I.1, I.2 etc. How can I do that?

Here an example code:

\documentclass[a4paper]{book}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}


\begin{document}
\chapter*{Introduction}
\lipsum[1]
\begin{figure}[h!]
\vspace{2cm}
\label{fig:intro}
\caption{Figure in the introduction}
\end{figure}

Look at the Fig.~\ref{fig:intro}. 
I want it referenced as Fig.~I.1.

\chapter{A sample chapter}
\lipsum[1]

\begin{figure}[h!]
\vspace{2cm}
\label{fig:chap1}
\caption{Figure in chapter 1}
\end{figure}

Look at the Fig.~\ref{fig:chap1}. 

\chapter*{Conclusion}
\lipsum[1]
\begin{figure}[h!]
\vspace{2cm}
\caption{Figure in the conclusion}
\label{fig:conc}
\end{figure}

Look at the Fig.~\ref{fig:conc}.
I want it referenced as Fig.~C.1.

\end{document}
share|improve this question
1  
Please provide a small MWE so that we don't have to construct a document for you. Easier for us to play around. –  LaRiFaRi Mar 9 at 10:30

1 Answer 1

up vote 4 down vote accepted

This is a very simple solution. Notice! I moved the label below the caption statement.

\documentclass[a4paper]{book}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lipsum}


\begin{document}
\chapter*{Introduction}
\renewcommand{\thefigure}{I.\arabic{figure}}
\lipsum[1]
\begin{figure}[h!]
\vspace{2cm}
\caption{Figure in the introduction}
\label{fig:intro}
\end{figure}

Look at the Fig.~\ref{fig:intro}.
I want it referenced as Fig.~I.1.

\chapter{A sample chapter}
\renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
\lipsum[1]

\begin{figure}[h!]
\vspace{2cm}
\caption{Figure in chapter 1}
\label{fig:chap1}
\end{figure}

Look at the Fig.~\ref{fig:chap1}.

\end{document}
share|improve this answer
    
Thank you! It works well! But I have another problem... if I write a conclusion chapter like the introduction, the the figure within the conclusion are referenced starting from the last figure number in the last chapter. –  nunzio13n Mar 9 at 13:45
    
What's your goal? –  Oliver Mar 9 at 13:49
    
I have edited the question, but I have solved it by adding the line \setcounter{figure}{0} before the commend \renewcommand in the conclusion. –  nunzio13n Mar 9 at 13:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.