I've been learning LaTeX and this community has been very helpful. Currently, I'm trying to set up corporate letters but as a newbie I'm encountering a variety of challenges, so I'm posting them one by one instead of putting it in the comments... maybe this helps others as well.

Anyway, I am trying to implement this answer that indicates that I can use vbox to float an image to the right of my header. I almost have this working, but I now try to adjust this to get my logo to stick to the top of the page. So I want to have this at the right top of my document. This is quite difficult! When I place the vbox, it creates unwanted spacing, for some odd reason. So I can not get the logo to be at the right top, even though I 'reset' every possible margin to 0 (in my opinion). Here is my distilled code:

The latest TUGboat has an article about designing letters with the hletter package. If you haven't had a chance to look at it then it may be worth your while because it may save you some work.
–
Marc van DongenFeb 11 '12 at 6:55

4 Answers
4

The \vbox is anchored to the baseline. Also, since there is an additional \topskip at the top of the page between the header and the first line of text. So, jumping vertically -\baselineskip-\topskip pushes the \vbox of height 0pt tight against the upper part of the page boundary.

\dimexpr...\relax is used as a dimension expression for combining lengths (or dimensions). You can also include the calc package which allows you to forego this notation and use -\baselineskip-\topskip as is;

I use \setlength rather than \<len>=<dim> - that's just the LaTeX way; the latter is the TeX way;

margin=0cm is equivalent to left=0cm,right=0cm,bottom=0cm,top=0cm in geometry, so I dropped top=0cm;

I set \fboxsep to -\fboxrule. This way the rule is actually drawn within the bounding box. Otherwise it would add .4pt to each of the sides (a total of .8pt vertically and horizontally) even if you use \setlength{\fboxsep}{0pt};