When I try to put \includegraphics in the header of a tex document using fancyhdr I get an error saying that \includegraphics is an undefined control sequence. Here is the code:
\documentclass[a4paper]{article}
\usepackage{marginnote,calc}
\usepackage{fancyhdr}
\usepackage{geometry}
\geometry{%
left=37.5mm,
right=12.5mm,
top=25mm,
bottom=25mm,
bindingoffset=0mm,
headheight=30pt,
}
\newlength{\myoddoffset}
\setlength{\myoddoffset}{\marginparwidth + \marginparsep}
\pagestyle{fancy}
\fancyheadoffset[leh,roh]{\marginparsep}
\fancyheadoffset[loh,reh]{\myoddoffset}
\lhead{ \includegraphics[scale=1]{logo.png} }
\rhead{ Title2}
\begin{document}
dddd
\end{document}
Here is the error:
!Undefined control sequence.\f@nch@olh ->\includegraphics[scale=1]{logo.png}\strut\end{document}*
How do I fix this so that the logo shows up?
\usepackage{graphicx}is missing in your preamble. – leandriis Nov 10 '21 at 19:26