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 want to be able to position a chunk of text (which could be anything, could have \includegraphics, and could be on multiple lines) at the center of a page horizontally. However, I want to be able to customize its vertical position, say 4 inches from the top.

This chunk should be independent of the document's normal contents. So it should affect anything else on the page.

Is this possible?

share|improve this question
    
Have you tried with \vspace{}? –  Thanos Oct 7 '12 at 18:39
    
@Thanos That would mess up the rest of the document, I guess? –  MayGodBlessKnuth Oct 7 '12 at 18:40
2  
I would think placing it with something like textpos, background, eso-pic or tikz would be necessary to place stuff on the page and not affect everything else. –  Werner Oct 7 '12 at 18:50
    
Actually I am not so sure about what are you trying to do. The \vspace{} command creates a vertical space on the exact position(and only) you'd like. Try it and see if it will ruin the rest of the document. –  Thanos Oct 7 '12 at 18:51
    
What do you mean by "independent"? Should it not clash with anything else or should it? –  doncherry Oct 7 '12 at 18:52
add comment

1 Answer

up vote 6 down vote accepted

Is this what you're looking for?

\documentclass{article}

\usepackage[absolute]{textpos}
    \setlength{\TPHorizModule}{1in} % sets our horizontal unit of measuring
    \setlength{\TPVertModule}{1in} % sets our vertical unit of measuring
    \textblockorigin{0mm}{0mm} % and we start measuring in the top left corner

\usepackage[letterpaper]{geometry} % I'm assuming you're using letter paper if you use inches

\usepackage{lipsum} % just for filler text

\begin{document}
\begin{textblock}{8.5}(0,4)\centering
  % 8.5 = width of the block
  % 0 = zero horizontal units away from our origin
  % 4 = four vertical units away from our origin
\fbox{\Huge\textsc{Hello World}}
  % the \fbox isn't necessary -- you can put here whatever you want.
\end{textblock}

\lipsum[1-4] % to provoke the clash

\end{document}

output

share|improve this answer
add comment

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.