使用回憶錄的頁面大小問題

使用回憶錄的頁面大小問題

我正在使用 LaTeX 排版我妻子的書,直到最近才遇到任何問題。我已將文件設定為生成 6x9 頁面大小並且工作正常。當我將電腦升級到最新版本的 Ubuntu (17.04) 時,頁面現在顯示為 8.5x11,但前提是\include{graphicx}使用 ,並且僅限回憶錄文檔類。我的帶有 Miktex 的 windows 盒子上也發生了這種情況,在升級之前兩者都正常工作。

\documentclass{memoir}
\usepackage[paperwidth=6in,paperheight=9in]{geometry}
\usepackage{lipsum}

\begin{document}
\lipsum[1-6]
\end{document}

這段程式碼運作正常,產生頁面大小為 6x9 的 pdf,但當我加入時\usepackage{graphicx}

\documentclass{memoir}
\usepackage[paperwidth=6in,paperheight=9in]{geometry}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum[1-6]
\end{document}

它變成 8.5 x 11 \pdfpagewidth=6in \pdfpageheight=9in。回憶錄類別或圖形有變化嗎?有沒有 Graphicx 的替代品?或設定頁面大小的不同方式?

答案1

問題是pdftex.def(實際上多年來)檢測回憶錄的\stockwidth長度並優先使用它,而 \paperwidth不是設定它。

如果您使用回憶錄設施,則會設定此功能,但快速解決方法是

\documentclass{memoir}
\usepackage[paperwidth=6in,paperheight=9in]{geometry}
\usepackage{graphicx}

\stockwidth\paperwidth
\stockheight\paperheight
\usepackage{lipsum}
\begin{document}
\lipsum[1-6]
\end{document}

答案2

在這種情況下不需要幾何圖形,甚至不需要手動設定尺寸。只需發出回憶錄類別選項ebook即可將庫存和紙張尺寸依序設定為 6x9 吋。

然後,如果您需要變更邊距,請使用例如

\setlrmarginsandblock{left} {right} {ratio} 
\setulmarginsandblock{top} {bottom} {ratio} 
\checkandfixthelayout 

請注意,在三個參數組合中,必須有一個參數是*

相關內容