Code Monkey home page Code Monkey logo

Comments (9)

luoshui3000 avatar luoshui3000 commented on September 7, 2024 1

可正确运行版本:
%% ps@bupt@headings 有页眉有页脚
\def\ps@bupt@headings{%
\def\@oddhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\leftmark\hfil%
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def\@evenhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@page@head\hfil
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def\@oddfoot{\hfil\wuhao\thepage\hfil}
\let\@evenfoot=\@oddfoot
}
%% ps@bupt@pubheadings 有页眉有页脚(发表文章)
\def\ps@bupt@pubheadings{%
\def\@oddhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@label@tableofpublications\hfil%
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def\@evenhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@page@head\hfil
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def\@oddfoot{\hfil\wuhao\thepage\hfil}
\let\@evenfoot=\@oddfoot
}

from buptgraduatethesis.

qin-nz avatar qin-nz commented on September 7, 2024

参考一下 7.0 或者之前的版本。 理论上,学校是要求不居中的,但学校给的word模版又是居中的。所以……

from buptgraduatethesis.

buptygz avatar buptygz commented on September 7, 2024

怎么居中呢?解决了吗?不知道在哪个地方修改

from buptgraduatethesis.

buptygz avatar buptygz commented on September 7, 2024

版本v7.1编译成pdf之后,页眉为偶数页左对齐,奇数页右对齐。请问如何居中对齐?

你解决了吗?怎么居中的问题

from buptgraduatethesis.

buptygz avatar buptygz commented on September 7, 2024

参考一下 7.0 或者之前的版本。 理论上,学校是要求不居中的,但学校给的word模版又是居中的。所以……
尝试改了一下 还是不能居中

from buptgraduatethesis.

MrCoderKai avatar MrCoderKai commented on September 7, 2024

分享一下解决方法。
打开文件:buptgraduatethesis.cls
找到命令\ps@bupt@headings的定义,将其定义改成下面的,就可以了。
%% ps@bupt@headings 有页眉有页脚
\def\ps@bupt@headings{%
\def@oddhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\leftmark\hfil%
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def@evenhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@page@head\hfil
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def@oddfoot{\hfil\wuhao\thepage\hfil}
\let@evenfoot=@oddfoot
}
此外,攻读学位期间发表的学术论文目录页面的页眉也需要居中,将ps@bupt@pubheadings的定义修改成如下代码:
%% ps@bupt@pubheadings 有页眉有页脚(发表文章)
\def\ps@bupt@pubheadings{%
\def@oddhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@label@tableofpublications\hfil%
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def@evenhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@page@head\hfil
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def@oddfoot{\hfil\wuhao\thepage\hfil}
\let@evenfoot=@oddfoot
}

from buptgraduatethesis.

metheway avatar metheway commented on September 7, 2024

搞定了,感谢,不过这个格式有点不对,直接粘贴会出问题。主要就是加上hfil,并且用把hfill改为hfil

from buptgraduatethesis.

nicai009 avatar nicai009 commented on September 7, 2024

buptgraduatethesis.cls对应部分更换成如下:
MrCoderKai commented on 23 Oct 2018
的回答直接复制过去不太对

%% ps@bupt@headings 有页眉有页脚
\def\ps@bupt@headings{%
\def@oddhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\leftmark\hfil%
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def@evenhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@page@head\hfil
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def@oddfoot{\hfil\wuhao\thepage\hfil}
\let@evenfoot=@oddfoot
}
%% ps@bupt@pubheadings 有页眉有页脚(发表文章)
\def\ps@bupt@pubheadings{%
\def@oddhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@label@tableofpublications\hfil%
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def@evenhead{%
\vbox to\headheight{%
\hb@xt@\textwidth{%
\xiaowu\song\hfil\bupt@page@head\hfil
}%
\vskip3pt\hbox{%
\vrule width\textwidth height0.4pt depth0pt
}
}
}
\def@oddfoot{\hfil\wuhao\thepage\hfil}
\let@evenfoot=@oddfoot
}

from buptgraduatethesis.

Ver0n1ca avatar Ver0n1ca commented on September 7, 2024

在上面这个代码里面\let@evenfoot=@oddfoot要改成\let\@evenfoot=\@oddfoot,不然编译报错。

from buptgraduatethesis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.