헤더의 서로 다른 모서리에 있는 두 개의 이미지

헤더의 서로 다른 모서리에 있는 두 개의 이미지

LaTex로 문서를 작성 중인데 헤더에 문제가 있습니다. 파일 헤더에 텍스트 몇 줄과 함께 두 개의 이미지를 삽입해야 합니다. 지금까지 내 코드는 다음과 같습니다.

\documentclass{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{graphicx}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\includegraphics{departamentulCalc.png}
}
\fancyhead[RE,LO]{\includegraphics{SIglaUTCN.png} 
}
\setlength\headheight{61pt} 

\fancyfoot[CE,CO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}

\begin{document}

\section{First Section}

Hello,  here  is  some  text  without  a  meaning.   This  
text  should  show  what  a printed text will look like at 
this place.  If you read this text, you will get no information.  
Really?  Is there no information?  Is there a difference between 
this ...

\end{document}

이미지를 삽입했지만 장의 텍스트가 이미지와 바닥글 위로 이동합니다.여기에 이미지 설명을 입력하세요

이 문제를 해결하려면 어떻게 해야 할지 아시나요? 감사합니다 !

답변1

귀하의 코드(이 답변 당시)는 컴파일할 수 없습니다. 내 생각엔 이런 게 있어야 할 것 같아

\documentclass[twoside]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{graphicx}

\pagestyle{fancy}
\fancyhf{}
\setlength\headheight{26pt} 
\fancyhead[LE,RO]{
\includegraphics{departamentulCalc.png}
}
\fancyhead[RE,LO]{
\includegraphics{SIglaUTCN.png} 
}
\fancyfoot[CE,CO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}

\begin{document}

\section{First Section}

Hello,  here  is  some  text  without  a  meaning.   This  
text  should  show  what  a printed text will look like at 
this place.  If you read this text, you will get no information.  
Really?  Is there no information?  Is there a difference between 
this ...

\end{document}

컴파일하면 다음과 같은 경고가 표시됩니다.

Package Fancyhdr Warning: \headheight is too small (26.0pt): 
Make it at least 60.70523pt.
We now make it that large for the rest of the document.
This may cause the page layout to be inconsistent, however.

지시하는 대로 정확하게 수행하십시오 \setlength\headheight{61pt}. 문제가 해결될 것입니다.

\documentclass[twoside]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{graphicx}
\pagestyle{fancy}
\fancyhf{}
\setlength\headheight{61pt} 
\fancyhead[LE,RO]{
\includegraphics[scale=.5]{example-image-duck}
}
\fancyhead[RE,LO]{
\includegraphics[scale=.5]{example-image-duck} 
}
\fancyfoot[CE,CO]{\leftmark}
\fancyfoot[LE,RO]{\thepage}
\renewcommand{\headrulewidth}{1pt}
\renewcommand{\footrulewidth}{1pt}
\begin{document}

\section{First Section}

Hello,  here  is  some  text  without  a  meaning.   This  
text  should  show  what  a printed text will look like at 
this place.  If you read this text, you will get no information.  
Really?  Is there no information?  Is there a difference between 
this ...

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보