
我正在研究一個 tufte-book 文檔類,我想更改頁面的大小。由於頁面較小,我想固定文字的總寬度(包括頁邊註釋)。文檔類別的文檔指定使用幾何套件。
在該包的文檔中,對該width
參數的解釋如下:
width|totalwidth
寬度全身。
width=
或者totalwidth=
。此尺寸預設為textwidth
,但如果includemp
設定為true
,width ≥ textwidth
因為width
包括頁邊註釋的寬度。如果textwidth
和width
同時指定,則textwidth
優先於width
。
這是我的序言中的文字:
\documentclass[symmetric,justified,marginals=raggedouter]{tufte-book}
\usepackage{microtype}
\usepackage{calc}
\usepackage{geometry,afterpage}
\geometry{papersize={16.8cm,23.7cm}}% <= it seems to be OK
\geometry{textheight=18.6cm}%text : 132 *186 mm <= it is OK
\geometry{width=13.2cm}% <= The code doesn't take into account the marginparwidth and the marginparsep
\begin{document}
\end{document]
我不知道如何指定includemp
設定為true
.
答案1
手冊中的引用geometry
說「如果textwidth
同時width
指定,textwidth
則優先於width
」。
在 的源代碼中tufte-book
,特別是文件 中tufte-common.def
,存在以下代碼:
\RequirePackage[letterpaper,left=1in,top=1in,headsep=2\baselineskip,textwidth=26pc,marginparsep=2pc,marginparwidth=12pc,textheight=44\baselineskip,headheight=\baselineskip]{geometry}
這意味著它textwidth
是在類別中指定的,因此width
稍後給出的任何規範(例如在.tex
文件中)都將被忽略。
因此,要變更文字的寬度,您需要textwidth
手動指定並考慮邊距大小。但是,可以在 中使用算術表達式\geometry
。因此下面的程式碼
\geometry{textwidth=13.2cm-\marginparwidth-\marginparsep}
指定正文和邊距合計為 13.2 公分。