2

I'm working on a title page (this is my first day of LateX) and I want to start a titlepage with a picture that touches the top and the sides of the page, without changing its aspect ratio on A4 paper.

I fail to achieve neither result. Any tips?

##This is how far I've got: ##

    \documentclass[10pt,a4paper]{report}

    %% Font  %% Mathematics

    \usepackage[utf8]{inputenc}

    \usepackage{amsmath}

    \usepackage{amsfonts}

    \usepackage{amssymb}

    %% Graphics
    \usepackage{graphicx}

    \begin{document}

    %% Titlepage
    \newpage

    \begin{center}    
        \includegraphics[width=\linewidth]{Green.png}
    \end{center}
    \end{document}
  • Already found out how to make it fill out the page horizontally: "\noindent\makebox[\textwidth]{\includegraphics[width=\paperwidth]{Green.png}}" – snoram Oct 15 '14 at 19:17
  • 1
    You can use the \titlepage environment for custom your title page easily. – Aradnix Oct 15 '14 at 19:23
  • 1
    Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Please format code as code rather than as a quotation (indent 4 spaces by highlighting and hitting the {} button), and always post a complete small document (in this case, remembering that whatsoever is begun must be ended). It is also best to use an image everyone has. The mwe package provides various place-holder images which you can use for this purpose. Or you can specify the width and height and add the demo option to graphicx. – cfr Oct 15 '14 at 19:23
  • You might want to look at wallpaper or background. These are designed, as the names suggest, to put stuff behind the page. However, you can use them to easily ignore the page geometry and then add an appropriate amount of vertical space at the top of the title page to compensate. You definitely do not want to use the center environment which add vertical space itself. (Try \centering in the titlepage environment.) The titling package may also be helpful. – cfr Oct 15 '14 at 19:26
  • Solved for the time being: \ThisULCornerWallPaper{1}{Green.png} and \usepackage{wallpaper}. Thanks everyone! – snoram Oct 15 '14 at 21:59
3

Based on my answer at What are the ways to position things absolutely on the page?, I provide this MWE, and use \atxy{}{}{} to place the image at (0,0) on the page.

The only quirk is that you must place the residual page text lower on the page manually, to avoid overlap. Here, I used a \vspace.

\documentclass[10pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
%% Graphics
\usepackage{graphicx,stackengine}
\usepackage{everypage}
\usepackage{xcolor}
\usepackage{lipsum}
% THESE ARE LaTeX DEFAULTS; CAN CHANGE IF NEEDED.
\def\PageTopMargin{1in}
\def\PageLeftMargin{1in}
\newcommand\atxy[3]{%
 \AddThispageHook{\smash{\hspace*{\dimexpr-\PageLeftMargin-\hoffset+#1\relax}%
  \raisebox{\dimexpr\PageTopMargin+\voffset-#2\relax}{\textcolor{red}{#3}}}}}
% VERIFIED THAT SETTING \hoffset AND \voffset DO NOT BREAK SOLUTION.
%\hoffset=0.4in
%\voffset=0.2in
\atxy{0in}{0in}{\belowbaseline[0pt]{\includegraphics[width=\paperwidth]{snow}}}
    \begin{document}
    %% Titlepage
\vspace*{3in}
\lipsum[1]
    \end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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