我遇到了一个有点奇怪的问题。我有一个很大的文档,我想扩展一个特定页面(出版物列表)的垂直边距,以便将所有内容放在一页中。使用 扩展底部边距非常容易\enlargethispage
。但是,我就是无法扩展顶部边距。我使用typearea
包(但没有 KOMA 类)和\areaset
来设置布局 - 我真的不想geometry
以任何可能的方式更改它(例如更改为?)...
现在最奇特的部分是:很多次我发现一个建议(即替代geometry
)是使用changepage
包和类似的东西\changepage{}{}{}{}{}{-3cm}{}{}{}
(第 6 个参数是顶部边距)。我想要放大的特定页面(出版物列表)是通过 biblatex 生成的。由于某种奇怪的原因,宏\changepage
在这里不起作用,即它显然被忽略了。但是,在具有as 布局和as 标题的\changepage
测试文档上有效(类似于 biblatex 所做的)...这是包括所有包在内的代码的基本部分:\areaset
\chapter*
\documentclass[pdftex,openright,12pt,a4paper,twoside,notitlepage]{book}
\usepackage[ngerman,english]{babel}
\usepackage{tocloft}
\usepackage[Lenny]{fncychap}
\usepackage{fancyhdr}
\usepackage{typearea}
\usepackage[strict]{changepage}
\usepackage{setspace}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\usepackage[font={small,sf},labelfont=bf,margin=0pt]{caption}
\usepackage{csquotes}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[mathscr]{euscript}
\usepackage{textgreek}
\usepackage{upgreek}
\usepackage{nicefrac}
\usepackage{graphicx}
\usepackage{nomencl}
\usepackage[backend=biber,style=...,biblabel=brackets,defernumbers=true]{biblatex}
\usepackage[ocgcolorlinks,unicode]{hyperref}
\areaset[9mm]{15cm}{22cm} % <-- main layout
\addtolength{\topmargin}{15mm}
\setlength{\headheight}{14.5pt}
\defbibheading{publist}[1]{% <-- heading setup for biblatex environment
\chapter*{#1}%
\markboth{#1}{#1}%
\vspace*{-1.5cm}}% <-- additionally reduce spacing between "chapter" title and text
\defbibenvironment{publist} % <-- environment setup for biblatex
{\list{}{\setlength{\leftmargin}{0pt}}}
{\endlist}
{\item}
\begin{document}
... % lots of frontmatter stuff
\cleardoublepage
\begin{refsection}
\nocite{...} % <-- prepare citations for publication list
\phantomsection % correct jump mark for hyperref
\addcontentsline{toc}{chapter}{List of publications}
\changepage{}{}{}{}{}{-3cm}{}{}{} % <-- this is ignored!
\printbibliography[env=publist,heading=publist,title={...},sorting=none] % <-- bibliography with previously defined header/environment
\enlargethispage{4\baselineskip} % <-- this works fine
\vspace*{\stretch{1}}
\includegraphics{...} % <-- some logo at the page bottom
\end{refsection}
\clearpage
那么,我怎样才能只移动这个包含“特殊”参考书目的特定页面而不搞砸一切呢?
答案1
也许你可以用类似的东西
\usepackage{typearea}
\AfterSettingArea{\setlength{\headheight}{14.5pt}}
\areaset[9mm]{15cm}{22cm} % <-- main layout
\addtolength{\topmargin}{15mm}% (297-220):3x2-36.3=15
...
\cleardoublepage
\storeareas\StandardArea% <- store the main layout
\areaset[9mm]{15cm}{24cm}% <- change the layout
\addtolength{\topmargin}{1.7mm}% (297-240):3x2-36.3=1.7
...
\clearpage
\StandardArea% <- restore main layout
代码:
\documentclass[pdftex,openright,12pt,a4paper,twoside,notitlepage]{book}
\usepackage[utf8]{inputenc}
\usepackage[ngerman,english]{babel}
\usepackage[Lenny]{fncychap}
\usepackage{fancyhdr}\pagestyle{fancy}
\usepackage{graphicx}
\usepackage[backend=biber]{biblatex}
\addbibresource{biblatex-examples.bib}% example bib file
\defbibheading{publist}[1]{% <-- heading setup for biblatex environment
\chapter*{#1}%
\markboth{#1}{#1}%
\vspace*{-1.5cm}}% <-- additionally reduce spacing between "chapter" title and text
\defbibenvironment{publist} % <-- environment setup for biblatex
{\list{}{\setlength{\leftmargin}{0pt}}}
{\endlist}
{\item}
\usepackage{typearea}
\AfterSettingArea{\setlength{\headheight}{14.5pt}}
\areaset[9mm]{15cm}{22cm} % <-- main layout
\addtolength{\topmargin}{15mm}% (297-220):3x2-36.3=15
\usepackage{showframe}% to show the pagelayout
\usepackage{mwe}% dummy text and example image
\usepackage[ocgcolorlinks,unicode]{hyperref}
\begin{document}
\tableofcontents
\blinddocument
\cleardoublepage
\storeareas\StandardArea% <- store the main layout
\areaset[9mm]{15cm}{24cm}% <- change the layout
\addtolength{\topmargin}{1.7mm}% (297-240):3x2-36.3=1.7
\begin{refsection}
\nocite{westfahl:space}% only example
\phantomsection % correct jump mark for hyperref
\addcontentsline{toc}{chapter}{List of publications}
\printbibliography[env=publist,heading=publist,title={...},sorting=none] % <-- bibliography with previously defined header/environment
\enlargethispage{2\baselineskip} % <-- this works fine
\vspace*{\stretch{1}}
\includegraphics[width=2cm]{example-image} % <-- some logo at the page bottom
\end{refsection}
\clearpage
\StandardArea% <- restore main layout
\blinddocument
\end{document}