Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to lay out the following:

XXXXXXX Title
XXXXXXX Subtitle
XXXXXXX Maybe even a date!
XXXXXXX
XXXXXXX


Content, content, content ...

The X's are an image (a logo), and the text is just off to the side. This is sort of a title to a page - not a float, so figures and captions seem wholly inappropriate: this needs to be rendered where it appears in the text, which will be kind of the top of the file. \maketitle is just too bulky, and this should have a more branded feel.

\begin{document}
% What goes here?
\includegraphics{the_logo.pdf}
Title \\ Subtitle \\ Maybe even a date!
% </what goes here>

Content, content, content...
\end{document}

I appreciate that LaTeX generally handles formatting for me, but on the occasions I want to take control of the layout, it seems next to impossible...

share|improve this question
    
Is your problem with the position and/or size of the text? I would try using the graphpap package. It will allow you to create a sort of grid so that you can put objects at the exact coordinates that you specify. –  Kristen Nov 12 '10 at 18:00
    
@Kirsten: Position mostly. I would like Tex to figure out where to put the text, given the size of the image and all. I tried tables, but couldn't figure out how to get vertical alignment or line breaks in it. I tried frames and boxes, but can't figure out line breaks. –  Thanatos Nov 12 '10 at 18:25
6  
Since you’re death, … SHOULDN’T YOU BE SPEAKING IN CAPITALS? –  Konrad Rudolph Nov 12 '10 at 20:24
2  
@Konrad Rudolph, LMAO! (BTW, smallcaps, actually, hence the attraction to TeX ;) ). –  Geoffrey Jones Nov 13 '10 at 0:31

1 Answer 1

up vote 12 down vote accepted
  • A tabular environment, parboxes or minipages could be used.

  • Specify an alignment option, for \parbox and minipage choose [t].

  • To avoid alignment problems (\includegraphics sets the baseline to the bottom of the picture) insert \vspace{0pt} before \includegraphics.

  • The same trick helps with the aligment of a text line, so you might need it in a second minipage too.

  • Be careful with boxes or minipages when trying to fit the text width, use % to avoid additional space in the output because of a line break acting like whitespace.

Here's a small example showing how you could start:

\documentclass{article}
\newcommand{\mytitle}[1]{\LARGE \textbf{#1}\par}
\newcommand{\mysubtitle}[1]{\large\textbf{#1}\par}
\newcommand{\mydate}[1]{\small #1\par}
\usepackage[demo]{graphicx}
\begin{document}
\noindent%
\begin{minipage}[t]{.3\textwidth}
\vspace{0pt}\includegraphics[width=3cm,height=3cm]{test}
\end{minipage}%
\begin{minipage}[t]{.7\textwidth}
\vspace{0pt}
\mytitle{Title}
\mysubtitle{Subtitle}
\mydate{\today}
\end{minipage}

\bigskip
\noindent Content, content, content ...
\end{document}

Output:

alt text

share|improve this answer
    
This is closer than I've ever gotten. Is there a way to use the minipage without having to specify the width? I'd like the minipages to shrink to the content, ideally. I can shrinkwarp the left (logo) minipage with \settowidth on the image... is there some way to do \textwidth - \mylogowidth (where \mylogowidth is a length of the logo's width?) –  Thanatos Nov 13 '10 at 19:24
    
Actually, found \addtolength (is there a subtract?) and multiplied what I was subtracting by -1. Looks pretty good now, and doesn't rely on any magic numbers. Thanks! –  Thanatos Nov 13 '10 at 19:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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