Re: [问题] 关于使用fancy编辑考卷页首

楼主: zidanesquall (Master)   2015-12-09 10:53:39
之前直接使用设定页首的方式,但是感觉好像不太好看
想再请教一下
我是用exam 环境下制作考卷
我使用fancyhdr制作页首页尾,会出现问题...
会出现
“Command \lhead already defined. Or name \end... illegal, see p.192 of the manual.
See the LaTeX manual of LaTeX Companion for explanation. Type H <return> for immediate help.
l.266 ... \lhead}{\@ifnextchar}{\@xlhead}{\@ylhead}”
这是我的设定码
\documentclass[12pt,b4paper]{exam}
\usepackage{fontspec} % 允许设定字体
\usepackage{amsmath,amsthm,amssymb}
\usepackage{xeCJK} % 分开设置中英文字型
\setCJKmainfont{Kaiti TC} % 设定中文字型
%\setmainfont{Georgia} % 设定英文字型
%\setromanfont{Georgia} % 字型
%\setmonofont{Courier New}
\usepackage{Rvector}
\usepackage{stmaryrd}
\usepackage[left=1cm, right=1cm, bottom=1.9cm]{geometry}
\renewcommand\choicelabel{(\thechoice)} %将选择题选项改成(A)....
\XeTeXlinebreaklocale "zh" % 针对中文自动换行
\XeTeXlinebreakskip = 0pt plus 1pt % 字与字之间加入0pt至1pt的间距,确保左右对整齐
%\parindent 0em % 段落缩进
%\setlength{\parskip}{20pt} % 段落之间的距离
\extrawidth{+0.6in}
\pointsinmargin
\marginpointname{\%}
\usepackage{fancyhdr}
%\usepackage{lastpage}
\pagestyle{fancyplain}
\lhead{\fancyplain{}{FoolEgg.com}} % 左页首
\chead{} % 中页首
\rhead{\fancyplain{}{在OSX平台上的XeLaTeX中文测试}} % 右页首
\lfoot{} % 左页尾
\cfoot{\fancyplain{}{\thepage\ of \pageref{LastPage}}} % 中页尾
\rfoot{} % 右页尾
\begin{document}
...
\end{document}
反而使用
\pagestyle{headandfoot}
\firstpageheader{\large\bf 1.答案卡\\\LARGE{104学年度第1学期第2次期中考高三数学科题目卷}\\班级:$\qquad\qquad$姓名:$\qquad\qquad\qquad$座号:$\quad$}{}{}
这样子就没有问题@@
想请问一下,有一定要使用fancyhdr,还是使用我原本的方式就好?
这是exam的介绍
http://www-math.mit.edu/~psh/exam/examdoc.pdf
最近想将学校固定的格式使用latex设定出来
但是我怎么设定就是没有原本word设定的感觉
用了LARGE,整排会多跑一个字,用Large又会太小
我想设定成这个样子
http://tinyurl.com/p7hzl2b
设定是不是会比较麻烦?
作者: EdwardGJLee (LGJ)   2015-12-10 10:02:00
exam 和 fancyhdr 的 header/footer 会冲突。用 exam 的 header/footer 应该就很够用了。用 \fontsize 去设一个 LARGE 及 Large 之间的大小。

Links booklink

Contact Us: admin [ a t ] ucptt.com