BBS水木清华站∶精华区
发信人: energy (长白山), 信区: Linux
标 题: scrbook.cls也改得差不多了
发信站: BBS 水木清华站 (Wed Dec 1 03:24:12 1999)
干了两个多小时, 把scrbook的模板改了改. 好麻烦.
虽然已经象个样子了, 不过一些细微之处, 如各处的间隔等等, 还不规范.
不过总算可以用CJK+TeX写论文了. 下面是些记录, 哪位大虾能帮忙继续?
1. 章标题中间对齐
scrbook.cls
\def\@makechapterhead#1{\chapterheadstartvskip%
{\size@chapter{\sectfont
\@hangfrom{\ifnum \c@secnumdepth >\m@ne%
\if@mainmatter \chapterformat\fi\fi}%
{\raggedsection \interlinepenalty \@M #1\par}}
\nobreak\chapterheadendvskip
}}
==>
\def\@makechapterhead#1{\chapterheadstartvskip%
{\size@chapter{\sectfont\centering
\@hangfrom{\ifnum \c@secnumdepth >\m@ne%
\if@mainmatter \chapterformat\fi\fi}%
{\interlinepenalty \@M #1\par}}
\nobreak\chapterheadendvskip
}}
2. section加\S
scrbook.cls
\renewcommand*\thesection {\thechapter.\@arabic\c@section}
==>
\renewcommand*\thesection {\S\thechapter.\@arabic\c@section}
3. 目录居中
scrbook.cls
\chapter*{\contentsname
\@mkboth{\contentsname}{\contentsname}}%
==>
\chapter*{\centering \contentsname
\@mkboth{\contentsname}{\contentsname}}%
4. 节居中
{\raggedsection\normalfont\size@section\sectfont}}
==>
{\centering\normalfont\size@section\sectfont}}
5. 正文章标题格式
gb.cap
\newcommand\prechaptername{第}
\newcommand\postchaptername{章}
\renewcommand\chapterformat{\prechaptername\CJKnumber{\value{chapter}}\postchaptername\quad}
6. 首行缩进
gb.cap
\def\@afterheading{%
\@nobreaktrue
\everypar{%
\if@nobreak
\@nobreakfalse
\clubpenalty \@M
%org \if@afterindent \else
%org {\setbox\z@\lastbox}%
%org \fi
\else
\clubpenalty \@clubpenalty
\everypar{}%
\fi}}
--
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 202.192.242.206]
BBS水木清华站∶精华区