bupTemplate icon indicating copy to clipboard operation
bupTemplate copied to clipboard

摘要目录页的页眉和页脚

Open xyecoding opened this issue 3 years ago • 10 comments

现在摘要和目录页也有页眉页脚,想请问一下,如何去除呢?

xyecoding avatar Sep 18 '22 11:09 xyecoding

Hi,请把main.tex 29行放在31行后面试一下。

thesis

houluy avatar Sep 19 '22 02:09 houluy

Hi,请把main.tex 29行放在31行后面试一下。

thesis

不行, image 摘要变成第一章了。

摘要和目录部分是用罗马数字,编号的,我试着查找了一下关键字“roman”,试着改了下含有“roman”关键字的代码,看有没有变化。 发现也都没用

xyecoding avatar Sep 19 '22 02:09 xyecoding

直接将\frontmatter删掉呢?

houluy avatar Sep 19 '22 02:09 houluy

直接将\frontmatter删掉呢?

也有上一个问题

xyecoding avatar Sep 19 '22 03:09 xyecoding

恢复一下原始模样,然后把下面一条命令放在\frotmatter后面。

\pagestyle{empty}\pagenumbering{gobble}

houluy avatar Sep 19 '22 03:09 houluy

恢复一下原始模样,然后把下面一条命令放在\frotmatter后面。

\pagestyle{empty}\pagenumbering{gobble}

\pagestyle{empty}\pagenumbering{gobble}同时加上只有章的第一页出现页眉页脚,其他页面页眉页脚都消失了,摘要中英文第一页也有页眉, image image

只加\pagenumbering{gobble}页脚全部对了,摘要目录页没有页码编号,正文从1开始编号。 但是摘要目录页还是有页眉

xyecoding avatar Sep 19 '22 06:09 xyecoding

这个页眉页脚定义在buptthesis.cls 258到272行,采用fancyhdr宏包定义的奇偶页。268行定义了\frontmatter的pagestyle,你的需求应该是需要修改一下这个采用的pagestyle,把fancyhead都清空。

\let\BUPT@frontmatter\frontmatter
\def\frontmatter{\BUPT@frontmatter\pagestyle{BUPThdrstyle}}  % <-- 这里
%% Page style before \frontmatter
\AtBeginDocument{%
  \pagenumbering{alpha}%
  \pagestyle{empty}}

houluy avatar Sep 20 '22 02:09 houluy

这个页眉页脚定义在buptthesis.cls 258到272行,采用fancyhdr宏包定义的奇偶页。268行定义了\frontmatter的pagestyle,你的需求应该是需要修改一下这个采用的pagestyle,把fancyhead都清空。

\let\BUPT@frontmatter\frontmatter
\def\frontmatter{\BUPT@frontmatter\pagestyle{BUPThdrstyle}}  % <-- 这里
%% Page style before \frontmatter
\AtBeginDocument{%
  \pagenumbering{alpha}%
  \pagestyle{empty}}

这样是吗?但是也有这个问题,每一章只有第一页有页眉,其他得没有了。而且摘要也有页眉。 image

image

xyecoding avatar Sep 20 '22 06:09 xyecoding

\pagestyle的具体定义在258行:

    \fancypagestyle{BUPThdrstyle}{%
      \fancyhf{}%
      \fancyhead[OR]{\zihao{-5} \leftmark}%
      \fancyhead[EL]{\zihao{-5} \BUPT@label@university\BUPT@value@degreetype\BUPT@value@degree\BUPT@label@thesis}%
      \fancyfoot[C]{\zihao{5} \thepage}%
      \renewcommand\headrulewidth{0.4\p@}%
      \renewcommand\footrulewidth{0\p@}}

可能需要给\frontmatter重新定义一个\fancypagestyle

houluy avatar Sep 20 '22 06:09 houluy

\pagestyle的具体定义在258行:

    \fancypagestyle{BUPThdrstyle}{%
      \fancyhf{}%
      \fancyhead[OR]{\zihao{-5} \leftmark}%
      \fancyhead[EL]{\zihao{-5} \BUPT@label@university\BUPT@value@degreetype\BUPT@value@degree\BUPT@label@thesis}%
      \fancyfoot[C]{\zihao{5} \thepage}%
      \renewcommand\headrulewidth{0.4\p@}%
      \renewcommand\footrulewidth{0\p@}}

可能需要给\frontmatter重新定义一个\fancypagestyle

嗯嗯,我不太懂latex的这个语法。按道理我也感觉这个\frontmatter是关于正文之前的。但是为什么把\frontmatter\pagestyle改成empty会影响正文呢?而且摘要第一页的页眉也存在。

xyecoding avatar Sep 20 '22 06:09 xyecoding