縮小頁面

縮小頁面

在我論文的參考文獻清單部分,有一個參考文獻單獨佔用/創建了一頁額外的頁面,這是我不想要的。

在不影響利潤的情況下改變這一點的解決方案是什麼?

我的參考文獻是像往常一樣透過命令創建的,

\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}

我借了一些參賽作品多個參考書目並為我的目的製作了重複的變體,因此我的圍兜文件(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}

我得到這個結果。請注意,我保留了\boxtypeas ,以便可以看到 0.97 x框\framebox的邊界。當我對結果感到滿意時,我可以將文檔的第一行更改為.另外,在參考書目調用之前是因為在框的頂部插入了一個空行,我必須抵消它,以保留頂部邊距。\textheight\textwidth\let\boxtype\makebox\vspace\bibliography

在此輸入影像描述

那我為什麼選擇97%呢\textheight?因為該方法在嘗試滿足寬度和高度約束時可能會以太窄的框結束。例如,選擇0.99\textheight給出以下不可接受的結果。

在此輸入影像描述

因此,傳回值 0.97\textheight並將 變更\framebox為 a\makebox給出最終結果:

在此輸入影像描述

相關內容