我的客户希望她的书中的插图能够占据一整页,因此我一直使用如下代码来制作浮动插图:
\documentclass{memoir}
% Page layout: 6″×9″ , no trim; type-block: 4.75″×7.5″
\setstocksize{9in}{6in} \settrimmedsize{9in}{6in}{*} \settrims{0in}{0in}
\setbinding{0.375in} \setlrmarginsandblock{0.375in}{0.5in}{*} \setulmarginsandblock{0.75in}{0.75in}{*}
\usepackage{calc}
\setheadfoot{\baselineskip}{\topskip + \baselineskip} \setheaderspaces{*}{\topskip}{*} \setmarginnotes{0.25\spinemargin}{0.5\spinemargin}{0pt}
\checkandfixthelayout[nearest]
\usepackage{graphicx}
\begin{document}
\begin{figure}
% type-block is 4.75″×7.5″, picture is 2850×2850 @600dpi = 4.75″×4.75″,
% so add (7.5″−4.75″)÷2 = 1.375″ vspace on each side of the picture
% to force it to occupy a full page
\vspace{1.375in}
\centering
\includegraphics{illustration.png}
\vspace{1.375in}
\end{figure}
\end{document}
尽管我计算过了,但我还是收到了消息“LaTeX 警告:第 23 行输入的浮动对于页面来说太大了 16.02414pt。”
回答以下问题我怎样才能摆脱 LaTeX 警告:浮动对于页面来说太大?,我当然可以减少vspace
我添加的,但我想了解错误来自哪里。我没有考虑到什么导致每张图片损失 14-16 个点?
答案1
让 TeX 进行计算:
\documentclass{memoir}
\usepackage{calc}
\usepackage{graphicx}
\setstocksize{9in}{6in}
\settrimmedsize{9in}{6in}{*}
\settrims{0in}{0in}
\setbinding{0.375in}
\setlrmarginsandblock{0.375in}{0.5in}{*}
\setulmarginsandblock{0.75in}{0.75in}{*}
\setheadfoot{\baselineskip}{\topskip + \baselineskip}
\setheaderspaces{*}{\topskip}{*}
\setmarginnotes{0.25\spinemargin}{0.5\spinemargin}{0pt}
\checkandfixthelayout[nearest]
\begin{document}
\begin{figure}
\begin{minipage}[c][\textheight]{\textwidth}
\centering
\rule{4.75in}{4.75in}
%\includegraphics{illustration.png}
\end{minipage}
\end{figure}
\end{document}