
--- EDITAR 2 ---
Creé el siguiente encabezado usando un editor de imágenes para ayudarlos a comprender lo que estoy tratando de hacer.
--- Fin de EDITAR 2 ---
--- EDITAR 1 ---
Esto se acerca más a lo que tengo en mi encabezado. Sólo que en lugar de escribir "Capítulo 1" y "Subsección", estoy usando \rightmark y \leftmark, pero el resultado es básicamente el mismo. Y, por supuesto, estoy usando una imagen diferente. El problema está en la línea que cruza la imagen. O tal vez con la longitud de la línea del encabezado.
--- Fin de EDITAR 1 ---
Ok, creo que he buscado esto por todas partes y no encuentro una respuesta. ¿Alguien sabe cómo poner un espacio entre la imagen y la línea del encabezado, para que la línea no cruce la imagen? Esto es lo que tengo hasta ahora.
\documentclass[12pt,twoside]{report}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{blindtext}
\pagestyle{fancy}
% ---------------------------- Header ---------------------------- %
\fancyhead{}
\fancyhead[RE,RO]{\nouppercase{Subsection 1.1}}
\fancyhead[CO,CE]{\MakeUppercase{Chapter 1}}
\fancyhead[L]{\raisebox{-.6\height}[0pt][0pt]{\includegraphics[width=1cm]{example-image-a}}}
% ---------------------------- Footer ---------------------------- %
\fancyfoot{}
\fancyfoot[RE,RO]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\blindtext
\end{document}
Respuesta1
Una solución sencilla redefine \headrule
para afinar su ubicación:
\documentclass[12pt,twoside]{report}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{blindtext}
\pagestyle{fancy}
% ---------------------------- Header ---------------------------- %
\fancyhead{}
\fancyhead[RE,RO]{\nouppercase{Subsection 1.1}}
\fancyhead[CO,CE]{\MakeUppercase{Chapter 1}}
\fancyhead[L]{\raisebox{-.7\height}[0pt][0pt]{\includegraphics[width=1cm]{example-image-a}}}
% ---------------------------- Footer ---------------------------- %
\fancyfoot{}
\fancyfoot[RE,RO]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\headrule}{\hspace*{1.2cm}\rule[2ex]{\dimexpr\textwidth-1.2cm}{0.4pt}}
\begin{document}
\blindtext
\end{document}
Respuesta2
Agregar un \vspace
después de ti \includegraphics
debería funcionar. No se necesita razebox:
\documentclass[12pt,twoside]{report}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{blindtext}
\pagestyle{fancy}
% ---------------------------- Header ---------------------------- %
\fancyhead{} % blank \fancyhead command which clears all the header fields.%
% --------- The lines below are commented because I'm using in the original file, but I think that there is no need for it in here. ---------
% \fancyhead[RE,RO]{\nouppercase{\rightmark}}
% \renewcommand{\chaptermark}[1]{%
% \markboth{#1}{}}
% \fancyhead[CO,CE]{\MakeUppercase{\leftmark}}
\fancyhead[L]{\includegraphics[width=1cm]{example-image-a}\vspace{3pt}}
% ---------------------------- Footer ---------------------------- %
\fancyfoot{} %Clears the footer fields using a blank \fancyfoot command.%
\fancyfoot[RE,RO]{\thepage} % makes the page number appear on the right of the footer for an even page and the right for an odd. The \thepage command returns the page number of the page it's used on.
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\blindtext
\end{document}