我正在準備一張海報並用於fancyhdr
在頁面底部包含內容。我有兩個問題:
\cfoot{}
不居中,這可以使用 解決\makebox{}
,但是,後面的命令似乎不允許換行,這是必要的,因為否則文字太長。我希望能夠沿著垂直軸向上移動頁腳(換句話說,將它們移離紙張底部)
我不確定這是否fancyhdr
是最好的解決方案,但目前它是最接近我想要的。
這是我的 MWE:
\documentclass{article}
\usepackage[paperwidth=36in, paperheight=27in, margin=2in]{geometry}
\usepackage{multicol}
\columnsep=100pt
\columnseprule=3pt
\usepackage{graphicx}
\usepackage{lipsum}
% Footer
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lhead{}
\rhead{}
\fancyfootoffset[LO]{-8cm}
% Organization logo and presentation footer
\lfoot{\makebox[0pt][r]{\includegraphics[width=5cm]{example-image-a}}} %insitution logo
\rfoot{Poster presented at XXX. Tokyo, Japan}
% Not centered:
%\cfoot{\Huge\textbf{Acknowledgements} This is acknowledgement text This is acknowledgement text This is acknowledgement text \\ This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text }
% cannot introduce linebreak
\cfoot{\makebox[\textwidth][c]{\Huge \textbf{Acknowledgements} This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text }}
\begin{document}
\begin{multicols}{4}
\lipsum[1-90]
\end{multicols}
\end{document}
答案1
你可以嵌套 \parbox、\raisebox、\makebox 來獲得你想要的位置:
\documentclass{article}
\usepackage[paperwidth=36in, paperheight=27in, margin=2in]{geometry}
\usepackage{multicol}
\columnsep=100pt
\columnseprule=3pt
\usepackage{graphicx}
\usepackage{lipsum}
% Footer
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\lhead{}
\rhead{}
%\fancyfootoffset[LO]{-8cm}
% Organization logo and presentation footer
\lfoot{\raisebox{-0.5\height}[0pt][0pt]{\makebox[0pt][l]{\includegraphics[width=5cm]{example-image-a}}}} %insitution logo
\rfoot{Poster presented at XXX. Tokyo, Japan}
\cfoot{\raisebox{0cm}[0pt][0pt]{%
\makebox[0pt]{\parbox{0.8\textwidth}{\centering \Huge \textbf{Acknowledgements} This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text This is acknowledgement text }}}}
\begin{document}
\begin{multicols}{4}
\lipsum[1-90]
\end{multicols}
\end{document}