# How to typeset a cover page with an image

Say I have a book title I want to typeset using latex:

 __________________
|                  |
|   ____________   |
|  |            |  |
|  |            |  |
|  |            |  |
|  |            |  |
|  |   IMAGE    |  |
|  |            |  |
|  |            |  |
|  |            |  |
|  |            |  |
|   ____________   |
|                  |
|                  |
|            Title |
|__________________|


The image is a transparent PNG of an organic subject so you won't actually see a rectangle. The image is just scaled down (from lets say 1500x3000px to however it should be scaled to fit on an 8x10 book cover. The the title goes below the image on the right. I have basically this MWE:

\documentclass[twoside,a4paper,4mm,5mm]{book}

\usepackage[dvipsnames]{xcolor}
\usepackage{fontspec}
\usepackage{titlesec}
\usepackage{fullpage}
\usepackage{geometry}
\usepackage{sectsty}
\usepackage{graphics}
\usepackage{wallpaper}
\hypersetup{
citecolor=black,
filecolor=black,
urlcolor=black
}

\renewcommand{\contentsname}{Contents}
\setmainfont[Ligatures=TeXReset]{MyMonospaceFont}
\newlength{\characterwidth}
\setmonofont{black}[
Scale=MatchLowercase
]
\settowidth{\characterwidth}{\normalfont x}
\geometry{
left=24mm,
right=24mm,
top=24mm,
bottom=40mm,
footskip=24mm
}
\AtBeginDocument{\raggedright}
\frenchspacing

\makeatletter
\renewcommand\tableofcontents{%
\@starttoc{toc}%
}
\makeatother

\titleformat{\chapter}[display]
{\filleft\Huge\bfseries\null\vfill\fontsize{8mm}{12mm}\selectfont}
{\thechapter}
{0pc}
{}
[\newpage]

\definecolor{G1}{HTML}{777777}

\newcommand{\ga}[1]{\textcolor{G1}{#1}}

\usepackage{fancyhdr}

\chapterfont{\fontsize{8mm}{12mm}\selectfont}
\sectionfont{\fontsize{4mm}{6mm}\selectfont}
\paragraphfont{\fontsize{4mm}{6mm}\selectfont}

\renewcommand{\l}[1]{\input{#1}}
\newcommand{\s}[1]{\section*{#1}}
\newcommand{\p}[1]{\paragraph*{#1}}
\renewcommand{\t}[2]{
\begin{titlepage}
\null\vfill
\begin{flushright}
\fontsize{16mm}{24mm}\selectfont #1

\fontsize{8mm}{12mm}\selectfont #2
\end{flushright}
\thispagestyle{empty}
\end{titlepage}
}
\renewcommand{\o}{\tableofcontents}
\renewcommand{\i}[1]{\includegraphics{#1}}

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\footrulewidth}{0pt}
\fancyfoot[R]{\fontsize{4mm}{6mm}\selectfont \thepage}
\fancypagestyle{plain}{
\fancyhf{}
\fancyfoot[R]{}
}
\fancypagestyle{empty}{
\lfoot{}
\cfoot{}
\rfoot{}
}

\begin{document}

% first page is cover of book.

\begin{center}
\i{img.png}
\end{center}

\begin{titlepage}
\null\vfill
\begin{flushright}
\fontsize{100mm}{120mm}\selectfont #1
\thispagestyle{empty}
\end{titlepage}

% chapters of book

% back cover of book


How to accomplish this? Ideally it would be possible to do this on a cover and a "back cover" page too :)

• The biggest aspect is how to position the image and the title in the right place. Aug 27 '19 at 4:13
• @LancePollard Please use \begin{picture}...\end{picture} tags for position the image... Aug 27 '19 at 5:04
• @MadyYuvi please show how, just adding that gives me all kinds of errors. Aug 27 '19 at 5:44
• @LancePollard I meant that you can use the picture environment to position the image in an easy manner, e.g., \begin{picture)(0,0)\put(0,0){\includegraphics{...eps}}\end{picture}, I didn't mean other than this... Aug 27 '19 at 5:52
• Doing your last comment I end up with this, where it should show a complete figure it only shows a portion, and the title is pushed to page 3 :/ imgur.com/EuZsOXS Aug 27 '19 at 7:19

Using textpos is a possibility. You place the image in one textblock-environment and title in another and change the the coordinates to suite you.

It is not necessary to define a macro for each element, but it is then easy to change layout if you have many items.

\documentclass[demo]{article}

\usepackage[absolute]{textpos}
\usepackage{graphicx}
\setlength{\TPHorizModule}{1mm}
\setlength{\TPVertModule}{1mm}

\DeclareRobustCommand*{\image}{%
\begin{textblock}{200}(20,20)
\includegraphics*[height=200mm, width=160mm]{C:/temp/lisa-simpson.png}%
\end{textblock}%
}

\DeclareRobustCommand*{\mytitle}{%
\begin{textblock}{150}(130,230)
\Huge\bfseries This is my title%
\end{textblock}%
}

\begin{document}

\image
\mytitle

\end{document}