bondmatt wrote:[…] I was able to solve my issue by changing the document class from report to article.[…]
That's not a real solution but an evasion of the problem
bondmatt wrote:[…] If I remove this my graphics do not appear. […]
I doubt that. Packages like
graphicx do best in choosing the correct driver on their own. Furthermore XeLaTeX accepts EPS, JPG, PNG and PDF as format for external graphics files. But unfortunately you neither didn't tell us what the format of your company logo is nor did you attach it to one of your posts to
make your example compilable for others.
bondmatt wrote:[…] If you could explain this I would appreciate it. What I have works for some reason. I don't find the fancy header manual very useful for what I am doing (just putting a graphic in the header). […]
Then you have to learn how to extract relevant information from a manual and apply this to your problem. Compared with others, the
fancyhdr manual is one of the simplest manuals around. Such a package is very useful here because without it you wouldn't manage at all to get a kind of logo into the document header.
What you are trying to achieve is usually done as shown in the below code. Note that
this example is for pdfTeX because the
demo
option for
graphicx does not work with XeTeX for some reason. But you can click on "Open in writeLaTeX" to see the output instantly.
Code: Select all
% !TeX program = pdflatex
\documentclass[11pt]{report}
\usepackage[T1]{fontenc} % <<< drop this when compiling with XeLaTeX
\usepackage[
letterpaper,
includeheadfoot,
margin=0.8in,
headheight=105pt
]{geometry}
\usepackage[demo]{graphicx} % <<< drop `demo` option in actual document
\usepackage{lastpage}
\usepackage{fancyhdr}
\fancyhf{}
\chead{\includegraphics*[width=\headwidth,keepaspectratio=true]{header_Schukra_LP}}
\cfoot{\thepage\ of \pageref{LastPage}}
\renewcommand{\footrulewidth}{0.4pt}
\fancypagestyle{plain}{%
\chead{\includegraphics*[width=\headwidth,keepaspectratio=true]{header_Schukra_LP}}
\cfoot{\thepage\ of \pageref{LastPage}}
}
\pagestyle{fancy}
\usepackage[toc]{blindtext}
\begin{document}
\blinddocument
\end{document}
bondmatt wrote:[…]I would not be surprised if what I have is somewhat odd. I used the
GrindEQ Word add-on to output my document as LaTeX code. The result is terrible. However, what I have posted here (and what I am currently working with) is significantly modified from what was output by the add-on. […]
I completely consent to that. This code is rubbish. And you should think about writing the code on your own instead of relying on bad export results which cause more problems than they solve.
bondmatt wrote:[…]I think I should also have mentioned that I am using MiKTeX with the XeLaTeX typesetter.
As already mentioned, the above example should also work with XeLaTeX after dropping the
fontenc package and using
fontspec to specify fonts and their attributes.
Remarks:
- Special characters (blank spaces, underscores, accented characters, …) should be avoided in the path and the name of external files. They can cause problems.