ヘッダーの異なる角にある2つの画像

ヘッダーの異なる角にある2つの画像

私は LaTex で文書を書いていますが、ヘッダーに問題があります。ファイルのヘッダーに、いくつかのテキスト行とともに 2 つの画像を挿入する必要があります。これまでのコードは次のとおりです。

\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}

ここに画像の説明を入力してください

関連情報