diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-15 21:24:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-15 21:24:26 +0000 |
commit | 2592f76b0b06d4e122b0fd96f45081a697a073b4 (patch) | |
tree | 2fada47ee7cdc9d966c6279c504481a5bb50f085 /Master/texmf-dist/doc/latex | |
parent | 0a991401296aa91b41e4419c60e41af18dea5836 (diff) |
ycbook (15mar16)
git-svn-id: svn://tug.org/texlive/trunk@40034 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/ycbook/README.md | 17 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdf | bin | 0 -> 43769 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/ycbook/ycbook-doc.tex | 203 |
3 files changed, 220 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/ycbook/README.md b/Master/texmf-dist/doc/latex/ycbook/README.md new file mode 100644 index 00000000000..3e945534db5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ycbook/README.md @@ -0,0 +1,17 @@ +# ycbook +ycbook Latex class + +======= ycbook -- A Latex Class for Books and Reports ========== + + +Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 2016 + + This file is part of the ycbook LaTeX2e class. + This work may be distributed and/or modified under the conditions of + the LaTeX Project Public License, version 1.3c of the license. + The latest version of this license is in + http://www.latex-project.org/lppl.txt + and version 1.3c or later is part of all distributions of LaTeX + version 2005/12/01 and of this work. + + This work has the LPPL maintenance status "author-maintained". diff --git a/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdf b/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdf Binary files differnew file mode 100644 index 00000000000..19ff9951403 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdf diff --git a/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.tex b/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.tex new file mode 100644 index 00000000000..330fcaa42f1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.tex @@ -0,0 +1,203 @@ +% ====================================================================== +% ycbook-doc.tex +% Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 2016 +% +% This file is part of the ycbook LaTeX2e class. + +% This work may be distributed and/or modified under the conditions of +% the LaTeX Project Public License, version 1.3c of the license. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3c or later is part of all distributions of LaTeX +% version 2005/12/01 and of this work. +% +% This work has the LPPL maintenance status "author-maintained". +% ====================================================================== + +\documentclass[withmarginpar,titleauthor,11pt]{mwart} +\usepackage[english]{babel} +\usepackage[dvipsnames,svgnames]{xcolor} +\usepackage{fontspec} +\setmainfont{Chaparral Pro}%[Numbers=OldStyle] +\setsansfont{Myriad Pro}[Scale=.9] \setmonofont{Myriad Pro}[Scale=.9,Color=Teal]%{Inconsolata}%[Scale=0.9] +\usepackage[framemethod=tikz]{mdframed} +\surroundwithmdframed[linecolor=MediumPurple,skipabove=10pt,skipbelow=6pt, backgroundcolor=green!10,roundcorner=6pt +]{verbatim}%roundcorner=10pt, +%MediumSeaGreen +%OrangeRed +\usepackage{hyperref} +\usepackage{fancyvrb} +\frenchspacing + +\SetSectionFormatting{section} +{24pt plus5pt minus2pt} %space before +{\normalfont\centering\scshape\large\ifHeadingNumbered + \HeadingNumber.\enspace\fi + \HeadingText} +{10pt plus3pt}%space after + +\SetSectionFormatting{subsection} +{16pt plus4pt minus2pt} +{\FormatHangHeading{\normalfont\itshape}} +{6pt plus2pt} + + +\usepackage[style=authoryear-icomp]{biblatex} +\addbibresource{ycbook-bibliografia.bib} + + +%\usepackage[justification=raggedright,font={sf},labelfont=bf]{caption} +\usepackage{picinpar} + +\setlength{\marginparwidth}{1.3in} + + +\newcommand{\option}[1]{\marginpar{\footnotesize \textit{#1}}} +%\newcommand{\opt}[1]{<<\textit{#1}>>} +\newcommand{\opt}[1]{\texttt{#1}} + + +\title{\textit{ycbook}\\ A versatile and simple book class} +\author{Youssef Cherem\\\normalfont \href{mailto:ycherem@gmail.com}{ycherem@gmail.com}} +\date{MMXVI} + + +\begin{document} + + \maketitle + +\begin{abstract} +This class is intended to be an interpretation of the \texttt{mwbk} class from Mar\-cin Woli\'{n}ski's \texttt{mwcls} classes. The \texttt{mwcls} classes are simple, yet powerful and customizable classes that allow the end-user to customize the layout of headers, headings etc. They also have the benefit of being more economic in space than the most common \LaTeX\ classes, while keeping a clear appearance and a smooth flow. +\end{abstract} + +\section*{The reasons for this class} +Although many usual \LaTeX\ packages offer a wide array of solutions for text block and margin specifications, and although some of them, notably \textsf{Koma-Script} \parencite{koma-script} allow and facilitate the application of ``classical" canons of page construction \parencite{tschichold_form_1991,bringhurst_elements_2013}, one may have several reasons to avoid this aesthetical solution. One reason is that these page construction methods were intended, obviously, for handwritten or printed material. Even assuming the material is to be printed, one reason to find an alternative is economic and environmental: the more paper you print, the more it will cost---both in terms of money and environmental impact. But the user also wishes to avoid a sloppy solution, squeezing as much content as possible onto the page just to save space. The compromise solution would be somewhat closer to what most commercial books look like---without jeopardizing legibility. In fact, it is rare to find a book that looks like it has been laid out according to the ``canons". That is one motive why I find the \texttt{mwcls} classes \parencite{mwcls} useful. Besides, \texttt{mwcls} alternatives for basic classes (\texttt{mwart} for articles, \texttt{mwrep} for reports and \texttt{mwbk} for books) allow the user to easily modify headings, being somewhat more flexible and providing a simpler interface than some alternative classes. All I did was to provide a more user-friendly syntax for some common tweaks and more alternatives to some rather unusual page (numbering) styles available by default in \texttt{mwbk} and \texttt{mwrep}. As for the \texttt{mwart} class, I did not find anything to be changed---although the user might adapt some of the options presented in the \texttt{ycbook} class. + + + +\section{Options for chapter and section} +To add a rule below chapter and section titles, use \opt{chapterrule} and +\opt{sectionrule}. Other sectional headings may be changed likewise: + +\option{chapterrule} +\option{sectionrule} + + +\begin{verbatim} + \SetSectionFormatting{section} + {24pt plus5pt minus2pt} %space before + {\large\textbf{\ifHeadingNumbered + \HeadingNumber.\enspace\fi + \HeadingText}\\\rule[10pt]{\hsize}{0.4pt}} + {10pt plus3pt}%space after +\end{verbatim} + +\option{chaptercentered} +\option{chapterleft} +\option{chapterright} + +Options \opt{chaptercentered}, \opt{chapterleft}, and \opt{chapterright} control chapter alignment. + +\option{nochaptercentered} +\option{nochapterleft} +\option{nochapterright} + +Options \opt{nochaptercentered}, \opt{nochapterleft}, and \opt{nochapterright} control chapter alignment and exclude the name “Chapter” from the entry. The default, as in the \texttt{mwcls} classes, is \opt{chapterleft}. + +\section{Options for headings} +\option{headings} +\option{headings=beforeplain} +\option{myheadings} +\option{myheadings=beforeplain} + +\texttt{mwbk} has empty pagestyles for chapters, and for the last page in every chapter, and also the usual blank (empty) page so that a chapter always starts with an odd (\textit{recto}) page. Page numbering with headers has been added the last page of every chapter; chapter opening pages have been changed to the \texttt{plain} style, and the options to the left have been added for ease of use. Options \opt{headings=beforeplain} and \opt{myheadings=beforeplain} have been added, in which an even page finishing a chapter takes the \opt{plain} style. The default options is \opt{headings}. + + +\verb| \pagestyle{uheadings}| and \verb|\pagestyle{myuheadings}| may be used instead, defaulting to more usual parameters, and in which the header is separated by a thin line. + +This class is compatible with the \verb|scrlayer-scrpage| (formerly \verb|scrpage2|) for headers and footers, so you can do fun things like this to color your head line: + + +\begin{verbatim} +\usepackage[headsepline]{scrlayer-scrpage} +\addtokomafont{headsepline}{\color{JungleGreen}} +\usepackage[dvipsnames,svgnames,x11names]{xcolor} +\pagestyle{scrheadings} +\end{verbatim} + +And of course simpler things such as: + +\begin{verbatim} +\usepackage{scrlayer-scrpage} +\clearpairofpagestyles +\pagestyle{scrheadings} +\ofoot{\pagemark} +\chead{A centered heading} +\end{verbatim} + +For additional information, see chapters 5 and 18 of the \textsf{Koma-Script} manual. + +\section{Table of contents styles} +\option{toc} The \opt{toc} option uses the Ko\-ma-\-Script-bundle for table of contents styles, so you can, for example, define +\verb|\usetocstyle{nopagecolumn}| +for another style. + +%\section{Captions} +%Captions have been redefined with the \verb|caption| package with the following parameters: \verb|justification=raggedright,font={sf},labelfont=bf|. +% +%\marginpar{\includegraphics[width=\marginparwidth]{apparition-fogg} +% \captionof{figure}{\textit{L'apparition}, by Gustave Moreau, 1876--1877. Fogg Art Museum.} +% } + + + +\section{Margin paragraphs and footnotes} +\option{sansserifnotes} The option \opt{sansserifnotes} changes all footnotes to sans serif. + +Marginpars were redefined, so that they only appear on the right side of the page, either on an odd or an even page. You can choose to turn all footnotes into margin notes with the \textit{footmisc} package: + +\begin{verbatim} +\usepackage[side,ragged,flushmargin]{footmisc} +\end{verbatim} + +\section{Other options} +All other options from the \textit{mwcls} classes are available, e.g.: + +\begin{itemize} +\item \texttt{floatssmall}; +\item \texttt{floatsnormalsize}; +\item \texttt{sfheadings}; +\item \texttt{authortitle} (default); +\item \texttt{titleauthor}; +\item \verb|\renewcommand{\sectsettings}{}|; +\item \verb|\SetTOCIndents|, +\item \verb|indentfirst| and \verb|noindentfirst|, +\item \verb|wide|, for shorter margins, and +\item font size and paper specifications (12pt, a5paper, etc.). +\end{itemize} + +\section{Figures spreading over two pages} + +Thanks to Martin Scharrer,\footnote{\url{http://tex.stackexchange.com/a/23865/9424}} + we also have \verb|\twopagepicture| (for numbered pictures) and \verb|\twopagepicturen| (for unnumbered pictures) to automatically split a picture on a spread (left and right pages). + +It works thus: \verb|\twopagepicture{image place regarding the caption}|\\ \verb|{text width or page width}{image}{caption}|: + +\begin{itemize} + \item \verb|\twopagepicture{b}{l}{image}{Test}|: image below caption (“b”), same width as text (“l”); + \item \verb|\twopagepicture{t}{l}{image}{Test}|: image above caption (“t”), same width as text (“l”); + \item \verb|\twopagepicture{b}{p}{image}{Test}|: image below caption (“b”), same width as page (“p”), and + \item \verb|\twopagepicture{t}{p}{image}{Test}|: image above caption (“t”), same width as page (“p”), +\end{itemize} + +%\section{Implementation} +% +% +%\lstinputlisting{ycbook.cls} + +%\marginpar{\textit{\small This document was typeset with Sedán, by Sebastián Salazar.}} + +\printbibliography + +\end{document} + |