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.

Based on the utilities provided by the class memoir, I'd like to set a line of typographer's ornaments along the page top of a custom size stock paper (actually, along the four page edges, but my question refers only to the top edge). In order to do so, I thought of setting the baseline of my header right at the very top of the page by declaring a 0pt head height and a 0pt head drop -- terms introduced in the class documentation --, but for some reason I end up with a distance from the top of the page to the baseline of the header which amounts to my font's declared normalsize (in the MWE below, this is 11pt). What am I doing wrong?

\documentclass[11pt]{memoir}

\usepackage{calc,pstricks}

\setstocksize{20cm}{20cm}
\settrimmedsize{\stockheight}{\stockwidth}{*}
\setlrmarginsandblock{\paperwidth * 1/10}{*}{1}
\setulmarginsandblock{4\baselineskip}{3\baselineskip}{*}  
\setheadfoot{0pt}{3\baselineskip}
\setheaderspaces{0pt}{*}{*}
\checkandfixthelayout

\setlength{\headwidth}{\paperwidth}
\makepagestyle{mainpage}
\makerunningwidth{mainpage}{\headwidth}
\makeheadposition{mainpage}{}{}{}{}
\makepsmarks{mainpage}{%
\nouppercaseheads
\makeoddhead{mainpage}{\rput[tl]{0}(0,0){Hello}}{}{}
\makeoddfoot{mainpage}{}{}{}
\makeevenhead{mainpage}{}{}{}
\makeevenfoot{mainpage}{}{}{}
}
\pagestyle{mainpage}

\begin{document}
Testing document
\end{document} 

In the MWE above, the command \rput from PSTricks is used only to type the top left-hand corner of the box containing the header text ("Hello") on the header baseline.

share|improve this question
    
May I ask: why do you want to do this? This seems not to be a good typography. –  Kurt Sep 12 '12 at 22:50
    
@Kurt: Sure you may. This is actually in order to set ornamental items all around the four page edges. I'd like to place the top of the corresponding boxes for the top edge items right on the page top, and they should belong in the headers and the footers. –  Marcos Sep 12 '12 at 22:58
1  
Ah, okay. Then I suggest you change the title of your question and edit your question to make quite clear what you want. I think that's the reason you got no answers till now. –  Kurt Sep 12 '12 at 23:05
    
@Kurt. Thanks for the suggestion, which I have just followed. –  Marcos Sep 13 '12 at 3:18
1  
I think the easiest is to use \raisebox{\baselineskip}{\rput[tl]{0}(0,0){Hello}}. –  Werner Sep 13 '12 at 5:38

1 Answer 1

You can't set the head height to zero, since TeX wants to put something in it which will never fit. Your option here would be to set a regular, acceptable head height (of height \baselineskip, say) and raise the elements into position. This is achievable via

enter image description here

\documentclass[11pt]{memoir}% http://ctan.org/pkg/memoir
\usepackage{showframe}% http://ctan.org/pkg/showframe

\setstocksize{20cm}{20cm}
\settrimmedsize{\stockheight}{\stockwidth}{*}
\setlrmarginsandblock{.1\paperwidth}{*}{1}
\setulmarginsandblock{4\baselineskip}{3\baselineskip}{*}  
\setheadfoot{\baselineskip}{3\baselineskip}
\setheaderspaces{0pt}{*}{*}
\checkandfixthelayout

\makepagestyle{mainpage}
\makerunningwidth{mainpage}{\headwidth}
\makeheadposition{mainpage}{}{}{}{}
\makepsmarks{mainpage}{%
  \nouppercaseheads
  \makeoddhead{mainpage}{Hello}{}{}
  \makeoddfoot{mainpage}{}{}{}
  \makeevenhead{mainpage}{}{}{}
  \makeevenfoot{mainpage}{}{}{}
}
\pagestyle{mainpage}

\begin{document}
Testing document
\end{document}

Of course, you can replace Hello with \raisebox{\baselineskip}[0pt][0pt]{<stuff>} to raise the contents yet add to vertical height.

share|improve this answer

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.