Chinaunix首页 | 论坛 | 博客
  • 博客访问: 369470
  • 博文数量: 23
  • 博客积分: 7075
  • 博客等级: 少将
  • 技术积分: 1245
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-24 01:19
文章分类

全部博文(23)

文章存档

2009年(9)

2008年(14)

我的朋友

分类: LINUX

2008-05-01 12:15:30

%# -*- coding: utf-8 -*-
\documentclass{book}
\usepackage{fontspec,xunicode,ifthen,indentfirst}
\usepackage[colorlinks,bookmarksopen,pdfstartview=FitH]{hyperref}
\usepackage{fancyhdr}
\usepackage{titlesec, titletoc}
\usepackage{moresize}
 
\begin{document}
\setmainfont[Ligatures={Common, Rare}, Mapping=tex-text, BoldFont=Adobe Heiti Std]{Adobe Song Std}
%% Adobe Reader 8.0 的中文包里包含了这两个中文字体
 
%\def ~{\hspace {0.25em plus 0.125em minus 0.08em}\ignorespaces}
\def\CJKnumber #1{\ifcase #1 \or\or\or\or\or\or\or\or\or\fi}
 
\newcommand{\prechaptername}{}
\newcommand{\postchaptername}{}
\newcommand{\chapterformat}{\prechaptername\CJKnumber{\thechapter}\postchaptername}
\renewcommand{\contentsname}{\quad}
 
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chapterformat}{20pt}{\Huge}
\titlecontents{chapter}[0em]{\addvspace{1.5ex}\bfseries}
    {\prechaptername\CJKnumber{\thecontentslabel}\postchaptername\quad}{\hspace*{-2.3em}}
    {\hfill{}\contentspage}[\addvspace{0.5ex}]
   
\fancyhead{}
\fancyhead[RO,LE]{\bfseries\chapterformat}
\fancyhead[LO,RE]{\bfseries\thetitle}
\fancyfoot[C]{\thepage}
%      E       偶数页
%      O       奇数页
%      L       页眉或页脚的左边部分
%      C       页眉或页脚的中间部分
%      R       页眉或页脚的右边部分
%      H       页眉
%      F       页脚
 
\newcommand\thetitle{Of Blood And Honor}
\newcommand\theauthor{Chris Metzen}
 
\setlength{\parindent}{2em}
 
%%** End of globle configuration **%%
 
\pagestyle{empty}
%The valid options are:
%    * plain - Just a plain page number.
%    * empty - Produces empty heads and feet - no page numbers.
%    * headings - Puts running headings on each page. The document style specifies what goes in the headings.
%    * myheadings - You specify what is to go in the heading with the \markboth or the \markright commands.
 
\begin{titlepage}
\fontspec[Ligatures={Common, Rare}, Mapping=tex-text]{Zapfino} %% Mac OSX Font: Zapfino.dfont
\centering
\HUGE\thetitle\\
\large\theauthor
\end{titlepage}
 
\frontmatter
\pagestyle{headings}\tableofcontents
 
\XeTeXlinebreaklocale "zh"
\XeTeXlinebreakskip = 0pt plus 1pt
 
\mainmatter\pagestyle{fancy}
 
\input{ch1}
 
\end{document}
阅读(2650) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~