Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增并测试单面格式 #122

Closed
TheNetAdmin opened this issue Jan 6, 2021 · 2 comments
Closed

新增并测试单面格式 #122

TheNetAdmin opened this issue Jan 6, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@TheNetAdmin
Copy link
Owner

TheNetAdmin commented Jan 6, 2021

可改进的内容

此前 zjuthesis 一直默认使用双面格式,现在新增 TwoSide 选项以满足更多学院的格式要求。

TwoSide 默认为 true,但当设置为 false 时,需要额外测试各个页面的格式:

例如 #94 《浙江大学研究生学位论文编写规则 》 2.2.2.3 提到:单面复印时页码排在页脚居中位置,双面复印时页码分别按左右侧排列。 但当前模板并没有做出对应修改。

@TheNetAdmin TheNetAdmin added the enhancement New feature or request label Jan 6, 2021
@ZJU-EE-Robotics
Copy link

因为急着用,魔改了一通,双面变成了单面,即去掉了空白页,并使页码居中显示。

  1. 在zjuthesis.cls中将
    \LoadClass[
    zihao=-4,
    UTF8,
    twoside
    ]{ctexrep}
    改成
    \LoadClass[
    zihao=-4,
    UTF8,
    oneside
    ]{ctexrep}

  2. 在config/commands.tex中将
    \newcommand{\cleardoublestylepage}[1]
    {
    \clearpage
    \if@twoside
    \ifodd\c@page
    % do nothing
    \else
    \thispagestyle{数学公式编号问题 #1} ~
    \newpage
    \thispagestyle{数学公式编号问题 #1}
    \fi
    \fi
    }
    改为
    \newcommand{\cleardoublestylepage}[1]
    {
    \clearpage
    \if@twoside
    \ifodd\c@page
    % do nothing
    \else
    \thispagestyle{数学公式编号问题 #1} ~
    \newpage
    \thispagestyle{数学公式编号问题 #1}
    \fi
    \fi
    \if@oneside
    \ifodd\c@page
    % do nothing
    \else
    \thispagestyle{数学公式编号问题 #1} ~
    \newpage
    % \thispagestyle{数学公式编号问题 #1}
    \fi
    \fi
    }

3.在config/format/general/layout.tex中将
\fancypagestyle{common}
{
\commonhead{}
\fancyfoot{}
\fancyfoot[OR,EL]{\zihao{-5} \thepage}
}
\fancypagestyle{previous}
{
\fancyhead{}
\fancyfoot{}
\fancyfoot[OR,EL]{\zihao{-5}\Roman{page}}
\renewcommand{\headrulewidth}{0pt}
}
改为
\fancypagestyle{common}
{
\commonhead{}
\fancyfoot{}
\fancyfoot[OC,EC]{\zihao{-5} \thepage}
}
\fancypagestyle{previous}
{
\fancyhead{}
\fancyfoot{}
\fancyfoot[OC,EC]{\zihao{-5}\Roman{page}}
\renewcommand{\headrulewidth}{0pt}
}
完成后重新编译运行即可。

@ZJU-EE-Robotics
Copy link

第2点可以忽略不需要改,那个是创建新命令的,作者创建了这个命令之后貌似没有使用,这里我被迷惑了。
所以oneside和twoside是某个包自带的api吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants