1

I have a logo above my title. However, it is taking too much space, causing there to be very little content on the first page. How can I move everything up?

I definitely can reduce the margin, but I do want to limit the effect with this 1st page only.

MWE

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

\title{ \includegraphics[width=0.5\textwidth]{logo}\ The Title } \author{% The Author } \date{\today}

\begin{document}

\maketitle

\end{document}

1 Answers1

3

Here, I \smashed the graphic, so that it appears to TeX to take up zero vertical space. If you need it higher, let me know.

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

\title{
\leavevmode\smash{\includegraphics[width=0.5\textwidth]{logo}}\\
The Title
}
\author{%
  The Author
}
\date{\today}

\begin{document}

\maketitle

\end{document}

enter image description here

  • This is so awesome! Exactly what I want! Thank you, sir! I would also very much appreciate if you could very briefly explain what the magic smash does, and why it yields a "just right" spacing from the top edge. – Sibbs Gambling Oct 17 '14 at 16:39
  • @FarticlePilter \smash doesn't alter it's argument, but convinces LaTeX that its vertical dimension is 0cm. Therefore, the bottom edge of the image is located the same place the bottom edge of a (for example) where a period would sit (if you replaced your image with a .). If the image were too tall, it could run off the top of the page (glad that didn't happen in your case). So in this instance, the "correct" spacing was a bit fortuitous. From that point, the \\ inserts a linefeed so that The Title is on a new line below the image. – Steven B. Segletes Oct 17 '14 at 16:43
  • @FarticlePilter Another apprach would be to place the image independently on the page, using something like this: http://tex.stackexchange.com/questions/169808/what-are-the-ways-to-position-things-absolutely-on-the-page/169831#169831, and then using your \title macro with just a text argument. – Steven B. Segletes Oct 17 '14 at 16:50