summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-03-15 21:24:26 +0000
committerKarl Berry <karl@freefriends.org>2016-03-15 21:24:26 +0000
commit2592f76b0b06d4e122b0fd96f45081a697a073b4 (patch)
tree2fada47ee7cdc9d966c6279c504481a5bb50f085
parent0a991401296aa91b41e4419c60e41af18dea5836 (diff)
ycbook (15mar16)
git-svn-id: svn://tug.org/texlive/trunk@40034 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/ycbook/README.md17
-rw-r--r--Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdfbin0 -> 43769 bytes
-rw-r--r--Master/texmf-dist/doc/latex/ycbook/ycbook-doc.tex203
-rw-r--r--Master/texmf-dist/tex/latex/ycbook/ycbook.cls586
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/ycbook.tlpsrc0
7 files changed, 808 insertions, 1 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
new file mode 100644
index 00000000000..19ff9951403
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdf
Binary files differ
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}
+
diff --git a/Master/texmf-dist/tex/latex/ycbook/ycbook.cls b/Master/texmf-dist/tex/latex/ycbook/ycbook.cls
new file mode 100644
index 00000000000..ba84993e7be
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ycbook/ycbook.cls
@@ -0,0 +1,586 @@
+ %% br-lex.cls
+ %% Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 2016
+ %
+ % This work may be distributed and/or modified under the
+ % conditions of the LaTeX Project Public License, either version 1.3c
+ % of this license or (at your option) any later version.
+ % The latest version of this license is in
+ % http://www.latex-project.org/lppl.txt
+ % and version 1.3 or later is part of all distributions of LaTeX
+ % version 2005/12/01 or later.
+ %
+ % This work has the LPPL maintenance status `maintained'.
+ %
+ % The Current Maintainer of this work is Youssef Cherem.
+ %
+ % This work consists of the files ycbook.cls and ycbook-doc.tex, and the files compiled therefrom:
+ % ycbook.pdf and ycbook-doc.pdf
+
+
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{ycbook}[2016/03/14 ycbook class]
+
+\LoadClassWithOptions{mwbk}
+
+
+%\SetSectionFormatting{section}
+%{24pt plus5pt minus2pt}
+%{\large\textbf{\ifHeadingNumbered
+% \HeadingNumber\enspace\fi %retirei o ponto
+% \HeadingText}}
+%{10pt plus3pt}
+
+%default section definitions, keep for future work
+%\DeclareSectioningCommand{section}{1}
+%{24\p@\@plus5\p@\@minus2\p@}
+%{\FormatHangHeading{\large}}
+%{10\p@\@plus3\p@}
+%\DeclareSectioningCommand{subsection}{2}
+%{16\p@\@plus4\p@\@minus1\p@}
+%{\FormatHangHeading{}}
+%{6\p@\@plus2\p@}
+%\DeclareSectioningCommand{subsubsection}{3}
+%{10\p@\@plus2\p@\@minus1\p@}
+%{\FormatHangHeading{}}
+%{4\p@\@plus1\p@}
+%\DeclareSectioningCommand[runin]{paragraph}{4}
+%{\bigskipamount}
+%{\FormatRunInHeading{}}
+%{.5em}
+
+%original declaration and spaces
+
+%\DeclareSectioningCommand[breakbefore,wholewidth]{chapter}{0}
+%{56pt}
+%{\FormatChapterHeading{12pt}{\large\@chapapp\space}{\LARGE}}
+%{24pt}
+%%%%%%
+
+
+%%%% OPTIONS %%%%%
+
+
+\DeclareOption{chapterrule}{\SetSectionFormatting[breakbefore,wholewidth]{chapter}
+ {56pt plus8pt minus4pt}%espaço antes do capítulo
+ {\Large\textbf{\ifHeadingNumbered
+ \HeadingNumber.\enspace\fi % pode retirar o ponto daqui^: \HeadingNumber.\enspace\fi para não ficar com ponto depois do número da seção
+ \HeadingText}\\\rule[12pt]{\hsize}{0.4pt}%\thispagestyle{plain}
+ } %\hsize=horizontal size of the text...
+ {24pt plus9pt}%espaço depois do capítulo
+ }
+
+
+\DeclareOption{sectionrule}{%
+ \SetSectionFormatting{section}
+ {24pt plus5pt minus2pt}
+ {\large\textbf{\ifHeadingNumbered
+ \HeadingNumber.\enspace\fi %deixei o ponto
+ \HeadingText}\\\rule[10pt]{\hsize}{0.4pt}}
+ {10pt plus3pt}
+ }
+
+
+%\FormatRigidChapterHeading{hwysi}{hodstępi}{hdekl numi}{hdekl tyti}
+
+
+\DeclareOption{chaptercentered}{%
+\SetSectionFormatting[breakbefore,wholewidth]{chapter}
+{12pt}
+{\FormatChapterHeading{0pt}%additional space between label and chapter title
+ {\centering\LARGE \@chapapp \space}{\Huge\centering}}
+{24pt plus6pt}
+
+\renewcommand*\chapter@toc{%
+ \ifHeadingNumbered\typeout{\@chapapp\space\thechapter.}%\fi
+ \addcontentsline{toc}{chapter}{%
+ %\ifHeadingNumbered
+ \mw@seccntformat{\@chapapp\ \HeadingNumber}\HeadingTOCText%
+ %\fi
+ }\fi %added \fi here
+ %\addtocontents{lof}{\protect\addvspace{10\p@}}%
+ %\addtocontents{lot}{\protect\addvspace{10\p@}}%
+}
+
+}
+
+\DeclareOption{chapterleft}{%
+ \SetSectionFormatting[breakbefore,wholewidth]{chapter}
+ {12pt}
+ {\FormatChapterHeading{0pt}%
+ {\LARGE \@chapapp \space}{\Huge}}
+ {24pt plus6pt}
+
+\renewcommand*\chapter@toc{%
+ \ifHeadingNumbered\typeout{\@chapapp\space\thechapter.}%\fi
+ \addcontentsline{toc}{chapter}{%
+ %\ifHeadingNumbered
+ \mw@seccntformat{\@chapapp\ \HeadingNumber}\HeadingTOCText%
+ %\fi
+ }\fi %added \fi here
+ %\addtocontents{lof}{\protect\addvspace{10\p@}}%
+ %\addtocontents{lot}{\protect\addvspace{10\p@}}%
+}
+
+}
+
+\DeclareOption{chapterright}{%
+ \SetSectionFormatting[breakbefore,wholewidth]{chapter}
+ {12pt}
+ {\FormatChapterHeading{0pt}%
+ {\flushright\LARGE \@chapapp \space}{\flushright\Huge}}
+ {24pt plus6pt}
+
+\renewcommand*\chapter@toc{%
+ \ifHeadingNumbered\typeout{\@chapapp\space\thechapter.}%\fi
+ \addcontentsline{toc}{chapter}{%
+ %\ifHeadingNumbered
+ \mw@seccntformat{\@chapapp\ \HeadingNumber}\HeadingTOCText%
+ %\fi
+ }\fi %added \fi here
+ %\addtocontents{lof}{\protect\addvspace{10\p@}}%
+ %\addtocontents{lot}{\protect\addvspace{10\p@}}%
+}
+
+}
+
+%%%%%%%%
+
+\DeclareOption{nochaptercentered}{\SetSectionFormatting[breakbefore,wholewidth]{chapter}
+ {12pt}
+ {\centering\LARGE\textbf{\ifHeadingNumbered
+ \HeadingNumber.\enspace\fi % tirei o ponto daqui^: \HeadingNumber.\enspace\fi para não ficar com ponto depois do número da seção
+ \HeadingText}%\\\rule[12pt]{\hsize}{0.4pt}%\thispagestyle{plain}
+ } %\hsize=horizontal size of the text...
+ {24pt plus9pt}
+
+\renewcommand*\chapter@toc{%
+ \ifHeadingNumbered\typeout{\thechapter.}%\fi
+ \addcontentsline{toc}{chapter}{%
+ %\ifHeadingNumbered
+ \mw@seccntformat{\HeadingNumber}\HeadingTOCText%
+ %\fi
+ }\fi %added \fi here
+ %\addtocontents{lof}{\protect\addvspace{10\p@}}%
+ %\addtocontents{lot}{\protect\addvspace{10\p@}}%
+}
+}
+
+\DeclareOption{nochapterleft}{\SetSectionFormatting[breakbefore,wholewidth]{chapter}
+ {12pt}
+ {\LARGE\textbf{\ifHeadingNumbered
+ \HeadingNumber.\enspace\fi % tirei o ponto daqui^: \HeadingNumber.\enspace\fi para não ficar com ponto depois do número da seção
+ \HeadingText}%\\\rule[12pt]{\hsize}{0.4pt}%\thispagestyle{plain}
+ } %\hsize=horizontal size of the text...
+ {24pt plus9pt}
+
+\renewcommand*\chapter@toc{%
+ \ifHeadingNumbered\typeout{\thechapter.}%\fi
+ \addcontentsline{toc}{chapter}{%
+ %\ifHeadingNumbered
+ \mw@seccntformat{\HeadingNumber}\HeadingTOCText%
+ %\fi
+ }\fi %added \fi here
+ %\addtocontents{lof}{\protect\addvspace{10\p@}}%
+ %\addtocontents{lot}{\protect\addvspace{10\p@}}%
+}
+}
+
+\DeclareOption{nochapterright}{\SetSectionFormatting[breakbefore,wholewidth]{chapter}
+ {12pt}
+ {\flushright \LARGE\textbf{\ifHeadingNumbered
+ \HeadingNumber.\enspace\fi % tirei o ponto daqui^: \HeadingNumber.\enspace\fi para não ficar com ponto depois do número da seção
+ \HeadingText}%\\\rule[12pt]{\hsize}{0.4pt}%\thispagestyle{plain}
+ } %\hsize=horizontal size of the text...
+ {24pt plus9pt}
+
+\renewcommand*\chapter@toc{%
+ \ifHeadingNumbered\typeout{\thechapter.}%\fi
+ \addcontentsline{toc}{chapter}{%
+ %\ifHeadingNumbered
+ \mw@seccntformat{\HeadingNumber}\HeadingTOCText%
+ %\fi
+ }\fi %added \fi here
+ %\addtocontents{lof}{\protect\addvspace{10\p@}}%
+ %\addtocontents{lot}{\protect\addvspace{10\p@}}%
+}
+}
+%%%%%%%%%%
+
+
+\DeclareOption{myheadings}{%
+\def\ps@myheadings{%
+ \let\ps@normal\hf@headings
+ \let\ps@opening\hf@plain
+ \let\ps@closing\hf@headings
+ \let\ps@blank\hf@empty
+ \ps@normal
+ \let\@mkboth\@gobbletwo
+ \let\chaptermark\@gobble
+ \let\sectionmark\@gobble
+}
+\pagestyle{myheadings}
+}
+
+\DeclareOption{myheadings=beforeplain}{%
+ \def\ps@myheadings{%
+ \let\ps@normal\hf@headings
+ \let\ps@opening\hf@plain
+ \let\ps@closing\hf@plain
+ \let\ps@blank\hf@plain
+ \ps@normal
+ \let\@mkboth\@gobbletwo
+ \let\chaptermark\@gobble
+ \let\sectionmark\@gobble
+ }
+ \pagestyle{myheadings}
+}
+
+
+%The macro \@chapapp is initially defined to expand to \chaptername, but \appendix redefines it to be \appendixname.
+
+
+%%for headings:%%%%
+\DeclareOption{headings}{%
+
+\renewcommand\ps@headings{%
+ \let\@mkboth\@gobbletwo
+ \let\ps@normal\hf@headings
+ \let\ps@opening\hf@plain
+ \let\ps@closing\hf@headings %% <-- this was @empty, now @headings!!! use this for page numbers and headings to appear on even pages before new chapter
+ \let\ps@blank\hf@empty
+ \ps@normal}
+
+\pagestyle{headings}
+}
+
+\DeclareOption{headings=beforeplain}{%
+
+ \renewcommand\ps@headings{%
+ \let\@mkboth\@gobbletwo
+ \let\ps@normal\hf@headings
+ \let\ps@opening\hf@plain
+ \let\ps@closing\hf@headings %% <-- this was @empty, now @headings!!! use this for page numbers and headings to appear on even pages before new chapter
+ \let\ps@blank\hf@plain
+ \ps@normal}
+
+ \pagestyle{headings}
+}
+
+
+
+\if@twoside
+\def\ps@uheadings{%
+ \let\@mkboth\markboth
+ \let\ps@normal\hf@uheadings
+ \let\ps@opening\hf@plain
+ \let\ps@closing\hf@uheadings
+ \let\ps@blank\hf@empty
+ \ps@normal
+ \def\chaptermark##1{%
+ \markboth{%
+ \ifHeadingNumbered
+ \if@mainmatter
+ \@chapapp\
+ \thechapter.\enspace
+ \fi
+ \fi
+ ##1}{}}%
+ \def\sectionmark##1{%
+ \markright{%
+ \ifHeadingNumbered \thesection.\enspace \fi
+ ##1}}}
+\else
+\def\ps@uheadings{%
+ \let\@mkboth\markboth
+ \let\ps@normal\hf@uheadings
+ \let\ps@opening\hf@plain
+ \let\ps@closing\hf@uheadings
+ \let\ps@blank\hf@empty
+ \ps@normal
+ \def\chaptermark##1{%
+ \markright{%
+ \ifHeadingNumbered
+ \if@mainmatter
+ \@chapapp\
+ \thechapter.\enspace
+ \fi
+ \fi
+ ##1}}}
+\fi
+\def\ps@myuheadings{%
+ \let\ps@normal\hf@uheadings
+ \let\ps@opening\hf@plain
+ \let\ps@closing\hf@uheadings
+ \let\ps@blank\hf@empty
+ \ps@normal
+ \let\@mkboth\@gobbletwo
+ \let\chaptermark\@gobble
+ \let\sectionmark\@gobble
+}
+
+
+
+
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{mwbk}}
+
+
+\DeclareOption{sansserifnotes}{%marginpar to sans serif
+ \let\oldmarginpar\marginpar
+ \renewcommand{\marginpar}[1]{\oldmarginpar{\footnotesize \raggedright \sffamily#1}}
+
+ %footnote to sans serif
+ \let\oldfootnote\footnote
+ \renewcommand{\footnote}[1]{\oldfootnote{\sffamily#1}}
+
+ %footnotemark to sans serif
+ \long\def\@makefnmark{%
+ \hbox {\@textsuperscript {\sffamily\@thefnmark}}
+ }
+ }
+
+
+%\PassOptionsToClass{withmarginpar}{mwbk}
+
+\DeclareOption{toc}{%
+%%% you can use this package. says there is an error, but it works nonetheless%%%
+\AtEndOfClass{\RequirePackage[tocgraduated]{tocstyle}}%\AtEndOfClass -- important
+%\usetocstyle{nopagecolumn}
+\ClassWarning{ycbook}{'toc' option implemented by the 'tocstyle' package. You can use this package. says there is an error, but it works nonetheless.}
+}
+
+\ExecuteOptions{headings,chapterleft}
+
+\ProcessOptions\relax
+
+
+
+\RequirePackage{ifxetex}
+\ifxetex
+\RequirePackage{fontspec}
+\RequirePackage{polyglossia}
+%dot below in xetex
+\renewcommand{\d}[1]
+{\hmode@bgroup
+ \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
+\else
+\RequirePackage[utf8]{inputenc}
+\fi
+
+\RequirePackage{hyperref}
+
+\pdfstringdefDisableCommands{%
+ \let\enspace\empty % this causes the warning for \kern
+ \let\noindent\empty % this causes the warning for \indent
+}
+
+%\RequirePackage{picinpar}
+
+%\RequirePackage[justification=raggedright,font={sf},labelfont=bf]{caption}
+\RequirePackage[space,extendedchars]{grffile} % para inserir figuras com espaços no nome
+\RequirePackage{graphicx}
+
+\RequirePackage{booktabs}
+
+
+
+
+
+%\setlength{\marginparwidth}{1.3in}
+
+
+% remove toc, list of figures and list of tables from table of contents
+% NEED TO TAKE CHAPTER NAME FROM TOC IN nochapterleft etc. options%%%
+%\renewcommand*\chapter@toc{%
+% \ifHeadingNumbered\typeout{\@chapapp\space\thechapter.}%\fi
+% \addcontentsline{toc}{chapter}{%
+% %\ifHeadingNumbered
+% \mw@seccntformat{\@chapapp\ \HeadingNumber}\HeadingTOCText%
+% %\fi
+% }\fi %added \fi here
+% %\addtocontents{lof}{\protect\addvspace{10\p@}}%
+% %\addtocontents{lot}{\protect\addvspace{10\p@}}%
+%}
+
+%to remove chaptername from toc with options nochapterX
+
+
+
+%\RequirePackage[side,ragged,flushmargin]{footmisc} %marginal coloca os números da nota de rodapé para fora da margem, à la Bringhurst, flushmargin: fundamental para notas na margem.
+
+
+%%% para notas sempre à direita.
+%%%http://tex.stackexchange.com/questions/69595/marginnote-always-on-right-side-of-the-page
+\RequirePackage{etoolbox}
+\patchcmd{\@addmarginpar}{\ifodd\c@page}{\ifodd\c@page\@tempcnta\m@ne}{}{}
+\reversemarginpar
+
+
+\frenchspacing
+
+
+ %%%% uso econômico de espaços%%%%
+
+ \renewcommand\floatpagefraction{.99} % 9 before
+ \renewcommand\dblfloatpagefraction{.99} % for two column documents
+ \renewcommand\topfraction{.99}
+ \renewcommand\dbltopfraction{.99} % for two column documents
+ \renewcommand\bottomfraction{.99}
+ \renewcommand\textfraction{.01} %1 before
+ \setcounter{totalnumber}{1} % 50 before
+ \setcounter{topnumber}{1}
+ \setcounter{bottomnumber}{1}
+
+%\setcounter{totalnumber}{1}
+%\setcounter{topnumber}{1}
+%\setcounter{bottomnumber}{1}
+%\renewcommand{\topfraction}{.99}
+%\renewcommand{\bottomfraction}{.99}
+%\renewcommand{\textfraction}{.01}
+
+
+%%%%%% TWO PAGE PICTURE %%%%%%%%
+%%%% from: http://tex.stackexchange.com/questions/23860/how-to-include-a-picture-over-two-pages-left-part-on-left-side-right-on-right
+%%% Thanks to Martin Scharrer
+
+\RequirePackage{adjustbox}
+\RequirePackage{afterpage}
+\RequirePackage{placeins}
+\RequirePackage[strict]{changepage}
+
+
+ \newcommand*{\twopagepicture}[4]{%
+ \checkoddpage
+ \ifoddpage
+ \expandafter\@firstofone
+ \else
+ \expandafter\afterpage
+ \fi
+ {\afterpage{%
+ \if #1t%
+ \if #2p%
+ \thispagestyle{empty}%
+ \afterpage{\thispagestyle{empty}}%
+ \fi
+ \fi
+ \begin{figure}[#1]
+ \if #2p%
+ \if #1t%
+ \vspace*{-\dimexpr1in+\voffset+\topmargin+\headheight+\headsep\relax}%
+ \fi
+ \fi
+ \if #1b%
+ \caption{#4}%
+ \fi
+ \makebox[\textwidth][l]{%
+ \if #2p\relax
+ \let\mywidth\paperwidth
+ \hskip-\dimexpr1in+\hoffset+\evensidemargin\relax
+ \else
+ \let\mywidth\linewidth
+ \fi
+ \adjustbox{trim=0 0 {.5\width} 0,clip}{\includegraphics[width=2\mywidth]{#3}}}%
+ \if #1b\else
+ \caption{#4}%
+ \fi
+ \if #2p%
+ \if #1b%
+ \vspace*{-\dimexpr\paperheight-\textheight-1in-\voffset-\topmargin-\headheight-\headsep\relax}%
+ \fi
+ \fi
+ \end{figure}%
+ \begin{figure}[#1]
+ \if #2p%
+ \if #1t%
+ \vspace*{-\dimexpr1in+\voffset+\topmargin+\headheight+\headsep\relax}%
+ \fi
+ \fi
+ \makebox[\textwidth][l]{%
+ \if #2p%
+ \let\mywidth\paperwidth
+ \hskip-\dimexpr1in+\hoffset+\oddsidemargin\relax
+ \else
+ \let\mywidth\linewidth
+ \fi
+ \adjustbox{trim={.5\width} 0 0 0,clip}{\includegraphics[width=2\mywidth]{#3}}}%
+ \if #2p%
+ \if #1b%
+ \vspace*{-\dimexpr\paperheight-\textheight-1in-\voffset-\topmargin-\headheight-\headsep\relax}%
+ \fi
+ \fi
+ \end{figure}%
+ }}%
+}
+
+%% for usage with \caption*{}%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\newcommand*{\twopagepicturen}[4]{%
+ \checkoddpage
+ \ifoddpage
+ \expandafter\@firstofone
+ \else
+ \expandafter\afterpage
+ \fi
+ {\afterpage{%
+ \if #1t%
+ \if #2p%
+ \thispagestyle{empty}%
+ \afterpage{\thispagestyle{empty}}%
+ \fi
+ \fi
+ \begin{figure}[#1]
+ \if #2p%
+ \if #1t%
+ \vspace*{-\dimexpr1in+\voffset+\topmargin+\headheight+\headsep\relax}%
+ \fi
+ \fi
+ \if #1b%
+ \caption*{#4}%
+ \fi
+ \makebox[\textwidth][l]{%
+ \if #2p\relax
+ \let\mywidth\paperwidth
+ \hskip-\dimexpr1in+\hoffset+\evensidemargin\relax
+ \else
+ \let\mywidth\linewidth
+ \fi
+ \adjustbox{trim=0 0 {.5\width} 0,clip}{\includegraphics[width=2\mywidth]{#3}}}%
+ \if #1b\else
+ \caption*{#4}%
+ \fi
+ \if #2p%
+ \if #1b%
+ \vspace*{-\dimexpr\paperheight-\textheight-1in-\voffset-\topmargin-\headheight-\headsep\relax}%
+ \fi
+ \fi
+ \end{figure}%
+ \begin{figure}[#1]
+ \if #2p%
+ \if #1t%
+ \vspace*{-\dimexpr1in+\voffset+\topmargin+\headheight+\headsep\relax}%
+ \fi
+ \fi
+ \makebox[\textwidth][l]{%
+ \if #2p%
+ \let\mywidth\paperwidth
+ \hskip-\dimexpr1in+\hoffset+\oddsidemargin\relax
+ \else
+ \let\mywidth\linewidth
+ \fi
+ \adjustbox{trim={.5\width} 0 0 0,clip}{\includegraphics[width=2\mywidth]{#3}}}%
+ \if #2p%
+ \if #1b%
+ \vspace*{-\dimexpr\paperheight-\textheight-1in-\voffset-\topmargin-\headheight-\headsep\relax}%
+ \fi
+ \fi
+ \end{figure}%
+ }}%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+\endinput \ No newline at end of file
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 76a62578d08..b90b2224257 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -617,7 +617,7 @@ my @TLP_working = qw(
xoptarg xpatch xpeek xpiano xpicture xpinyin xprintlen xpunctuate
xq xsavebox xskak xstring xtab xunicode
xwatermark xyling xymtex xypic xypic-tut-pt xytree
- yafoot yagusylo yannisgr yathesis yax ydoc yfonts yfonts-t1 yhmath
+ yafoot yagusylo yannisgr yathesis yax ycbook ydoc yfonts yfonts-t1 yhmath
york-thesis youngtab yplan ytableau
zed-csp zhnumber ziffer zhmetrics zhspacing zlmtt
zwgetfdate zwpagelayout
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 8a5f6459074..10c46c75824 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -1073,6 +1073,7 @@ depend xwatermark
depend xytree
depend yafoot
depend yagusylo
+depend ycbook
depend ydoc
depend yplan
depend zed-csp
diff --git a/Master/tlpkg/tlpsrc/ycbook.tlpsrc b/Master/tlpkg/tlpsrc/ycbook.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/ycbook.tlpsrc