![增加页眉的右边距](https://linux22.com/image/433433/%E5%A2%9E%E5%8A%A0%E9%A1%B5%E7%9C%89%E7%9A%84%E5%8F%B3%E8%BE%B9%E8%B7%9D.png)
我想在页眉中添加一个图形,但它应该放在页边距之外。我有
\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}