4

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 :

enter image description here
enter image description here 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 :

enter image description here

3 Answers3

5
\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.

enter image description here

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

\long\def\addimage#1\vfil#2\vfil#3!!{\def\maketitle{#1\vfil#2\titleimage\vfil#3}}
\expandafter\addimage\maketitle!!

\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} 
David Carlisle
  • 757,742
3

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}

enter image description here

1

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:

enter image description here

Moriambar
  • 11,466
Mario S. E.
  • 18,609