summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-10-02 20:21:41 +0000
committerKarl Berry <karl@freefriends.org>2022-10-02 20:21:41 +0000
commit577f093e401f937931fdb0b38a6c9680ad542604 (patch)
treeb10003244ce94cdd88af43287689d1fac3a6bd59 /Master/texmf-dist/tex/latex
parent0bca632227a3dc29bac856270b6eeb057562085b (diff)
yb-book (2oct22)
git-svn-id: svn://tug.org/texlive/trunk@64586 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/yb-book/yb-book.cls247
1 files changed, 134 insertions, 113 deletions
diff --git a/Master/texmf-dist/tex/latex/yb-book/yb-book.cls b/Master/texmf-dist/tex/latex/yb-book/yb-book.cls
index 4b99e805149..2967b0b4af6 100644
--- a/Master/texmf-dist/tex/latex/yb-book/yb-book.cls
+++ b/Master/texmf-dist/tex/latex/yb-book/yb-book.cls
@@ -1,30 +1,59 @@
-% (The MIT License)
-%
-% Copyright (c) 2021-2022 Yegor Bugayenko
-%
-% Permission is hereby granted, free of charge, to any person obtaining a copy
-% of this software and associated documentation files (the 'Software'), to deal
-% in the Software without restriction, including without limitation the rights
-% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-% copies of the Software, and to permit persons to whom the Software is
-% furnished to do so, subject to the following conditions:
-%
-% The above copyright notice and this permission notice shall be included in all
-% copies or substantial portions of the Software.
-%
-% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-% SOFTWARE.
+%%
+%% This is file `yb-book.cls',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% yb-book.dtx (with options: `class')
+%% (The MIT License)
+%%
+%% Copyright (c) 2021-2022 Yegor Bugayenko
+%%
+%% Permission is hereby granted, free of charge, to any person obtaining a copy
+%% of this software and associated documentation files (the 'Software'), to deal
+%% in the Software without restriction, including without limitation the rights
+%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+%% copies of the Software, and to permit persons to whom the Software is
+%% furnished to do so, subject to the following conditions:
+%%
+%% The above copyright notice and this permission notice shall be included in all
+%% copies or substantial portions of the Software.
+%%
+%% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+%% SOFTWARE.
+
+%%% \CheckSum{0}
+
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{yb-book}[2022/01/03 0.1.0 YB Branded Book Style]
+\ProvidesClass{yb-book}
+[02.10.2022 0.2.0 YB Branded Book Style]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-\RequirePackage{xkeyval}
+
+
+
+\RequirePackage{xkeyval}
\makeatletter
\newif\ifyb@draft
\DeclareOptionX{draft}{\yb@drafttrue}
@@ -47,21 +76,23 @@
\PassOptionsToClass{twoside}{book}
\fi
\fi\makeatother
-
\LoadClass{book}
\RequirePackage{geometry}
- \geometry{paperwidth=6in, paperheight=9in, bindingoffset=0.25in, left=0.75in, right=0.75in, top=0.75in, bottom=1.25in}
- \makeatletter\ifyb@draft
- \geometry{a4paper, margin=1in, left=1.5in}
- \else
- \ifyb@manuscript
- \geometry{a4paper, margin=1.2in}
- \fi
- \fi\makeatother
+\geometry{paperwidth=6in, paperheight=9in, bindingoffset=0.25in,
+ left=0.75in, right=0.75in, top=0.75in, bottom=1.25in}
+\makeatletter\ifyb@draft
+ \geometry{a4paper, margin=1in, left=1.5in}
+\else
+ \ifyb@manuscript
+ \geometry{a4paper, margin=1.2in}
+ \fi
+\fi\makeatother
\RequirePackage[T1]{fontenc}
\RequirePackage[utf8]{inputenc}
+\RequirePackage{lmodern}
+
\RequirePackage{anyfontsize}
\RequirePackage{tikz}
\usetikzlibrary{positioning}
@@ -73,25 +104,26 @@
\RequirePackage{paralist}
\RequirePackage{xcolor}
\RequirePackage{graphicx}
-\RequirePackage{setspace}
- \setstretch{1.2}
- \makeatletter\ifyb@draft\setstretch{1.1}\fi\makeatother
- \makeatletter\ifyb@compact\setstretch{1.0}\fi\makeatother
- \makeatletter\ifyb@manuscript\setstretch{1.1}\fi\makeatother
-\RequirePackage{textcomp}
\RequirePackage[inline]{enumitem}
\setlist{nosep}
\RequirePackage{float}
\RequirePackage[normalem]{ulem}
-\RequirePackage{qrcode}
-\RequirePackage{wrapfig}
- \pagestyle{plain}
\RequirePackage{xfp}
-\RequirePackage{soul} % in order to use \st{} to strikethrough
+\RequirePackage{soul}
\RequirePackage{xifthen}
\RequirePackage[autostyle=try]{csquotes}
-\RequirePackage[indexing=cite,style=authoryear,natbib=true,maxnames=1,minnames=1,doi=false,url=false,isbn=false,isbn=false]{biblatex}
+\pagestyle{plain}
+
+\RequirePackage{setspace}
+ \setstretch{1.2}
+ \makeatletter\ifyb@draft\setstretch{1.1}\fi\makeatother
+ \makeatletter\ifyb@compact\setstretch{1.0}\fi\makeatother
+ \makeatletter\ifyb@manuscript\setstretch{1.1}\fi\makeatother
+
+\RequirePackage[indexing=cite,style=authoryear,
+ natbib=true,maxnames=1,minnames=1,doi=false,
+ url=false,isbn=false,isbn=false]{biblatex}
\DeclareCiteCommand{\citetitle}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
@@ -112,15 +144,10 @@
\printfield[citetitle]{title}}
{\multicitedelim}
{\usebibmacro{postnote}}
-\RequirePackage{imakeidx}
- \renewbibmacro*{citeindex}{\indexnames{labelname}{}}
- \makeindex
- \indexsetup{othercode={\hyphenpenalty=10000}}
-\newenvironment{condensed}{%
- \begingroup\setstretch{1.0}%
- % This lsstyle is defined by 'letterspace' in microtype
- \lsstyle}{\endgroup}
+\newenvironment{condensed}
+ {\begingroup\setstretch{1.0}\lsstyle}
+ {\endgroup}
\makeatletter\ifyb@draft\else
\RequirePackage[letterspace=-50]{microtype}
@@ -130,53 +157,44 @@
\RequirePackage[tt=false,type1=true]{libertine}
\fi\makeatother
-\RequirePackage[bottom,perpage,multiple]{footmisc}
- % see https://tex.stackexchange.com/questions/40072/incompatibility-between-footmisc-option-multiple-and-hyperref/62091#62091
- \makeatletter\let\yb@oldfootnote\footnote\makeatother
- \makeatletter\newcommand\yb@nexttoken\relax\makeatother
- \makeatletter\newcommand\yb@isfootnote{%
- \ifx\footnote\yb@nexttoken\textsuperscript{,}\fi}\makeatother
- \makeatletter\renewcommand\footnote[1]{%
- \yb@oldfootnote{#1}\futurelet\yb@nexttoken\yb@isfootnote}\makeatother
-
\makeatletter
- \let\yb@oldsection\section
- \ifyb@draft
- \RequirePackage[medium]{titlesec}
- \else
- \RequirePackage[raggedright]{titlesec}
- \titlespacing{\section}{0in}{6pt}{6pt}[1in]
- \renewcommand\section{\newpage\yb@oldsection}
- \fi
-\makeatother
-
-\makeatletter\ifyb@compact
+\let\yb@oldsection\section
+\ifyb@draft
+ \RequirePackage[medium]{titlesec}
+\else
+ \RequirePackage[raggedright]{titlesec}
+ \titlespacing{\section}{0in}{6pt}{6pt}[1in]
+ \renewcommand\section{\newpage\yb@oldsection}
+\fi
+\ifyb@compact
\renewcommand\section{\vspace{2em}\yb@oldsection}
-\fi\makeatother
+\fi
+\makeatother
\makeatletter\ifyb@draft
- \RequirePackage{fancyhdr}
- \pagestyle{fancy}
- \renewcommand\headrulewidth{0pt}
- \renewcommand\footrulewidth{0pt}
- \fancyhf{}
- \fancyhead[L,C,LO,CO]{}
- \fancyhead[R,RO]{
- \begin{textblock}{4}(11.5,1)
- \begin{tikzpicture}
- \node [color=gray, rotate=270, font=\ttfamily\scriptsize, text width=5in] at (0,0) {
- Copyright \textcopyright{} \the\year{} by \theauthor{}.
- All rights reserved. No part of the contents of this book may be
- reproduced or transmitted in any form or by any means without the
- written permission of the publisher.
- This particular manuscript is printed for
- \textbf{\thereviewer{}} and may be used only for one-time review. The
- manuscript has to be destroyed after the review.
- };
- \end{tikzpicture}
- \end{textblock}
- }
- \fancyfoot[C,CO]{\small\ttfamily page \#\thepage{} of \pageref{LastPage}}
+\RequirePackage{fancyhdr}
+\pagestyle{fancy}
+\renewcommand\headrulewidth{0pt}
+\renewcommand\footrulewidth{0pt}
+\fancyhf{}
+\fancyhead[L,C,LO,CO]{}
+\fancyhead[R,RO]{
+ \begin{textblock}{4}(11.5,1)\begin{tikzpicture}
+ \node [color=gray, rotate=270,
+ font=\ttfamily\scriptsize, text width=5in] at (0,0) {
+ Copyright \textcopyright{} \the\year{} by \theauthor{}.
+ All rights reserved. No part of the contents of
+ this book may be reproduced or transmitted in any
+ form or by any means without the written permission
+ of the publisher. This particular manuscript is
+ printed for \textbf{\thereviewer}} and may be used only
+ for one-time review. The manuscript has to be destroyed
+ after the review.
+ };
+ \end{tikzpicture}\end{textblock}
+}
+\fancyfoot[C,CO]{\small\ttfamily
+ page \#\thepage{} of \pageref{LastPage}}
\fi\makeatother
\renewcommand\maketitle{
@@ -228,6 +246,10 @@
\fi
}\makeatother
+\RequirePackage{imakeidx}
+ \renewbibmacro*{citeindex}{\indexnames{labelname}{}}
+ \makeindex
+ \indexsetup{othercode={\hyphenpenalty=10000}}
\makeatletter\newcommand\ybPrintIndex[1][Index]{
\ifyb@draft\else
\cleardoublepage
@@ -240,20 +262,6 @@
\fi
}\makeatother
-\newcommand\ybPrintIcons{%
- \ifdefempty{\theemail{}}{}{%
- \includegraphics[height=1em]{images/icon-email.pdf}%
- \theemail{}%
- }%
- \includegraphics[height=1em]{images/icon-twitter.pdf}%
- \includegraphics[height=1em]{images/icon-linkedin.pdf}%
- \includegraphics[height=1em]{images/icon-github.pdf}%
- \includegraphics[height=1em]{images/icon-instagram.pdf}%
- \includegraphics[height=1em]{images/icon-facebook.pdf}%
- \thesocial{}%
-}
-
-% quotes
\RequirePackage{wrapfig}
\RequirePackage{mdframed}
\RequirePackage{changepage}
@@ -307,13 +315,26 @@
\fi%
}\makeatother
+\RequirePackage{perpage}
+\RequirePackage[bottom,perpage,multiple]{footmisc}
+\makeatletter
+ \let\yb@oldfootnote\footnote
+\newcommand\yb@nexttoken\relax
+\newcommand\yb@isfootnote{%
+ \ifx\footnote\yb@nexttoken\textsuperscript{,}\fi}
+\renewcommand\footnote[1]{%
+ \yb@oldfootnote{#1}\futurelet\yb@nexttoken\yb@isfootnote}
+\makeatother
+
\makeatletter\newcommand\ybPrintBibliography{%
\AtNextBibliography{\small}%
\raggedright%
\ifyb@manuscript%
\setlength\bibitemsep{0pt}%
\newpage%
- \begin{multicols}{2}{\setstretch{1.0}\printbibliography}\end{multicols}
+ \begin{multicols}{2}
+ {\setstretch{1.0}\printbibliography}
+ \end{multicols}
\else
\printbibliography
\fi
@@ -323,6 +344,7 @@
\raggedbottom%
\setlength\topskip{0mm}%
\setlength\parindent{0pt}%
+ \setlength\fboxsep{0pt}%
\setlength\parskip{6pt}%
\interfootnotelinepenalty=10000%
}
@@ -330,12 +352,11 @@
\newcommand*\thetitle{\textbackslash{}thetitle}
\newcommand*\thevolume{}
\newcommand*\thedate{}
-\newcommand*\theemail{\textbackslash{}theemail}
-\newcommand*\thesocial{\textbackslash{}thesocial}
\newcommand*\theversion{\textbackslash{}theversion}
\newcommand*\theauthor{\textbackslash{}theauthor}
\newcommand*\thereviewer{\textbackslash{}thereviewer}
-\newcommand*\theyear{\textbackslash{}theyear}
-\newcommand*\theprice{\textbackslash{}theprice}
+
\endinput
+%%
+%% End of file `yb-book.cls'.