# How to change caption in a figure?

Let us consider the following example:

\documentclass{book}
\usepackage{graphicx}

\begin{document}
\title{\textbf{ \Huge{My \LaTeX}}}
\author{\textbf{MKS}}
\date{\today}
\maketitle

\begin{figure}[c]
\begin{center}

\rotatebox{0}{\scalebox{.40}{\includegraphics{fig1.png}}}
\caption{This is a Flower}

\end{center}
\end{figure}

\end{document}


This gives :

That is they take two different pages. I want to do it in a single page as well as I want to change the caption given in the following figure :

\begin{figure}[c]


figure does not have a c option so that is a syntax error, but this image appears to be part of the title layout so not a float at all so you do not want the figure environment at all.

\begin{center}


OK although it introduces vertical space

\rotatebox{0}{\scalebox{.40}{\includegraphics{fig1.png}}}


\rotatebox{0} (as has been previously noted) is just an inefficient way of doing \mbox \scalebox can be more simply done by using the scale options on the graphic.

\caption{This is a Flower}

\end{center}


Just use

\begin{center}
\includegraphics[scale=0.4]{fig1.png}

This is a flower
\end{center}


In the case of book you need to add this to \maketitle (oruse the titlepage environment.

\documentclass{book}
\usepackage[demo]{graphicx}

\begin{document}
\title{\textbf{ \Huge{My \LaTeX}}}
\author{\textbf{MKS}}
\date{\today}

\newcommand\titleimage{%
\begin{center}
\includegraphics{fig1.png}
\par
This is a Flower
\end{center}}

\maketitle

\end{document}

• \maketitle is placed on a separate page in book, is it not? The OP wanted title and image on the same page. – Torbjørn T. Apr 9 '13 at 9:17
• @TorbjørnT. thanks didn't notice book, will update – David Carlisle Apr 9 '13 at 9:27
• Thank you @DavidCarlisle. My one problem is solved. But the other yet not.For this cooperation +1 for you. – Md Kutubuddin Sardar Apr 9 '13 at 9:33
• @MdKutubuddinSardar code updated for book – David Carlisle Apr 9 '13 at 22:29

use the environment titlepage

\documentclass{book}
\usepackage{graphicx,caption}

\begin{document}
\begin{titlepage}
\begin{center}
\textbf{\Huge My \LaTeX}

\vspace{1cm}
\textbf{MKS}

\vspace{1cm}
\today

\vspace{2cm}
\rotatebox{0}{\scalebox{.40}{\includegraphics{flower}}}
\captionof*{figure}{This is a Flower}
\end{center}
\end{titlepage}

foo

\end{document}


You can try by using the titlepage environment. As per LaTeX Wikibook:

\begin{titlepage}
\begin{center}

% Upper part of the page. The '~' is needed because \\
% only works if a paragraph has started.
\includegraphics[width=0.15\textwidth]{./logo}~\\[1cm]

\textsc{\LARGE University of Beer}\\[1.5cm]

\textsc{\Large Final year project}\\[0.5cm]

% Title
\HRule \\[0.4cm]
{ \huge \bfseries Lager brewing techniques}\\[0.4cm]

\HRule \\[1.5cm]

% Author and supervisor
\begin{minipage}{0.4\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
John \textsc{Smith}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{flushright} \large
\emph{Supervisor:} \\
Dr.~Mark \textsc{Brown}
\end{flushright}
\end{minipage}

\vfill

% Bottom of the page
{\large \today}

\end{center}
\end{titlepage}


The result will be something like this: