0

I haven't used LaTeX for a while now, and in my document I put a image as my first page, however if I do \newpage and write something new, it gets moved to the first page, instead of the picture:

\documentclass[a4paper]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[ansinew]{inputenc} 
\usepackage[pdftex]{graphicx}
\usepackage{atbegshi}
\usepackage{wasysym}
\setlength{\parindent}{0pt}
\pagenumbering{gobble}

\begin{document}
\begin{figure}

\centerline{\includegraphics[scale=0.9]{Bilder/Deckblatt.png}}

\end{figure}
\end{document}
siracusa
  • 13,411

1 Answers1

1

As others have noted, you may wish to simply not use a float environment, like figure.

In this case, you could use:

\begin{center}
    \includegraphics[scale=0.9]{Deckblatt}
\end{center}

Note also, that it is generally best to omit your image extensions from your \includegraphics commands. Also, it is best to delineate graphics paths, via \graphicspath, and not an explicit specification. So for the above to work, you would add \graphicspath{{Bilder/}} somewhere in your preamble, after loading graphicx.

You may, however, want your figure to float, but not beyond a certain point. In that case, you can use a \FloatBarrier, from the placeins package.

Coby Viner
  • 1,939
  • Would you mind to explain, "it is generally best to omit your image extensions from your \includegraphics commands"? :-) – hola Jun 07 '19 at 23:16
  • ... And when I used \graphicspath instead of absolute paths, apparently it was taking more time to compile... :-) – hola Jun 07 '19 at 23:18
  • @pushpen.paul LaTeX's graphicx will generally correctly resolve the extension, selecting a good option, depending upon the TeX engine in use (see: https://tex.stackexchange.com/a/1075/134641). It is better to allow this to occur automatically, rather than specify it manually, unless one has a good reason to do so.

    It is possible for \graphicspath to increase compilation time, but it should not be substantial and is worthwhile, IMO. This post might be useful, in this regard: https://tex.stackexchange.com/a/472938/134641

    – Coby Viner Jun 08 '19 at 00:00