LaTeX:选择起始和结束分页。

huangapple go评论50阅读模式
英文:

LaTeX: Choose paging start and end

问题

我正在使用LaTeX撰写报告,并希望在摘要结束后,我的引言部分开始分页。

```latex
\documentclass[a4paper,12pt]{report}
\begin{document}

% [...] 一些章节

\tableofcontents

\listoffigures

\chapter{引言}
% 在这里我希望分页从1开始

% [...] 一些章节

\chapter{结论}
% 在这里我希望结束分页

% [...] 一些章节

\end{document}

所以我想知道是否有解决方案来设置分页开始和结束的位置,或者忽略某些页面的分页。

此外,我已经尝试在“引言”章节后添加以下行:

\setcounter{page}{1}

但我不能选择在哪里结束计数,而且在此设置计数器更新之前的所有页面都会被计算,它只会在设置计数器更新后重新从1开始计数。

编辑

我已经找到了解决方法,但我认为这不是最优雅的方式。我在不想看到分页的每一页顶部都添加了\thispagestyle{empty},然后在我的“引言”章节上方添加了\pagenumbering{arabic},以使分页“重新开始”到这一页。

现在的代码如下所示:

\documentclass[a4paper,12pt]{report}
\begin{document}

% [...] 一些章节
% \thispagestyle{empty} % 添加在我不想看到分页的每个章节上方

\tableofcontents
\thispagestyle{empty}

\listoffigures
\thispagestyle{empty}

\chapter{引言}
\pagenumbering{arabic}

% [...] 一些章节

\chapter{结论}

% [...] 一些章节
% \thispagestyle{empty} % 添加在我不想看到分页的每个章节上方

\end{document}

<details>
<summary>英文:</summary>

I&#39;m writing a report in LaTeX and I want to start the paging after the summary when my introduction starts

```latex
\documentclass[a4paper,12pt]{report}
\begin{document}

% [...] some chapters

\tableofcontents

\listoffigures

\chapter{Introduction}
% here I want the paging to start with 1

% [...] some chapters

\chapter{Conclusion}
% here i want to end the paging

% [...] some chapters

\end{document}

So I'm asking if there's any solution to set where to start and end the paging or to ignore from paging some pages.

Also, I've already tried to add this line after the chapter "Introduction" :

\setcounter{page}{1}

But I can't choose where to end the counter and also all the pages before this one are counted and it's just restarting to 1 after the setcounter update.

EDIT

I've found a way to solve it but I think it's not the most beautiful way. I've added \thispagestyle{empty} to every page where I don't want to see the paging and then added \pagenumbering{arabic} above my "Introduction" chapter to make the paging "restart" to this page.

Here's how it looks now :

\documentclass[a4paper,12pt]{report}
\begin{document}

% [...] some chapters
% \thispagestyle{empty} % added above every chapter I don&#39;t want to see paginated

\tableofcontents
\thispagestyle{empty}

\listoffigures
\thispagestyle{empty}

\chapter{Introduction}
\pagenumbering{arabic}

% [...] some chapters

\chapter{Conclusion}

% [...] some chapters
% \thispagestyle{empty} % added above every chapter I don&#39;t want to see paginated

\end{document}

答案1

得分: 0

我建议使用 book 类而不是 report。这样,您可以使用 \mainmatter 来开始您文档的主要部分:

\documentclass[a4paper,12pt]{book}
\begin{document}

\frontmatter

% [...] 一些章节

\tableofcontents

\listoffigures

\mainmatter
\chapter{引言}
% 这里我希望分页从1开始

% [...] 一些章节

\chapter{结论}
% 这里我希望结束分页

% [...] 一些章节

\end{document}
英文:

I suggest to use the book class instead of report. This way you can use \mainmatter to start the main part of your document:

\documentclass[a4paper,12pt]{book}
\begin{document}

\frontmatter

% [...] some chapters

\tableofcontents

\listoffigures

\mainmatter
\chapter{Introduction}
% here I want the paging to start with 1

% [...] some chapters

\chapter{Conclusion}
% here i want to end the paging

% [...] some chapters

\end{document}

huangapple
  • 本文由 发表于 2023年5月25日 16:59:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76330527.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定