Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

\twoside

The \twoside option in LaTeX is used in document classes to specify that the document will be printed on both sides of the pages (duplex printing). When you enable this option, LaTeX adjusts the layout of the pages to account for the binding on the left side for odd-numbered pages and the right side for even-numbered pages. This results in appropriate margins for text to be comfortably read.

Here are some key points about the \twoside option:

  • Usage: You can enable the \twoside option by including it in the document class declaration. For example:
\documentclass[twoside]{article}
  • Margin Adjustments: When \twoside is enabled, LaTeX automatically adjusts the inner and outer margins. The inner margin is larger to allow for binding, while the outer margin is smaller to keep the text looking balanced.

  • Different First Page: In a two-sided document, LaTeX treats the first page differently. It typically uses a different layout for odd and even pages, allowing for a more polished appearance.

  • Benefits: Using \twoside is beneficial for documents such as theses or books, where printed copies will be bound.

Here's a simple example of using the \twoside option in a LaTeX document:

\documentclass[twoside]{book}

\begin{document}

\chapter{Introduction}
This is the introduction chapter.

\newpage

\chapter{Second Chapter}
This is the second chapter.

\end{document}

In this example, the document is set up as a book with the \twoside option, which means LaTeX will apply appropriate formatting and margins for both odd and even pages. [GPT-4o mini]

\twoside 选项在 LaTeX 中用于指定文档类,以便文档将在页面的两面打印(双面打印)。启用此选项后,LaTeX 会调整页面的布局,以考虑奇数页左侧的装订和偶数页右侧的装订。这将使文本的边距适合舒适阅读。

以下是有关 \twoside 选项的一些关键点:

  • 用法:您可以通过在文档类声明中包含此选项来启用 \twoside。例如:
\documentclass[twoside]{article}
  • 边距调整:启用 \twoside 时,LaTeX 会自动调整内侧和外侧边距。内侧边距较大,以便于装订,而外侧边距较小,以保持文本的平衡性。

  • 不同的首页:在双面文档中,LaTeX 对首页的处理是不同的。它通常对奇数页和偶数页使用不同的布局,从而使外观更加精致。

  • 好处:使用 \twoside 对于诸如论文或书籍等文档是有益的,因为打印的副本将被装订。

以下是一个在 LaTeX 文档中使用 \twoside 选项的简单示例:

\documentclass[twoside]{book}

\begin{document}

\chapter{引言}
这是引言章节。

\newpage

\chapter{第二章节}
这是第二章节。

\end{document}

在这个示例中,文档设置为一本书,并启用了 \twoside 选项,这意味着 LaTeX 将为奇数页和偶数页应用适当的格式和边距。 [GPT-4o mini]