我正在尝试为页码添加彩色背景,效果很好 - 但当我想让它显示在 pdf 页面上时除外(这是最重要的)。这也发生在文本的最后一页上。
它看起来应该是这样的:
在 pdf 页面上它看起来是这样的:
梅威瑟:
\documentclass[book,openeven,showtrims]{memoir}
% http://latex-my.blogspot.dk/2009/10/setting-page-size-and-margins.html
%% The stock paper size
\setstocksize{236mm}{161mm}
%% The 'real' page size
\settrimmedsize{230mm}{155mm}{*}
%% The stock paper will be trimmed 3mm from the
%% top edge and 3mm from the left edge
\settrims{3mm}{3mm}
%% Spine and trim page margins from main typeblock
\setlrmarginsandblock{20mm}{15mm}{*}
%% Top and bottom page margins from main typeblock
\setulmarginsandblock{20mm}{20mm}{*}
%% Header occupies height of a single line;
%% Bottom edge of footer is 7mm from bottom edge
%% of typeblock
\setheadfoot{\baselineskip}{7mm}
%% Bottom edge of header is 7mm from top edge of
%% typeblock
\setlength\headsep{7mm}
%\renewcommand\trimmarkscolor{\color{red}}
\trimLmarks
\checkandfixthelayout
\usepackage[xcdraw]{xcolor}
\usepackage[utf8]{inputenc}
\usepackage[danish]{babel}
\usepackage{graphicx}
\usepackage{bookman} % font
\usepackage{lipsum}
\usepackage{pdfpages}
\makepagestyle{mm}
\setlength{\fboxrule}{6pt}%
\makeevenfoot{mm}{\fcolorbox{black}{blue}{\hspace{.5em}\thepage}}{}{}
\makeoddfoot{mm}{}{}{\fcolorbox{black}{blue}{\hspace{.5em}\thepage}}
\pagestyle{mm}
\begin{document}
\chapter{Test}
\lipsum[1-20]
\includepdf[noautoscale,pagecommand={},pages=-]{mwepdf}
\end{document}
您可以在这里获取虚拟 pdf:http://kristian.anapnea.net/mwepdf.pdf
我希望有人知道这是怎么回事,因为这对我来说没有什么意义!
答案1
尝试
\makeevenfoot{mm}{\setlength{\fboxrule}{6pt}\setlength\fboxsep{2pt}\fcolorbox{black}{blue}{\hspace{.5em}\thepage}}{}{}
\makeoddfoot{mm}{}{}{\setlength{\fboxrule}{6pt}\setlength\fboxsep{2pt}\fcolorbox{black}{blue}{\hspace{.5em}\thepage}}
pdfpages
本地将\fboxsep
和\fboxrule
设置为零。然后这些设置由标题使用。为此在标题中添加合适的值可以解决问题。它不会影响其余部分,因为标题是组。