页码的位置,章节标题的位置,章节和目录,参考文献 [英] positions of page numbers, position of chapter headings, chapters AND Table of Contents, References

查看:115
本文介绍了页码的位置,章节标题的位置,章节和目录,参考文献的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用乳胶撰写博士学位论文(超过120页),截止日期临近,我正为布局问题而苦苦挣扎.

I am writing my PhD thesis (120+ pages) in latex, the deadline is approaching and I am struggling with layout problems.

我正在使用文档样式的书.

I am using the documentstyle book.

我在这一个线程中发布了这两个问题,因为我不确定该解决方案是否与这两个问题有关.

I am posting both problems in this one thread because I am not sure if the solution might be related to both problems or not.

问题是:

1.)页码通常位于每页的右上角(这是正确的,我希望它们位于该位置).

1.) The page numbers are mostly located on the top-right of each page (this is correct and where I want them to be).

但是,仅在我称之为特殊章节"首页的章节的首页上,页码位于底部居中. 特殊章节"的意思是:目录,图形列表,表列表,参考文献,索引.

However, only on the first page of chapters and on the first page of what I call "special chapters", the page number is located bottom-centered. With "special chapters" I mean: List of Contents, List of Figures, List of Tables, References, Index.

我的大学不会接受这样的论文.页码必须始终在每页的右上角,即使该页是一章的第一页还是诸如目录之类的内容的第一页.

My university will not accept the thesis like this. The page number must ALWAYS be top-right one each page, even if the page is the first page of a chapter or the first page of something like the List of Contents.

我该如何解决?

2.)在章节和特殊章节"的第一页(目录列表...)上,章节标题在页面上的位置太低了.我认为这是带有文档样式书的LaTeX的标准布局.

2.) On the first page of chapters and "special chapters" (List of Contents...), the chapter title is located far too low on the page. This is the standard layout of LaTeX with documentstyle book I think.

但是,章节标题必须从页面的顶部开始! IE.与后续页面上普通文本的高度相同.

However, the chapter title must start at the very top of the page! I.e. the same height as the normal text on the pages that follow.

我的意思是章节标题,而不是标题.

I mean the chapter title, not the header.

也就是说,如果有一章叫做

I.e., if there is a chapter called

第1章

机械应力下的foobar动力学"

Dynamics of foobar under mechanical stress"

然后,该文本必须从页面顶部开始,但是现在它从顶部下方开始几厘米.

then that text has to start from the top the page, but right now it starts several centimeters below the top.

我该如何解决?

尝试了各种方法都没有效果,我非常感谢您提供解决方案!

Have tried all kinds of things to no effect, I'd be very thankful for a solution!

谢谢.

推荐答案

尝试回答

即使您使用的是headings页面样式或自定义页面样式,特殊页面(章节开头等)也将使用plain页面样式进行格式化.

Even if you're using the headings pagestyle, or your custom pagestyle, the special pages (chapter beginnings and so on) are formatted with the plain pagestyle.

为避免这种情况,请加载fancyhdr软件包(如

To avoid this, load the fancyhdr package (as mentioned in the previous answer) with

\usepackage{fancyhdr}

在您的序言中.然后,(总是在序言中)定义您的自定义页面样式. 对于普通页面(假设您使用twoside作为\documentclass[]{}的选项,而不是):

in your preamble. Then, (always in the preamble) define your custom pagestyle. For normal pages (assuming you're not using twoside as an option of \documentclass[]{}):

\fancypagestyle{phdthesis}{%
\fancyhf %clear all headers and footers fields
\fancyhead[R]{\thepage} %prints the page number on the right side of the header
}

对于特殊页面:

\fancypagestyle{plain}{%redefining plain pagestyle
\fancyhf %clear all headers and footers fields
\fancyhead[R]{\thepage} %prints the page number on the right side of the header
}

完成此操作后,可以将页面样式设置为在\begin{document}之前声明\pagestyle{phdthesis}. 有关更多详细信息,请参见 fancyhdr软件包文档.

After doing this, you can set you page style declaring \pagestyle{phdthesis} right before \begin{document}. For further details, refer to the fancyhdr package documentation.

现在要回答

第一次尝试,可以使用titlesec软件包,并使用选项compact.在序言中,键入:

As a first attempt, you can use the titlesec package, using the option compact. In the preamble, type:

\usepackage[compact]{titlesec}

如果您对此解决方案不完全满意,可以使用\titlespacing

If you're not completely satisfied with this solution, you can specify the spacing above and below the titles with \titlespacing

\usepackage{titlesec}
\titleformat{ command }[ shape ]{ format }{ label }{ sep }{ before }[ after ]
\titlespacing{ command }{ left }{ beforesep }{ aftersep }[ right ]

使用\titleformat您可以定义自己的章节标题样式,然后可以使用\titlespacing定义间距. 我不知道您必须使用哪种样式的标题,因此最好查看

With \titleformat you can define your own style for chapter titles, and then you can define the spacing with \titlespacing. I don't know which style of titles you have to use, so it's better for you to have a look to the package documentation (you can recall package documentation typing texdoc NameOfThePackage in a terminal).

请注意,您需要定义章节标题格式,以指定其垂直间距(文档的第5页).例如:

Please note that you need to define the chapter title format in order to specify its vertical spacing (page 5 of the documentation). As an example:

\usepackage{titlesec}
\titleformat{\chapter}[hang]{\huge}{\thechapter}{1em}{}
\titlespacing{\chapter}{0pt}{0pt}{1cm}

使用这些命令,您将使章节标题的编号和章节名称位于同一行,标题之前的空格为0 pt,标题与跟随的文本之间的空格为1 cm.

With these commands you have the chapter title with the number and the chapter name on the same line, a 0 pt space before the title, and a 1 cm space between the title and the follwing text.

这篇关于页码的位置,章节标题的位置,章节和目录,参考文献的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆