增加页眉的右边距

增加页眉的右边距

我想在页眉中添加一个图形,但它应该放在页边距之外。我有

\documentclass[a4paper,11pt,naustrian]{article}
\usepackage[left=2.5cm, right=4.5cm, top=2cm, bottom=2cm,  showframe]{geometry} % for margins on a A4paper

\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
%\renewcommand{\footrulewidth}{0pt}
\setlength\headheight{61pt}
\addtolength{\textheight}{-61.0pt}
\rhead{
\includegraphics[height=2cm]{MyLogo}}

\usepackage{kantlipsum}
\begin{document}
    \kant[1-8]
\end{document}

因此徽标在框架处结束,即4.5cm从右页开始。但我想移动徽标,使其与右纸框的距离为2.5cm

我没有找到任何解决方案。

使用luatex 1.13.2

答案1

picture我会利用环境来做这件事

\documentclass[a4paper,11pt,naustrian]{article}
\usepackage[left=2.5cm, right=4.5cm, top=2cm, bottom=2cm, showframe]{geometry} % for margins on a A4paper

\usepackage{lastpage}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{kantlipsum}

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0pt}
%\renewcommand{\footrulewidth}{0pt}
\setlength\headheight{61pt}
\addtolength{\textheight}{-61.0pt}

\rhead{
    \begin{picture}(0,0) \put (0,0){
            \includegraphics[height=2cm]{MyLogo}} 
    \end{picture}
}

\begin{document}
    \kant[1-8]
\end{document}

结果

相关内容