summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-07-05 21:39:42 +0000
committerKarl Berry <karl@freefriends.org>2016-07-05 21:39:42 +0000
commit2fb347ba645d1206714d176309b4ec87e5164b0a (patch)
tree493d5e2806d2f77ec2f74188d40e2eda3ccb8ed9 /Master/texmf-dist
parenteadac6a4b811db258d2b4d5dd4dec4fb0551ca4d (diff)
ycbook (5jul16)
git-svn-id: svn://tug.org/texlive/trunk@41636 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdfbin53154 -> 60367 bytes
-rw-r--r--Master/texmf-dist/doc/latex/ycbook/ycbook-doc.tex212
-rw-r--r--Master/texmf-dist/tex/latex/ycbook/ycbook.cls527
3 files changed, 652 insertions, 87 deletions
diff --git a/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdf b/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdf
index c676bcc8fce..d4fe9919179 100644
--- a/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.pdf
+++ 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
index b21280fa69a..6e5735c44dc 100644
--- a/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.tex
+++ b/Master/texmf-dist/doc/latex/ycbook/ycbook-doc.tex
@@ -19,21 +19,26 @@
\usepackage[english]{babel}
\usepackage[dvipsnames,svgnames]{xcolor}
\usepackage{fontspec}
-\setmainfont{Minion Pro}[Numbers=OldStyle]
-\setmonofont{Fira Mono}[Scale=MatchLowercase]
-\setsansfont{Myriad Pro Light}
+\setmainfont{Warnock Pro}[Numbers=OldStyle]
+\usepackage{FiraSans}
+\usepackage[scale=0.9,lf]{FiraMono}
+%\setmathrm{}
%\setsansfont{Fira Sans Book}[BoldFont={FiraSans-Bold},BoldItalicFont={FiraSans-BoldItalic},Scale=.9]
%\setmonofont[Scale=0.8,Color=Teal]{Fira Mono}
\usepackage{tikz}
\usetikzlibrary{shapes,snakes,shadings,shadows,shapes.geometric,decorations,positioning,arrows,decorations.pathmorphing}
\usepackage[framemethod=tikz]{mdframed}
-\surroundwithmdframed[linecolor=MediumPurple,skipabove=10pt,skipbelow=6pt, backgroundcolor=Thistle!50,roundcorner=6pt
+\surroundwithmdframed[linecolor=PaleTurquoise,skipabove=10pt,skipbelow=6pt, backgroundcolor=PaleTurquoise!30,roundcorner=6pt
]{verbatim}%roundcorner=10pt,
%MediumSeaGreen
%OrangeRed
+
+\newmdenv[linecolor=MediumPurple,skipabove=10pt,skipbelow=6pt, backgroundcolor=SpringGreen,roundcorner=6pt
+]{resumo}
+
\usepackage{hyperref}
-\usepackage{fancyvrb}
\usepackage{multicol}
+\usepackage{microtype}
\frenchspacing
\hyphenation{Bring-hurst}
@@ -42,6 +47,30 @@
\newcommand{\folhadireita}{\fontspec{Minion Pro}}
\newcommand{\duasondas}{\fontspec{Minion Pro} }
+%%% Warnock Pro Ornaments
+%
+\newcommand{\folhawarnock}{\fontspec{Warnock Pro}}
+\newcommand{\folhawarnockmetade}{\fontspec{Warnock Pro}}
+\newcommand{\folhawarnocklinhaum}{\fontspec{Warnock Pro}}
+\newcommand{\folhawarnocklinhadois}{\fontspec{Warnock Pro}}
+
+\newcommand{\carimboa}{\fontspec{Warnock Pro}}
+\newcommand{\carimbob}{\fontspec{Warnock Pro}}
+\newcommand{\carimboc}{\fontspec{Warnock Pro}}
+\newcommand{\carimbod}{\fontspec{Warnock Pro}}
+\newcommand{\carimboe}{\fontspec{Warnock Pro}}
+\newcommand{\carimbof}{\fontspec{Warnock Pro}}
+
+
+\newcommand{\estampa}{\fontspec{Warnock Pro}}
+\newcommand{\estampab}{\fontspec{Warnock Pro}}
+\newcommand{\estampac}{\fontspec{Warnock Pro}}
+
+
+
+
+
+
\SetSectionFormatting{section}
{24pt plus5pt minus2pt} %space before
@@ -66,9 +95,9 @@
\setlength{\marginparwidth}{1.3in}
-\newcommand{\option}[1]{\marginpar{\footnotesize \textit{#1}}}
-\newcommand{\opt}[1]{<<\textit{#1}>>}
-%\newcommand{\opt}[1]{\texttt{#1}}
+\newcommand{\option}[1]{\marginpar{\footnotesize \texttt{#1}}}
+%\newcommand{\opt}[1]{<<\textit{#1}>>}
+\newcommand{\opt}[1]{\texttt{#1}}
\title{\estrela{\textit{ycbook}}\\
@@ -77,8 +106,8 @@
%\tikz \node[remember picture,overlay] at (7,5) {\florgrande};%
%
}
-\author{\addfontfeatures{Style=Swash}\textit{Youssef Cherem}\\ \href{mailto:ycherem@gmail.com}{ycherem@gmail.com}}
-\date{MMXVI\\ \folhadireita% %
+\author{\addfontfeatures{Style=Swash,Contextuals=Swash}\textit{Youssef Cherem}\\ \href{mailto:ycherem@gmail.com}{ycherem@gmail.com}}
+\date{\carimboa\ MMXVI \carimboa\\ \folhawarnocklinhaum% %
}
@@ -94,6 +123,16 @@
\newcommand{\estrela}[1]{\tikz \node [top color=SpringGreen,star,star points=7] at (0,0) {#1};}%,star point ratio=0.8 % shading angle=45,
+\newcommand{\mybox}[1]{%
+ \begin{center}%
+ \begin{tikzpicture}%
+ \node[rectangle, draw=green, top color=SpringGreen, bottom color=Dandelion,shading angle=45,rounded corners=5pt, inner xsep=5pt, inner ysep=6pt, outer ysep=10pt,drop shadow]{
+ \begin{minipage}{0.75\linewidth}#1\end{minipage}};%
+ \end{tikzpicture}%
+ \end{center}%
+}
+%top color=green!10, bottom color=green!90
+%drop shadow=PineGreen
\newcommand\fadingtext[3][]{%
\begin{tikzfadingfrompicture}[name=fading letter]
\node[text=transparent!0,inner xsep=0pt,outer xsep=0pt,#1] {#3};
@@ -110,18 +149,75 @@
}
+%%% mdframed + tikz
+
+\tikzset{caixa/.style=
+ {draw=green, top color=SpringGreen, bottom color=Dandelion,shading angle=45,%rounded corners=5pt, inner xsep=5pt, inner ysep=6pt, outer ysep=10pt,drop shadow
+ }
+}
+\tikzset{mdfshadow/.style={drop shadow=}}%
+
+%%%this works well
+\mdfdefinestyle{caixa}{userdefinedwidth=0.77\textwidth,%
+ font=\small,%
+ shadow=true,%
+ shadowsize=5pt,%
+ roundcorner=5pt,%
+ align=center,%
+ %leftmargin=0.3\textwidth,%
+ %rightmargin=0.3\textwidth,%
+ linecolor=green,%
+ innerleftmargin=4pt,%
+ innerrightmargin=4pt,
+ apptotikzsetting
+ ={\tikzset{mdfbackground/.append style=caixa} }}
+
+
+%%%this doesn't work well
+\newmdenv[%userdefinedwidth=0.75\textwidth,%
+shadow=true,%
+shadowsize=5pt,%
+roundcorner=5pt,%
+%align=center,%
+%leftmargin=0.3\textwidth,%
+%rightmargin=0.3\textwidth,%
+linecolor=green,%
+innerleftmargin=3pt,%
+innerrightmargin=3pt,
+apptotikzsetting
+={\tikzset{mdfbackground/.append style=caixa} }]{caixa}
+
+\usepackage{lipsum}
+
+\usepackage[toc]{multitoc}
+\renewcommand*{\multicolumntoc}{2}
+%\setlength{\columnseprule}{1pt}
+
+
\begin{document}
\maketitle
+
+
\thispagestyle{scrheadings}
+%\mybox{
+% This class is intended to be an interpretation of the \textit{mwbk} class from Mar\-cin Wo\-li\'{n}s\-ki's \textit{mwcls} classes. The \textit{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.
+%}
+
+%\tableofcontents
+
+
+\begin{mdframed}[style=caixa]
+ This class is intended to be an interpretation of the \texttt{mwbk} class from Mar\-cin Wo\-li\'{n}s\-ki's \texttt{mwcls} classes. The \texttt{mwcls} class\-es 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.
+ %\lipsum[1-5]
+\end{mdframed}
+
+\tableofcontents
-\begin{abstract}
-This class is intended to be an interpretation of the \textit{mwbk} class from Mar\-cin Wo\-li\'{n}s\-ki's \textit{mwcls} classes. The \textit{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 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 aesthetic 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 \textit{mwcls} classes \parencite{mwcls} useful. Besides, \textit{mwcls} alternatives for basic classes (\textit{mwart} for articles, \textit{mwrep} for reports and \textit{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 \textit{mwbk} and \textit{mwrep}. As for the \textit{mwart} class, I did not find anything to be changed---although the user might adapt some of the options presented in the \textit{ycbook} class.
+Although many usual \LaTeX\ packages and classes offer a wide array of solutions for text block and margin specifications, and although some of them, notably 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 aesthetic 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 many classes. The goal was to provide a more user-friendly syntax for some common tweaks and more alternatives to the end-user. (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.)
@@ -142,39 +238,68 @@ To add a rule below chapter and section titles, use \opt{chapterrule} and
{10pt plus3pt}%space after
\end{verbatim}
+Or this, if you want unnumbered headings to be centralized:
+
+\begin{verbatim}
+\SetSectionFormatting[breakbefore,wholewidth]{chapter}
+{12pt}
+{\ifHeadingNumbered\FormatBlockHeading{\bfseries\LARGE}
+\else \FormatBlockHeading{\centering\bfseries\LARGE}\fi}
+{24pt plus9pt}
+\end{verbatim}
+
+
\option{chaptercentered}
\option{chapterleft}
\option{chapterright}
Options \opt{chaptercentered}, \opt{chapterleft}, and \opt{chapterright} control chapter alignment.
-Options \opt{nochaptercentered}, \opt{nochapterleft}, and \opt{nochapterright} control chapter alignment and exclude the name “Chapter” from the entry. The default, as in the \textit{mwcls} classes, is \opt{chapterleft}. \option{nochaptercentered}
+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}. \option{nochaptercentered}
\option{nochapterleft}
\option{nochapterright}
+\option{nodots}
+If you don't want a dot after section numbers, you can invoke the option \verb|nodots|. This option does not by itself affect the page headings.
-\section{Options for headings}
-\option{headings}
-\option{headings=beforeplain}
-\option{myheadings}
-\option{myheadings=beforeplain}
-\textit{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 \textit{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 option is \opt{headings}.
+\section{Page Styles}
+Several page styles are provided:
+\begin{verbatim}
+\pagestyle{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.
+\pagestyle{myheadings}
-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 header line:
+\pagestyle{headingsbeforeplain}
+\pagestyle{myheadingsbeforeplain}
+
+\pagestyle{uheadings} %for heading rules
+
+\pagestyle{myuheadings} %for heading rules
+\end{verbatim}
+
+The styles \verb+headingsbeforeplain+ and \verb+myheadingsbeforeplain+ have been added, in which an even empty page finishing a chapter takes the \verb|plain| style. The default option is \verb|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.
+
+All page styles have an option not to include the dot after the chapter/section number: just add \verb|nodots| to the name of the usual style:
\begin{verbatim}
-\usepackage[headsepline]{scrlayer-scrpage}
-\addtokomafont{headsepline}{\color{JungleGreen}}
-\usepackage[dvipsnames,svgnames,x11names]{xcolor}
-\pagestyle{scrheadings}
+\pagestyle{headingsnodot}
+
+\pagestyle{uheadingsnodot}
+
+\pagestyle{headingsbeforeplainnodot}
+
\end{verbatim}
-And of course simpler things such as:
+And so on.
+
+
+This class is somewhat compatible with the \verb|scrlayer-scrpage| (formerly \verb|scrpage2|) for headers and footers:
\begin{verbatim}
\usepackage{scrlayer-scrpage}
@@ -187,15 +312,15 @@ And of course simpler things such as:
For additional information, see chapters 5 and 18 of the 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.
+
+The \texttt{titletoc} package can be used to customize the table of contents. As a convenience, the commands \verb|\fancytoc| and \verb|\traditionaltoc| can be used in the preamble to create predefined TOC styles. More styles will be added in the future.
+
%\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.}
+% \captionof{figure}{\texttt{L'apparition}, by Gustave Moreau, 1876--1877. Fogg Art Museum.}
% }
@@ -203,14 +328,16 @@ for another style.
\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:
+You can choose to turn all footnotes into margin notes with the \texttt{footmisc} package:
\begin{verbatim}
\usepackage[side,ragged,flushmargin]{footmisc}
\end{verbatim}
+Margin paragraphs in two-side documents have been somewhat improved, but should not be overindulged. They don't work particularly well in smaller paper formats.
+
\section{Other options}
-All other options from the \textit{mwcls} classes are available, e.g.:
+All other options from the \texttt{mwcls} classes are available, e.g.:
\begin{multicols}{2}
@@ -247,9 +374,22 @@ It works thus: \verb|\twopagepicture{image place regarding the caption}|\\ \verb
%
%\lstinputlisting{ycbook.cls}
-%\marginpar{\textit{\small This document was typeset with XXX}}
+%\marginpar{\texttt{\small This document was typeset with XXX}}
\printbibliography
\end{document}
-
+
+
+removed
+%, so you can do fun things like this to color your header 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: \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/ycbook/ycbook.cls b/Master/texmf-dist/tex/latex/ycbook/ycbook.cls
index 83dffdfab6e..08e561afccd 100644
--- a/Master/texmf-dist/tex/latex/ycbook/ycbook.cls
+++ b/Master/texmf-dist/tex/latex/ycbook/ycbook.cls
@@ -1,4 +1,4 @@
- %% br-lex.cls
+ %% yc-book.cls
%% Copyright (c) Youssef Cherem <ycherem(at)gmail.com>, 2016
%
% This work may be distributed and/or modified under the
@@ -13,13 +13,12 @@
%
% 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
+ % This work consists of the files ycbook.cls, ycbook-doc.tex, and ycbook-doc.pdf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{ycbook}[2016/05/23 ycbook class]
+\ProvidesClass{ycbook}[2016/07/04 ycbook class]
\LoadClassWithOptions{mwbk}
@@ -58,9 +57,25 @@
%%%%%%
+%\DeclareSectioningCommand[breakbefore,breakafter,wholewidth]{part}{-1}
+%{0\p@ plus1fil}
+%{\FormatChapterHeading{20\p@}%
+% {\centering\large\partname\space}%
+% {\centering\LARGE}}
+%{0\p@ plus1fil}
+
+
%%%% OPTIONS %%%%%
+\SetSectionFormatting[breakbefore,breakafter,wholewidth]{part}
+{0pt plus1pt}
+{\FormatChapterHeading{20pt}%
+ {\centering\Large\partname\space}%
+ {\centering\LARGE}}
+{0pt plus1pt}
+
+
\DeclareOption{chapterrule}{\SetSectionFormatting[breakbefore,wholewidth]{chapter}
{56pt plus8pt minus4pt}%espaço antes do capítulo
{\Large\textbf{\ifHeadingNumbered
@@ -250,7 +265,6 @@
%%%%%%%%%%
-\DeclareOption{myheadings}{%
\def\ps@myheadings{%
\let\ps@normal\hf@headings
\let\ps@opening\hf@plain
@@ -261,11 +275,10 @@
\let\chaptermark\@gobble
\let\sectionmark\@gobble
}
-\pagestyle{myheadings}
-}
-\DeclareOption{myheadings=beforeplain}{%
- \def\ps@myheadings{%
+
+
+ \def\ps@myheadingsbeforeplain{%
\let\ps@normal\hf@headings
\let\ps@opening\hf@plain
\let\ps@closing\hf@plain
@@ -275,41 +288,176 @@
\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{%
+\if@twoside
+\def\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
+ \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@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}
+ \ps@normal
+ \def\chaptermark##1{%
+ \markright{%
+ \ifHeadingNumbered
+ \if@mainmatter
+ \@chapapp\
+ \thechapter.\enspace
+ \fi
+ \fi
+ ##1}}}
+\fi
-\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@headingsnodot{%
+ \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
+ \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@headingsnodot{%
+ \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
+ \def\chaptermark##1{%
+ \markright{%
+ \ifHeadingNumbered
+ \if@mainmatter
+ \@chapapp\
+ \thechapter\enspace
+ \fi
+ \fi
+ ##1}}}
+\fi
+\if@twoside
+\def\ps@headingsbeforeplain{%
+ \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
+ \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@headingsbeforeplain{%
+ \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
+ \def\chaptermark##1{%
+ \markright{%
+ \ifHeadingNumbered
+ \if@mainmatter
+ \@chapapp\
+ \thechapter.\enspace
+ \fi
+ \fi
+ ##1}}}
+\fi
+
+
+\if@twoside
+\def\ps@headingsbeforeplainnodot{%
+ \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
+ \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@headingsbeforeplainnodot{%
+ \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
+ \def\chaptermark##1{%
+ \markright{%
+ \ifHeadingNumbered
+ \if@mainmatter
+ \@chapapp\
+ \thechapter\enspace
+ \fi
+ \fi
+ ##1}}}
+\fi
+
\if@twoside
\def\ps@uheadings{%
@@ -363,13 +511,77 @@
+\if@twoside
+\def\ps@uheadingsnodot{%
+ \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@uheadingsnodot{%
+ \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@myuheadingsnodot{%
+% \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
+
+%%% to add color to sepline
+%\renewcommand*\hf@uheadings{%
+% \def\@oddhead{\vtop{%
+% \hb@xt@\textwidth{%
+% \reset@font{\heading@font\rightmark}\hfil\thepage\strut}%
+% \vskip2pt{\color{JungleGreen}\hrule}\vskip-2.4pt}}%
+% \let\@oddfoot\@empty
+% \def\@evenhead{\vtop{%
+% \hb@xt@\textwidth{%
+% \reset@font\strut\thepage\hfil\heading@font\leftmark}%
+% \vskip2pt{\color{JungleGreen}\hrule}\vskip-2.4pt}}%
+% \let\@evenfoot\@empty
+%}
+
+
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{mwbk}}
\DeclareOption{sansserifnotes}{%marginpar to sans serif
- \let\oldmarginpar\marginpar
- \renewcommand{\marginpar}[1]{\oldmarginpar{\footnotesize \raggedright \sffamily#1}}
+% \let\oldmarginpar\marginpar
+% \renewcommand{\marginpar}[1]{\oldmarginpar{\footnotesize \raggedright \sffamily#1}}
%footnote to sans serif
\let\oldfootnote\footnote
@@ -382,21 +594,213 @@
}
-%\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.}
+\DeclareOption{nodots}{
+\renewcommand*\@seccntformat[1]{\csname the#1\endcsname\enspace}
+\def\mw@seccntformat#1{#1\enspace}
}
+%%%%%%%%%%%% end of nodots option %%%%%%%%%%%%%%%%
+
+
+
\ExecuteOptions{headings,chapterleft}
\ProcessOptions\relax
+\RequirePackage{titletoc}
+
+
+
+%\titlecontents{chapter}[1em]{\addvspace{1pc}\bfseries}{\contentslabel{1em}}{}
+%{\titlerule*[0.3pc]{.}\contentspage}
+
+%\titlecontents{chapter}
+%[0pt]
+%{\addvspace{1pc}%
+% \itshape}%
+%{\contentsmargin{0pt}%
+% \bfseries
+% \makebox[0pt][r]{\huge\thecontentslabel\enspace}%
+% \large}
+%{\contentsmargin{0pt}%
+% \large}
+%{\quad\thepage}
+%[\addvspace{.5pc}]
+
+%%%%% FANCY TOC %%%%%%%%%
+
+%double all #1 like ##1 if it's inside another definition
+
+%%%%original changed:
+
+%\renewcommand*\l@part[2]{%
+% \ifnum \c@tocdepth >-2\relax
+% \mw@tocskip{-1}{.6\baselineskip}%
+% \begingroup
+% \parindent \z@ \rightskip \@pnumwidth
+% \parfillskip -\@pnumwidth
+% {\leavevmode%\normalsize\normalfont
+% \bfseries
+% \let\numberline\partnumberline % <--- added
+% \centering \Large #1\par
+% }
+% \nobreak
+% \global\@nobreaktrue
+% \everypar{\global\@nobreakfalse\everypar{}}%
+% \endgroup
+% \addvspace{.4\baselineskip}%
+% \fi}
+%\def\partnumberline#1{\@partnumberline#1\@nil}
+%\def\@partnumberline#1.#2\@nil{\partname\ #1\\\large\itshape}%
+
+
+\newcommand{\fancytoc}{%
+% \renewcommand*\l@part[2]{%
+% \ifnum \c@tocdepth >-2\relax
+% \mw@tocskip{-1}{.6\baselineskip}%
+% \begingroup
+% \parindent \z@ \rightskip \@pnumwidth
+% \parfillskip -\@pnumwidth
+% {\leavevmode%\normalsize\normalfont
+% \bfseries
+% \let\numberline\partnumberline % <--- added
+% \centering \Large ##1\par
+% }
+% \nobreak
+% \global\@nobreaktrue
+% \everypar{\global\@nobreakfalse\everypar{}}%
+% \endgroup
+% \addvspace{.4\baselineskip}%
+% \fi}
+% \def\partnumberline##1{\@partnumberline##1\@nil}
+% \def\@partnumberline##1.##2\@nil{\partname\ ##1\\\large\itshape}%
+
+ \titlecontents{part}
+ [0pt]
+ {\addvspace{2pc}%
+ \bfseries\centering}%
+ {\contentsmargin{0pt}%
+ \bfseries
+ \huge Parte~\thecontentslabel
+ \\[12pt]%
+ \Large\itshape}
+ {\contentsmargin{0pt}%
+ \huge}
+ {\quad\contentspage}
+ [\addvspace{.5pc}]
+
+ \titlecontents{chapter}
+ [0pt]
+ {\addvspace{1pc}%
+ \itshape}%
+ {\contentsmargin{0pt}%
+ %\bfseries
+ \large\thecontentslabel\enspace%
+ }
+ {\contentsmargin{0pt}%
+ \itshape\large}
+ {\quad\contentspage}
+ [\addvspace{.5pc}]%
+
+ %
+ %\titlecontents{section}
+ %[3.8em] % ie, 1.5em (chapter) + 2.3em
+ %{}
+ %{\contentslabel{2.3em}}
+ %{\hspace*{-2.3em}}
+ %{\titlerule*[1pc]{.}\contentspage}
+
+ \titlecontents{section}
+ [3.4em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\contentslabel{2em}\enspace\enspace}
+ {\hspace*{-2.3em}\enspace}
+ {\quad\contentspage}%
+
+ \titlecontents{subsection}
+ [6.6em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\contentslabel{2.3em}\enspace\enspace}
+ {\hspace*{-2.3em}\enspace}
+ {\quad\contentspage}%
+
+ \titlecontents{subsubsection}
+ [8.9em] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\contentslabel{2.3em}\enspace\enspace}
+ {\hspace*{-2.3em}\enspace}
+ {\quad\contentspage}%
+
+
+ \titlecontents{figure}
+ [0pt] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\contentslabel{2.3em}\enspace}
+ {\hspace*{-2.3em}\enspace}
+ {\quad\contentspage}
+
+ \titlecontents{table}
+ [0pt] % ie, 1.5em (chapter) + 2.3em
+ {}
+ {\contentslabel{2.3em}\enspace}
+ {\hspace*{-2.3em}\enspace}
+ {\quad\contentspage}
+
+
+ %%%%%%% end part in toc %%%%%%%%
+}
+
+%For the parameters of a definition inside a definition you need to double the hash char:
+%
+%\renewcommand\appendix{\par
+% \def\@makechapterhead##1{%
+% ... ##1 ...
+% }%
+% ...
+%}
+%from http://tex.stackexchange.com/questions/62438/how-to-add-leaders-to-table-of-contents-without-tocloft/62441#62441
+
+\newcommand{\traditionaltoc}{
+
+ \renewcommand*\l@part[2]{%
+ \ifnum \c@tocdepth >-2\relax
+ \addpenalty{-\@highpenalty}%
+ \addvspace{2.25em \@plus\p@}%
+ \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ {\leavevmode
+ \large \bfseries ##1\hfil \hb@xt@\@pnumwidth{\hss ##2}}\par
+ \nobreak
+ \global\@nobreaktrue
+ \everypar{\global\@nobreakfalse\everypar{}}%
+ \endgroup
+ \fi}
+
+
+ \renewcommand*\l@chapter[2]{%
+ \ifnum \c@tocdepth >\m@ne
+ \addpenalty{-\@highpenalty}%
+ \vskip 1.0em \@plus\p@
+ \setlength\@tempdima{1.5em}%
+ \begingroup
+ \parindent \z@ \rightskip \@pnumwidth
+ \parfillskip -\@pnumwidth
+ \leavevmode \bfseries
+ \advance\leftskip\@tempdima
+ \hskip -\leftskip
+ ##1\nobreak
+ \xleaders\hbox{$\m@th
+ \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
+ mu$}\hfill%
+ \nobreak\hb@xt@\@pnumwidth{\hss ##2}\par
+ \penalty\@highpenalty
+ \endgroup
+ \fi}
+ }
+
\RequirePackage{ifxetex}
\ifxetex
\RequirePackage{fontspec}
@@ -428,7 +832,7 @@
-%\setlength{\marginparwidth}{1.3in}
+
% remove toc, list of figures and list of tables from table of contents
@@ -453,9 +857,9 @@
%%% 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
+%\RequirePackage{etoolbox}
+%\patchcmd{\@addmarginpar}{\ifodd\c@page}{\ifodd\c@page\@tempcnta\m@ne}{}{}
+%\reversemarginpar
\frenchspacing
@@ -463,15 +867,15 @@
%%%% 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}
+ \renewcommand\floatpagefraction{.9}
+ \renewcommand\dblfloatpagefraction{.9} % for two column documents
+ \renewcommand\topfraction{.9}
+ \renewcommand\dbltopfraction{.9} % for two column documents
+ \renewcommand\bottomfraction{.9}
+ \renewcommand\textfraction{.1}
+ \setcounter{totalnumber}{50}
+ \setcounter{topnumber}{50}
+ \setcounter{bottomnumber}{50}
%\setcounter{totalnumber}{1}
%\setcounter{topnumber}{1}
@@ -481,6 +885,27 @@
%\renewcommand{\textfraction}{.01}
+%%%% margins in two-side
+
+
+\if@marginparsused
+\setlength\marginparsep{1cc}
+\addtolength\oddsidemargin{-1cc}
+\addtolength\evensidemargin{5.5cc}
+\setlength{\marginparwidth}{1.3in}
+\setlength\marginparpush{.5\baselineskip}
+\else
+\setlength\marginparsep{0cc}
+\setlength\marginparwidth{0cc}
+\def\marginpar{\ClassError{mwcls}{Marginpars are disabled by
+ default in this class.\MessageBreak Use `withmarginpar'
+ option to enable}{}\global\let\marginpar\@gobble}
+\fi
+
+
+
+
+
%%%%%% 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
@@ -625,4 +1050,4 @@
-\endinput \ No newline at end of file
+\endinput