[XeTeX] xelatex: chapter style in book

baptiste Auguié ba208 at exeter.ac.uk
Sun May 25 22:01:52 CEST 2008


Thanks, I think I've got it sorted! The only thing left now is the  
writing up...

Cheers,

baptiste

PS: for the record, below is my modified quotchap.sty (would need  
some cleaning if somebody was to reuse this)

%%
%% This is file `quotchap.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% quotchap.dtx
%%
%% This file is part of the QUOTCHAP package, a package a package for
%% creating decorative chapter headings with quotations, a postscript
%% output device is needed. Copyright (C) 1998 Karsten Tinnefeld.
%%
%% This file is NOT part of the LaTeX2e system, but intended for use  
with
%% it.
%%
%% This file is free software; you can redistribute it and/or modify it
%% under the terms of the GNU Library General Public License as  
published
%% by the Free Software Foundation; either version 2 of the License, or
%% (at your option) any later version.
%%
%% This document is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%% General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% somehow; if not, write to the Free Software Foundation, Inc., 675  
Mass
%% Ave, Cambridge, MA 02139, USA.
%%
%% Error Reports in case of UNCHANGED versions to
%%
%%              Karsten Tinnefeld
%%              Leostrasse 11
%%              D-44225 Dortmund
%%              Germany
%%       Email: tinnefeld at irb.cs.uni-dortmund.de
%%
%% modified for use with XeTeX, baptiste Auguie, 25/05/08
%% uses three custom fonts:
%%
%%\newfontfamily\BW[Numbers=Lining,Scale=4,Color=8C8C8C88]{Hoefler  
Text} % big number
%%\newfontfamily\QF[Alternate=1,Color=8C8C8CBB]{Hoefler Text Italic}  
% quote
%%\newfontfamily\CF[Alternate=1,Color=8C8C8CBB]{Hoefler Text Italic}  
% chapter title
%%
%%%%%%%%%%%%%%%
\ProvidesPackage{quotchap}
   [1998/02/09 v0.9f Decorative Chapter Headings with Quotes]
\newif\if at usecolor\@usecolortrue
\DeclareOption{grey}{\@usecolortrue}
\DeclareOption{nogrey}{\@usecolorfalse}
\newcommand*{\@newfontcmd}{\@ifundefined{@defaultcnfont}{\newcommand*}{%
     \PackageWarning{quotchap}{%
       You have tried to specify more than one font to be\MessageBreak
       used for the chapter numbers. I ignore the font\MessageBreak
       `\CurrentOption'}
     \providecommand*}}
\DeclareOption{charter}{\@newfontcmd{\@defaultcnfont}{bch}}
\DeclareOption{palatino}{\@newfontcmd{\@defaultcnfont}{ppl}}
\DeclareOption{avantgarde}{\@newfontcmd{\@defaultcnfont}{pag}}
\DeclareOption{bookman}{\@newfontcmd{\@defaultcnfont}{pbk}}
\DeclareOption{courier}{\@newfontcmd{\@defaultcnfont}{pcr}}
\DeclareOption{helvetica}{\@newfontcmd{\@defaultcnfont}{phv}}
\DeclareOption{newcentury}{\@newfontcmd{\@defaultcnfont}{pnc}}
\DeclareOption{times}{\@newfontcmd{\@defaultcnfont}{ptm}}
\DeclareOption{utopia}{\@newfontcmd{\@defaultcnfont}{put}}
\ProcessOptions\relax
\providecommand*{\@defaultcnfont}{phv}
\if at usecolor
   \IfFileExists{color.sty}{%
     \RequirePackage{color}
     \definecolor{chaptergrey}{rgb}{0.6,0.6,0.6}}{%
     \PackageError{quotchap}{%
       The color package is apparently unavailable.\MessageBreak
       Turn off the `grey' option and come back again}{%
       Since you did not say `nogrey', quotchap defined chapter
       numbers to appear\MessageBreak grey. You do not need a color
       printer, since most printing devices can cope\MessageBreak with
       grey scales, but you need the color package coming with the
       graphics\MessageBreak bundle available from CTAN.}}
\else
   \providecommand*{\color}[1]{}
\fi
\AtEndOfPackage{%
   \newcommand*{\chapnumfont}{%
     \BN\selectfont%
     \color{chaptergrey}}
   \let\size at chapter\Huge
   \providecommand*{\chapterheadstartvskip}{\vspace*{2.3\baselineskip}}
   \providecommand*{\chapterheadendvskip}{\vspace{1.7\baselineskip}}
   \providecommand*{\sectfont}{\relax}
   \@ifundefined{@mainmattertrue}{\newif\if at mainmatter 
\@mainmattertrue}{}}
\newenvironment{savequote}[1][11cm]{%
   \begin{lrbox}{\@quotebox}
     \begin{minipage}[t]{#1}\QF\footnotesize
       \ignorespaces}{%
      \unskip\end{minipage}\end{lrbox}
   \global\setbox\@quotebox\copy\@quotebox
   \global\let\@printcites\@iprintcites
   \ignorespacesafterend}
\newcommand{\qauthor}[1]{%
   \par\smallskip
   {\raggedleft\upshape #1\qquad\hbox{}\par}\bigskip}
\newsavebox{\@quotebox}
\let\@printcites\relax
\renewcommand\chapter{%
   \if at openright\cleardoublepage\else\clearpage\fi
   \thispagestyle{plain}%
   \global\@topnum\z@
   \@printcites
   \@afterindentfalse
   \secdef\@chapter\@schapter}
\renewcommand{\@makechapterhead}[1]{\chapterheadstartvskip%
   {\size at chapter{\sectfont\CF\raggedleft
       {\chapnumfont
         \ifnum \c at secnumdepth >\m at ne%
         \if at mainmatter\thechapter \vspace{1.7\baselineskip}%
         \fi\fi
         \par\nobreak}%
       {\raggedleft\advance\leftmargin10em\interlinepenalty\@M #1\par}}
     \nobreak\chapterheadendvskip}}
\renewcommand{\@makeschapterhead}[1]{%
   {\let\c at secnumdepth\m at ne\@makechapterhead{#1}}}
\newcommand*{\@iprintcites}{%
   \vbox to\z@{\copy\@quotebox\vss}
   \global\let\@printcites\relax}
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\endinput
%%
%% End of file `quotchap.sty'.



On 25 May 2008, at 16:41, Peter Dyballa wrote:

>
> Am 25.05.2008 um 14:31 schrieb baptiste Auguié:
>
>> Would someone be kind enough to direct me in what to change? (maybe
>> using the titlesec package only with a clever macro?)
>
>
> Renew this command from inside /usr/local/texlive/2007/texmf-dist/tex/
> latex/quotchap/quotchap.sty:
>
>    \newcommand*{\chapnumfont}{%
>      \usefont{T1}{\@defaultcnfont}{b}{n}\fontsize{100}{130} 
> \selectfont%
>      \color{chaptergrey}}
>
> You could simply substitute \@defaultcnfont with a fontspec name. You
> can do this in your LaTeX file.
>
> --
> Greetings
>
>    Pete
>
> When you meet a master swordsman,
> show him your sword.
> When you meet a man who is not a poet,
> do not show him your poem.
> 		– Rinzai, ninth century Zen master
>
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex

_____________________________

Baptiste Auguié

Physics Department
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag
http://projects.ex.ac.uk/atto
______________________________







More information about the XeTeX mailing list