缩小页面

缩小页面

在我的论文的参考文献列表部分,只有一个参考文献占用/创建了一页额外的页面,这是我所不想要的。

有什么解决方案可以改变这种情况而不影响利润率?

我的引用像往常一样通过命令创建,

\newpage
\section*{References}
\bibliographystyle{chicago}
\bibliography{references}

并到达本文的最后。

非常感谢

答案1

我可以满足您的要求,但我不提倡您选择的方法,因为它会使一页的字体大小与其他所有页面略有不同。但这是,基于我的回答使文本适合 Latex 中的特定空间

首先,这个 MWE 在序言中设置了所有必需的例程,但对于第一次运行,我在文档中注释掉了相关的调用。这既是为了看看我们要处理什么,也是为了创建 .bbl 文件,因为如果没有它,我的方法就不尽如人意。

\documentclass[12pt]{article}
\bibliographystyle{unsrt}
\usepackage{scalerel}
\usepackage{fp}
\usepackage{lipsum}
\usepackage{stackengine}
\newcount\boxheight
\newcount\boxwidth
\newlength\constrainedwidth
\newsavebox\testbox
\newlength\currentwidth

\newcommand\aspect[1]{%
  \boxheight=\ht#1\relax%
  \boxwidth=\wd#1\relax%
  \FPdiv\testaspect{\the\boxheight}{\the\boxwidth}%
%\testaspect\\%                  COMMENT THIS LINE TO REMOVE ASPECT-RATIO PRINTS
}
% TARGET-HEIGHT, TARGET-WIDTH, CONTENT, GUESS>NATURAL-WIDTH, dWIDTH
\newcommand\constraintext[5]{%
  \def\svfboxsep{\the\fboxsep}%
  \setlength\fboxsep{0pt}%
  \setlength\constrainedwidth{#2}%
  \sbox\testbox{\rule{#2}{#1}}%
%TARGET ASPECT RATIO\\%          COMMENT THIS LINE TO REMOVE COMMENT
%V\\%                            COMMENT THIS LINE TO REMOVE COMMENT
  \aspect{\testbox}%
  \edef\aspectratio{\testaspect}%
  \constrainsize{#1}{\aspectratio}{#3}{#4}{#5}%
  \setlength\fboxsep{\svfboxsep}%
}
\newcommand\constrainsize[5]{%
  \sbox{\testbox}{\fbox{\parbox[b]{#4}{#3}}}%
  \aspect{\testbox}%
  \FPiflt{\testaspect}{#2}%
    \setlength{\currentwidth}{#4}%
    \addtolength{\currentwidth}{-#5}%
    \constrainsize{#1}{#2}{#3}{\currentwidth}{#5}%
  \else
    \setlength\constrainedwidth{#1}%
    \FPdiv\result{1.0}{#2}%
%                               CHANGE \makebox TO \framebox TO add FRAME
    \boxtype[\result\constrainedwidth]{\hfill%
      \scaleto{\parbox[b]{\currentwidth}{#3}}{#1}%
      \hfill%
    }%
  \fi%
}

\begin{document}
\let\boxtype\framebox% CHANGE TO \let\boxtype\makebox WHEN HAPPY
\large
Citing \cite{goossens93, goossens93a, knuth79, knuth79a, lamport94,
lamport94a, goossens93b, knuth79b, lamport94b}\clearpage

%\noindent\constraintext{.97\textheight}{\textwidth}{\vspace{-\baselineskip}%
\bibliography{refs}%
%}{1.6\textwidth}{1mm}

\end{document}

我借了一些围兜条目多个书目并根据我的目的制作了重复的变体,因此我的 bib 文件(refs.bib)如下:

@book{goossens93,
    author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
    title = "The Latex Companion A",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}

@book{goossens93a,
    author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
    title = "The Latex Companion A",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}

@book{goossens93b,
    author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
    title = "The Latex Companion A",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}

@book{knuth79,
    author = "Donald E. Knuth",
        title = "Tex and Metafont, New Directions in Typesetting",
    year = {1979{(}1950{)}},
    publisher = "American Mathematical Society and Digital Press",
    address = "Stanford"
}

@book{knuth79a,
    author = "Donald E. Knuth",
        title = "Tex and Metafont, New Directions in Typesetting",
    year = {1979{(}1950{)}},
    publisher = "American Mathematical Society and Digital Press",
    address = "Stanford"
}

@book{knuth79b,
    author = "Donald E. Knuth",
        title = "Tex and Metafont, New Directions in Typesetting",
    year = {1979{(}1950{)}},
    publisher = "American Mathematical Society and Digital Press",
    address = "Stanford"
}

@book{lamport94,
    author = "Leslie Lamport",
    title = "Latex: A Document Preparation System",
    year = "1994",
    edition = "Second",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}

@book{lamport94a,
    author = "Leslie Lamport",
    title = "Latex: A Document Preparation System",
    year = "1994",
    edition = "Second",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}

@book{lamport94b,
    author = "Leslie Lamport",
    title = "Latex: A Document Preparation System",
    year = "1994",
    edition = "Second",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}

结果将参考文献列表溢出到第二页:

在此处输入图片描述 在此处输入图片描述

因此,如果我取消注释文档末尾附近的这两行以启用\constraintext

\begin{document}
\let\boxtype\framebox% CHANGE TO \let\boxtype\makebox WHEN HAPPY
\large
Citing \cite{goossens93, goossens93a, knuth79, knuth79a, lamport94,
lamport94a, goossens93b, knuth79b, lamport94b}\clearpage

\noindent\constraintext{.97\textheight}{\textwidth}{\vspace{-\baselineskip}%
\bibliography{refs}%
}{1.6\textwidth}{1mm}

\end{document}

我得到了这个结果。注意,我将 保留为\boxtype,以便我可以看到 0.97 x框\framebox的边界。当我对结果满意时,我可以将文档的第一行更改为。此外,在参考书目调用之前的 是因为在框顶部插入了一个空白行,我必须抵消它,以保留顶部边距。\textheight\textwidth\let\boxtype\makebox\vspace\bibliography

在此处输入图片描述

那么为什么我选择 97% 呢\textheight?因为该方法在尝试满足宽度和高度约束时,最终得到的框太窄。例如,选择0.99\textheight会产生以下不可接受的结果。

在此处输入图片描述

因此,返回值 0.97 \textheight,并将 更改\framebox为 a\makebox可得出最终结果:

在此处输入图片描述

相关内容