1

Why do the words "where are we?" appear, not as expected below the HLine, but within the header?

mwe1.tex

\documentclass[a6paper,8pt]{extarticle} 
\usepackage{graphicx,fancyhdr}
\usepackage[hidelinks]{hyperref}
\usepackage{fontspec}
\usepackage[
    margin=5mm
]{geometry}
\fancyhead[L]{
    \begin{tabular}{l}
        \textbf{bladiliboo}  \\
        \textbf{\textit{bladilibli}}\\
        \textbf{\fontspec[FakeSlant=-0.5]{Arial Italic}blabrrr}\\
        \href{http://www.google.com/}{http://www.google.com/}
    \end{tabular}
    \vspace{0.05cm}
}
\fancyhead[R]{\vspace{1cm}\includegraphics[width=5.5cm]{logoPlaceholder}}
\pagestyle{fancy}


\newlength\FHleft
\newlength\FHright

\setlength\FHleft{0cm}
\setlength\FHright{5.7cm}

\newbox\FHline
\setbox\FHline=\hbox{\hsize=\paperwidth%
  \hspace*{\FHleft}%
  \rule{\dimexpr\headwidth-\FHleft-\FHright\relax}{\headrulewidth}\hspace*{\FHright}%
}
\renewcommand\headrule{\vskip-1.1\baselineskip\copy\FHline}
\setlength\parindent{0pt}
\begin{document}
    where are we?\\
\end{document}

Now the logoPlaceholder.eps:

%!PS-Adobe-3.0 EPSF-3.0
%%Creator: cairo 1.15.6 (http://cairographics.org)
%%CreationDate: Tue Jun 26 14:39:09 2018
%%Pages: 1
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%BoundingBox: 0 0 176 43
%%EndComments
%%BeginProlog
save
50 dict begin
/q { gsave } bind def
/Q { grestore } bind def
/cm { 6 array astore concat } bind def
/w { setlinewidth } bind def
/J { setlinecap } bind def
/j { setlinejoin } bind def
/M { setmiterlimit } bind def
/d { setdash } bind def
/m { moveto } bind def
/l { lineto } bind def
/c { curveto } bind def
/h { closepath } bind def
/re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto
      0 exch rlineto 0 rlineto closepath } bind def
/S { stroke } bind def
/f { fill } bind def
/f* { eofill } bind def
/n { newpath } bind def
/W { clip } bind def
/W* { eoclip } bind def
/BT { } bind def
/ET { } bind def
/pdfmark where { pop globaldict /?pdfmark /exec load put }
    { globaldict begin /?pdfmark /pop load def /pdfmark
    /cleartomark load def end } ifelse
/BDC { mark 3 1 roll /BDC pdfmark } bind def
/EMC { mark /EMC pdfmark } bind def
/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def
/Tj { show currentpoint cairo_store_point } bind def
/TJ {
  {
    dup
    type /stringtype eq
    { show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse
  } forall
  currentpoint cairo_store_point
} bind def
/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore
    cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def
/Tf { pop /cairo_font exch def /cairo_font_matrix where
      { pop cairo_selectfont } if } bind def
/Td { matrix translate cairo_font_matrix matrix concatmatrix dup
      /cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point
      /cairo_font where { pop cairo_selectfont } if } bind def
/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def
      cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def
/g { setgray } bind def
/rg { setrgbcolor } bind def
/d1 { setcachedevice } bind def
/cairo_flush_ascii85_file { cairo_ascii85_file status { cairo_ascii85_file flushfile } if } def
/cairo_image { image cairo_flush_ascii85_file } def
/cairo_imagemask { imagemask cairo_flush_ascii85_file } def
%%EndProlog
%%BeginSetup
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
%%PageBoundingBox: 0 0 176 43
%%EndPageSetup
q 0 0 176 43 rectclip
1 0 0 -1 0 43 cm q
0 g
0.75 w
0 J
0 j
[] 0.0 d
4 M q 1 0 0 1 0 0 cm
0.555 0.215 m 0.574 0.242 l S Q
q 1 0 0 1 0 0 cm
0.625 42.699 m 0.293 42.285 l S Q
q 1 0 0 1 0 0 cm
175.301 42.75 m 175.25 42.555 l S Q
q 1 0 0 1 0 0 cm
175.27 0.043 m 175.285 0.191 l 175.301 0.289 l S Q
Q Q
showpage
%%Trailer
end restore
%%EOF
Will A.
  • 77
  • 4
  • 1
    when fancyhdr screams at you on the terminal: Package Fancyhdr Warning: \headheight is too small (12.0pt): Make it at least 65.73636pt. We now make it that large for the rest of the document. This may cause the page layout to be inconsistent, however. it means you should do as it suggests – David Carlisle Jun 26 '18 at 12:59
  • Thanks. But when I add the following line to the geometry package arguments, I lose the header entirely! – Will A. Jun 26 '18 at 13:04
  • \usepackage[ margin=5mm, headheight=66pt ]{geometry} – Will A. Jun 26 '18 at 13:04
  • start with \usepackage[margin=100pt, headheight=70pt ]{geometry} then adjust to what you need – David Carlisle Jun 26 '18 at 13:11
  • thank you, but having the remaining margin=5mm is essential. – Will A. Jun 26 '18 at 13:17
  • yes but if you can see it it's easier to adjust your image positioning so it is not so high, then you can reduce the margin again while keeping it on the page I just set margin for simplicit of debugging, you can control just top margin with geometry as well – David Carlisle Jun 26 '18 at 13:20

0 Answers0