summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-04-11 22:29:11 +0000
committerKarl Berry <karl@freefriends.org>2012-04-11 22:29:11 +0000
commit5142d55915543ee993196dd71977907cc11edf0a (patch)
treec49cf96c65b1c95e233bd476f9337328b780244c /Master/texmf-dist
parente9e9d8ac7590d62684ffb4773bfa49a8b301e352 (diff)
MemoirChapStyles (11apr12)
git-svn-id: svn://tug.org/texlive/trunk@25918 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.pdfbin1954779 -> 1838805 bytes
-rw-r--r--Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.tex244
-rw-r--r--Master/texmf-dist/doc/latex/MemoirChapStyles/README3
3 files changed, 227 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.pdf b/Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.pdf
index 555912caf8f..e96fde6212a 100644
--- a/Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.pdf
+++ b/Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.tex b/Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.tex
index 74c5e66e744..304c557b319 100644
--- a/Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.tex
+++ b/Master/texmf-dist/doc/latex/MemoirChapStyles/MemoirChapStyles.tex
@@ -11,16 +11,17 @@
%%
%% The Current Maintainer of this work is Lars Madsen (daleif@imf.au.dk).
%%
-%% $LastChangedDate: 2010-05-10 11:02:27 +0200 (Mon, 10 May 2010) $
-%% $LastChangedRevision: 784 $
+%% $LastChangedDate: 2012-04-11 14:02:16 +0200 (Wed, 11 Apr 2012) $
+%% $LastChangedRevision: 1483 $
%%
\begin{filecontents}{chapterexample.tex}
\let\clearforchapter\par % cheating, but saves some space
\chapter{A chapter title}
-Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus
-elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur
-dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id,
-vulputate a, magna.
+Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel,
+wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at,
+lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed
+accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus
+a mi.
\par\fancybreak{$***$}\par
\chapter*{A non-numbered chapter title}
Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel,
@@ -88,7 +89,7 @@ sub compile_file {
\end{filecontents*}
%$
\documentclass[a4paper,11pt,openany]{memoir}
-\def\MyFileVersion{Version 1.7b, 2010/05/10}
+\def\MyFileVersion{Version 1.7e, 2012/04/11}
\setlrmarginsandblock{2.5cm}{*}{1}
\setulmarginsandblock{2.5cm}{2.5cm}{*}
\setmarginnotes{2.5mm}{2cm}{1em}
@@ -143,6 +144,10 @@ sub compile_file {
\define@key{MCS}{pages}{%\typeout{xxx: #1}
\global\@namedef{MCS@pages@\CurrentChapterStyle}{#1}%
}
+\define@key{MCS}{trim}{%\typeout{xxx: #1}
+ \global\@namedef{MCS@trim@\CurrentChapterStyle}{#1}%
+}
+\def\defaulttrim{0 0 0 0}
\newif\ifSCS@full
\newcounter{MCS}
\newenvironment{@showchapterstyle}[1]{%
@@ -201,17 +206,21 @@ sub compile_file {
\fboxsep=4pt%
\begin{adjustwidth}{-\fboxsep-\fboxrule}{-\fboxsep-\fboxrule}%
% \begin{framed}%
- \@ifundefined{MCS@pages@\CurrentChapterStyle}{%
- \fcolorbox{felineframe}{felinesrcbgcolor}{\includegraphics[width=\textwidth]{\CurrentChapterStyle\OutputStylePostfix}}%
+ \@ifundefined{MCS@pages@\CurrentChapterStyle}{%
+ \fcolorbox{felineframe}{felinesrcbgcolor}{%
+ \includegraphics[width=\textwidth,clip]{%
+ \CurrentChapterStyle\OutputStylePostfix}}%
}{%
\edef\nisse{\@nameuse{MCS@pages@\CurrentChapterStyle}}
\@for\ITEM:=\nisse\do{
\ifpdf%
\fcolorbox{felineframe}{felinesrcbgcolor}{\includegraphics%
- [width=\textwidth,page=\ITEM]{\CurrentChapterStyle\OutputStylePostfix}}%
+ [width=\textwidth,page=\ITEM,clip]%
+ {\CurrentChapterStyle\OutputStylePostfix}}%
\else%
\fcolorbox{felineframe}{felinesrcbgcolor}{\includegraphics%
- [width=\textwidth]{\CurrentChapterStyle\OutputStylePostfix-\ITEM}}%
+ [width=\textwidth,clip]%
+ {\CurrentChapterStyle\OutputStylePostfix-\ITEM}}%
\fi%
\bigskip%
\fancybreak{$***$}%
@@ -406,6 +415,24 @@ initialised to
\renewcommand\printchaptertitle[1]{\chaptitlefont #1}
\renewcommand\afterchaptertitle{\par\nobreak\vskip \afterchapskip}
\end{Verbatim}
+In the design og these styles it is also worth noting that the
+contents of \verb|\afterchapternum| is not included within
+\verb|\printchapternonum|, which become important when designing the
+non-numbered part of the style. If one does not remember to add say
+\verb|\par\nobreak\vskip \midchapskip| or similar to
+\verb|\printchapternonum| the title part may be placed differently
+when there is no number.
+
+One might ask what \verb+\printchapternonum+ is good for when it is
+always initialised to nothing. Well if a design need to one could use
+it to insert a phantom width as wide as the chapter name plus number
+would have been. If on the other hand one is creating a style where
+the chapter name and number is actually typeset using
+\verb+\printchaptertitle+ (like a framed one) then one could first
+define a new if construction, say, \verb+\ifNoChapNum+ and then let
+\verb+\printchapternonum+ set this to true and so on.
+
+
So one just have to change the ones one need. There are a few other
macros that are nice to know the meaning of. Remember that these are
\emph{not} reset at the start of a new chapter style.
@@ -427,14 +454,6 @@ title, usually set using \verb+\afterchapternum+, default 20pt
\verb+\normalfont\Huge\bfseries+
\end{description}
\endgroup
-\noindent One might ask what \verb+\printchapternonum+ is good for
-when it is always initialised to nothing. Well if a design need to one
-could use it to insert a phantom width as wide as the chapter name
-plus number would have been. If on the other hand one is creating a
-style where the chapter name and number is actually typeset using
-\verb+\printchaptertitle+ (like a framed one) then one could first
-define a new if construction, say, \verb+\ifNoChapNum+ and then let
-\verb+\printchapternonum+ set this to true and so on.
In memoir a new chapter style is defined as
\begin{syntax}
@@ -512,6 +531,9 @@ version of \cs{numtoName}
\end{showchapterstyle}
\begin{showchapterstyle}{brotherton}
\end{showchapterstyle}
+As with \texttt{demo}, you will need to define your own suitable
+version of \cs{numtoName}
+
\newpage
@@ -977,6 +999,190 @@ In reality, the blue box, covers the with of the paper, but do not
extend to the top op the paper, leaving a white ribbon.
+\starbreak
+
+Here is a variation over the \texttt{texblogtikz} style, provided by
+Verliya Gadis. Note that the text is being cut off on the right due to
+the process used to create the sample images..
+
+\begingroup
+
+\setkeys{Gin}{trim=0 16cm 0 0}
+
+\begin{showchapterstyle*}{verly,pages={1,3}}
+\documentclass{memoir}
+\setlrmarginsandblock{6cm}{3cm}{*}
+\checkandfixthelayout
+\usepackage[svgnames]{xcolor}
+\usepackage{tikz}
+% helper macros
+\newcommand{\ChapWithNumber}[1]{
+ \begin{tikzpicture}[remember picture,overlay]
+ \node[yshift=-3cm] at (current page.north west)
+ {\begin{tikzpicture}[remember picture, overlay]
+ \draw[fill=gray!30!white] (0,-26) rectangle (5,5)
+ (\stockwidth,3cm);
+ \node[anchor=north,xshift=6cm,rectangle,
+ rounded corners=20pt,inner sep=11pt,
+ fill=gray]
+ {\color{white}\chapnamefont\thechapter\space #1};
+ \end{tikzpicture}};
+ \end{tikzpicture}}
+\newcommand{\ChapWithoutNumber}[1]{
+ \begin{tikzpicture}[remember picture,overlay]
+ \node[yshift=-3cm] at (current page.north west)
+ {\begin{tikzpicture}[remember picture, overlay]
+ \draw[fill=gray!30!white] (0,-26) rectangle (5,5)
+ (\stockwidth,3cm);
+ \node[anchor=north,xshift=6cm,rectangle,
+ rounded corners=20pt,inner sep=11pt,
+ fill=gray]{\color{white}\chapnamefont#1};
+ \end{tikzpicture}};
+ \end{tikzpicture}}
+\newif\ifnumberedchap
+\numberedchaptrue
+\makechapterstyle{verly}{
+ \renewcommand\chapnamefont{\normalfont\sffamily\Huge\bfseries}
+ \renewcommand\chapnumfont{\normalfont\sffamily\Huge\bfseries}
+ \renewcommand\chaptitlefont{\normalfont\sffamily\Huge\bfseries}
+ \renewcommand\chapternamenum{}
+ \renewcommand{\afterchapternum}{}
+ \renewcommand\printchaptername{}
+ \renewcommand\printchapternum{}
+ \renewcommand\printchapternonum{\global\numberedchapfalse}
+ \renewcommand\printchaptertitle[1]{%
+ \ifnumberedchap\ChapWithNumber{##1}\else\ChapWithoutNumber{##1}\fi
+ \global\numberedchaptrue
+ }
+}
+\chapterstyle{verly}
+\aliaspagestyle{chapter}{empty} % just to save some space
+\begin{document}
+\chapter{A chapter title}
+Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus
+elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur
+dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id,
+vulputate a, magna.
+
+
+\chapter*{A non-numbered chapter title}
+Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel,
+wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at,
+lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed
+accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus
+a mi.
+
+\end{document}
+\end{showchapterstyle*}
+
+\endgroup
+
+
+\starbreak
+
+I made this next style for a book project to be published in Aarhus
+University Press. The author requested a style without the word
+\emph{Chapter}, and I'd like to do something slightly different,
+something that might be useful for Bachelors projects and other
+similar student projects. In this particular book, chapter titles are
+at most two lines. So the design is made such that if it is two lines
+then the second line stand on the same baseline as the number.
+
+As it is for a book project the specific design depends on the font
+used, the font size, and the line spread.
+
+Since this is a style without the word \emph{Chapter}, it is of course
+a good idea to remove this from the headers. Here is an easy example
+showing how to do this with the default page style:
+\begin{verbatim}
+\addtopsmarks{heading}{}{%
+ \createmark{chapter}{both}{shownumber}{}{. \ }
+}
+\pagestyle{headings}
+\end{verbatim}
+
+
+\begin{showchapterstyle*}{hansen}
+\documentclass[12pt]{memoir}
+\usepackage[T1]{fontenc}
+\usepackage{kpfonts}
+\setSingleSpace{1.1}
+\SingleSpacing
+\usepackage{xcolor,calc}
+
+\definecolor{chaptercolor}{gray}{0.8}
+% helper macros
+\newcommand\numlifter[1]{\raisebox{-2cm}[0pt][0pt]{\smash{#1}}}
+\newcommand\numindent{\kern37pt}
+\newlength\chaptertitleboxheight
+
+\makechapterstyle{hansen}{
+ \renewcommand\printchaptername{\raggedleft}
+ \renewcommand\printchapternum{%
+ \begingroup%
+ \leavevmode%
+ \chapnumfont%
+ \strut%
+ \numlifter{\thechapter}%
+ \numindent%
+ \endgroup%
+ }
+ \renewcommand*{\printchapternonum}{%
+ \vphantom{\begingroup%
+ \leavevmode%
+ \chapnumfont%
+ \numlifter{\vphantom{9}}%
+ \numindent%
+ \endgroup}
+ \afterchapternum}
+ \setlength\midchapskip{0pt}
+ \setlength\beforechapskip{0.5\baselineskip}
+ \setlength{\afterchapskip}{3\baselineskip}
+ \renewcommand\chapnumfont{%
+ \fontsize{4cm}{0cm}%
+ \bfseries%
+ \sffamily%
+ \color{chaptercolor}%
+ }
+ \renewcommand\chaptitlefont{%
+ \normalfont%
+ \huge%
+ \bfseries%
+ \raggedleft%
+ }%
+ \settototalheight\chaptertitleboxheight{%
+ \parbox{\textwidth}{\chaptitlefont \strut bg\\bg\strut}}
+ \renewcommand\printchaptertitle[1]{%
+ \parbox[t][\chaptertitleboxheight][t]{\textwidth}{%
+ %\microtypesetup{protrusion=false}% add this if you use microtype
+ \chaptitlefont\strut ##1\strut}%
+ }
+}
+\chapterstyle{hansen}
+\aliaspagestyle{chapter}{empty} % just to save some space
+\begin{document}
+\let\clearforchapter\par % cheating, but saves some space
+\chapter{A chapter title}
+Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel,
+wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at,
+lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed
+accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus
+a mi.
+\par\fancybreak{$***$}\par
+\chapter*{A non-numbered chapter title}
+Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel,
+wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at,
+lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed
+accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus
+a mi.
+\end{document}
+\end{showchapterstyle*}
+
+
+
+
+
+
\chapter{Vincent Zoonekynd}
\label{sec:vincent-zoonekynd}
diff --git a/Master/texmf-dist/doc/latex/MemoirChapStyles/README b/Master/texmf-dist/doc/latex/MemoirChapStyles/README
index 7d6cd17fb91..da425577efe 100644
--- a/Master/texmf-dist/doc/latex/MemoirChapStyles/README
+++ b/Master/texmf-dist/doc/latex/MemoirChapStyles/README
@@ -1,4 +1,4 @@
-% (C) Lars Madsen, daleif@imf.au.dk, 2010/05/08
+% (C) Lars Madsen, daleif@imf.au.dk, 2012/04/11
% This material is subject to the LaTeX Project Public License.
% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
% for the details of that license.
@@ -31,6 +31,7 @@ README -- this document
Versions
---------
+1.7e Added two new chapter styles, verly and hansen
1.7b An automatec build seems to have cropped a bit too much in
the TiKz example, fixed
1.7 Back in sync with the current memoir. Also added a TiKz based