stone-zeng / fduthesis

LaTeX thesis template for Fudan University
LaTeX Project Public License v1.3c
820 stars 207 forks source link

页眉格式+摘要页码如何设置为大写罗马字体 #172

Closed FudanYuan2019 closed 3 years ago

FudanYuan2019 commented 3 years ago

请教大佬两个问题:

  1. 如何将页眉格式设置为左侧为论文题目,右侧为章节标题?
  2. 如何将摘要部分的页码设置为大写罗马字体
stone-zeng commented 3 years ago

导言区加上以下代码:

\makeatletter
\ExplSyntaxOn

% 在偶数页左侧添加标题,奇数页右侧添加章名称
\fancyhead [ EL ] { \small \nouppercase { \fdu@kai \l__fdu_info_title_tl  } }
\fancyhead [ OR ] { \small \nouppercase { \fdu@kai \leftmark } }
% 每页的页眉都换成标题+章名称,不分奇偶
% \fancyhead [ L ] { \small \nouppercase { \fdu@kai \l__fdu_info_title_tl  } }
% \fancyhead [ R ] { \small \nouppercase { \fdu@kai \leftmark } }

% 前置部分(fontmatter)都用大写罗马字体
\ctex_patch_cmd:Nnn \frontmatter
  { roman } { Roman }

\ExplSyntaxOff
\makeatother

关于 2,只有摘要换成大写会很奇怪,我猜你想要的就是整个前置部分都大写。

FudanYuan2019 commented 3 years ago

@stone-zeng 按照您的建议,设置完成后发现每章第一页没有页眉,摘要目录的页眉的章节标题在中间。这个怎么调整?

FudanYuan2019 commented 3 years ago

非常感谢,解决了 \makeatletter \let\ps@plain\ps@fancy

\ExplSyntaxOn \fancyhf{}

% 在偶数页左侧添加标题,奇数页右侧添加章名称 % \fancyhead [ EL ] { \small \nouppercase { \fdu@kai \l__fdu_info_title_tl } } % \fancyhead [ OR ] { \small \nouppercase { \fdu@kai \csname l__fdu_header_center_mark_tl\endcsname\leftmark}}

% 每页的页眉都换成标题+章名称,不分奇偶 \fancyhead[L]{\small\nouppercase{\fdu@kai \l__fdu_info_title_tl }} \fancyhead[R]{\small \nouppercase{ \fdu@kai \csname l__fdu_header_center_mark_tl\endcsname\leftmark}}

\fancyfoot[C]{\small\thepage} \pagestyle{fancy} \makeatother \ExplSyntaxOff

xnuohz commented 3 years ago

有的章节名称太长了跟标题重叠了一到两个字,有什么好的建议吗,大佬

stone-zeng commented 3 years ago

有的章节名称太长了跟标题重叠了一到两个字,有什么好的建议吗,大佬

\chapter[短名字]{长名字}

当然这也是为什么双面模式默认没有把它们放在同一页。

xnuohz commented 3 years ago

有的章节名称太长了跟标题重叠了一到两个字,有什么好的建议吗,大佬

\chapter[短名字]{长名字}

当然这也是为什么双面模式默认没有把它们放在同一页。

这样改的话目录里面的标题又变成短名字了==

lonven commented 3 years ago

非常感谢,解决了 \makeatletter \let\ps@plain\ps@fancy

\ExplSyntaxOn \fancyhf{}

% 在偶数页左侧添加标题,奇数页右侧添加章名称 % \fancyhead [ EL ] { \small \nouppercase { \fdu@kai \l__fdu_info_title_tl } } % \fancyhead [ OR ] { \small \nouppercase { \fdu@kai \csname l__fdu_header_center_mark_tl\endcsname\leftmark}}

% 每页的页眉都换成标题+章名称,不分奇偶 \fancyhead[L]{\small\nouppercase{\fdu@kai \l__fdu_info_title_tl }} \fancyhead[R]{\small \nouppercase{ \fdu@kai \csname l__fdu_header_center_mark_tl\endcsname\leftmark}}

\fancyfoot[C]{\small\thepage} \pagestyle{fancy} \makeatother \ExplSyntaxOff

你好,我用了你的这个方法更改,英文摘要页眉,左侧显示的是中文题目,不是英文题目,请问应该怎么更改呀