我正在使用这个模板制作我的书的标题页这里名为 TMB。但是,它没有居中,就像使用 \maketitle 的默认标题页一样。有什么方法可以让我把标题页居中吗?
\documentclass[a4,11pt,twoside]{book}
\newcommand*{\titleTMB}{\begingroup% Three Men in a Boat
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\LARGE THE BOOK OF CONUNDRUMS}
\vspace*{\baselineskip}
{\large\scshape Many names}\\[\baselineskip]
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\LARGE My book's title}\\[\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[\baselineskip]
\vfill
{\small\scshape 11 March 2014}\par
\vspace*{\drop}
\endgroup}
\begin{document}
\begin{titlepage}
\titleTMB
\end{titlepage}
\end{document}
谢谢你!
答案1
通常,当一本书要双面印刷时,书页不会居中。相反,外边缘会留出较大的边距,这样当看跨页时,空白处会均匀分布。
但是,如果您不想要这样,您可以在居中页面时保留双面功能:
\documentclass[a4paper,11pt,twoside]{book}% note: a4paper - not a4
\usepackage[hmarginratio=1:1]{geometry}% equal left and right margins
\newcommand*{\titleTMB}{\begingroup% Three Men in a Boat
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\LARGE THE BOOK OF CONUNDRUMS}
\vspace*{\baselineskip}
{\large\scshape Many names}\\[\baselineskip]
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\LARGE My book's title}\\[\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[\baselineskip]
\vfill
{\small\scshape 11 March 2014}\par
\vspace*{\drop}
\endgroup}
\begin{document}
\begin{titlepage}
\titleTMB
\end{titlepage}
\end{document}
标题页并非覆盖. 标题页放在里面书的页边距。因此页边距应与其他页面的页边距一致。但是,如果您制作的是准书,其中标题页将作为封面,则您可能只希望标题页居中。
\documentclass[a4paper,11pt,twoside]{book}
\usepackage[hmarginratio=1:1]{geometry}
\usepackage{kantlipsum}
\newcommand*{\titleTMB}{\begingroup% Three Men in a Boat
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\LARGE THE BOOK OF CONUNDRUMS}
\vspace*{\baselineskip}
{\large\scshape Many names}\\[\baselineskip]
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\LARGE My book's title}\\[\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[\baselineskip]
\vfill
{\small\scshape 11 March 2014}\par
\vspace*{\drop}
\endgroup}
\begin{document}
\begin{titlepage}
\titleTMB
\end{titlepage}
\newgeometry{hmarginratio=2:3}
\kant[1-5]
\end{document}
答案2
正如 cfr 所指出的,由于您使用的是twoside
选项,内边缘总是留有空间(用于装订)。因此您的页面不居中。您可以使用包几何,并仅将标题页居中,方法是
\newgeometry{centering} %%% make the page centered on paper
\begin{titlepage}
\titleTMB
\end{titlepage}
\restoregeometry %% restore the page layout as earlier
完整代码:
\documentclass[a4paper,11pt,twoside]{book}
\usepackage[showframe]{geometry}
\newcommand*{\titleTMB}{\begingroup% Three Men in a Boat
\newlength{\drop}
\setlength{\drop}{0.1\textheight}
\centering
\settowidth{\unitlength}{\LARGE THE BOOK OF CONUNDRUMS}
\vspace*{\baselineskip}
{\large\scshape Many names}\\[\baselineskip]
\rule{\unitlength}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}
\rule{\unitlength}{0.4pt}\\[\baselineskip]
{\LARGE My book's title}\\[\baselineskip]
\rule{\unitlength}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}
\rule{\unitlength}{1.6pt}\\[\baselineskip]
\vfill
{\small\scshape 11 March 2014}\par
\vspace*{\drop}
\endgroup}
\begin{document}
\newgeometry{centering}
\begin{titlepage}
\titleTMB
\end{titlepage}
\restoregeometry
\end{document}