1

Problem:

Trying to fit an image to the upper half of a page but without success.

Minimal Working Example:

\documentclass[export]{article}
\usepackage{graphicx}

\graphicspath{{./figures/},{./chapters/}}

\begin{document}

\thispagestyle{empty}

\begin{figure}[!t]
    \centering
    \includegraphics[width=\paperwidth]{chapter1.jpg}
    \label{fig:fig1}
\end{figure}

\end{document}

Outputs:

enter image description here

Desired output:

To make the image cover exactly the upper half of the page, starting from the top-left corner.

kexxcream
  • 2,815

1 Answers1

1

There are several packages that permit to use absolute positioning (see What are the ways to position things absolutely on the page? or its linked questions)

What follows is a solution made with TikZ. It needs two compilations to obtain the correct result.

\documentclass{article}
\usepackage{tikz}

\begin{document}

\thispagestyle{empty}

\begin{tikzpicture}[remember picture, overlay]
\node[anchor=north west, inner sep=0pt] at (current page.north west) {\includegraphics[width=\paperwidth, height=.5\paperheight]{example-image}};
\end{tikzpicture}

\end{document}

enter image description here

Ignasi
  • 136,588