summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-05-22 20:27:32 +0000
committerKarl Berry <karl@freefriends.org>2023-05-22 20:27:32 +0000
commit6f2ff9446a7a9c7311b48705aca80ebc1bff99a8 (patch)
tree1fb8198a64f4e3322d14aa5a5d1d3e5683ec19c1
parent424fcbdc13bb0f58a85d193472418be1a14348f4 (diff)
yb-book (22may23)
git-svn-id: svn://tug.org/texlive/trunk@67188 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt2
-rw-r--r--Master/texmf-dist/doc/latex/yb-book/yb-book.pdfbin283982 -> 284729 bytes
-rw-r--r--Master/texmf-dist/source/latex/yb-book/yb-book.dtx107
-rw-r--r--Master/texmf-dist/tex/latex/yb-book/yb-book.cls104
4 files changed, 110 insertions, 103 deletions
diff --git a/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt b/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt
index caa266e1d21..6d007226664 100644
--- a/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt
+++ b/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt
@@ -1,5 +1,7 @@
hard pgf
+hard pgfopts
hard xkeyval
+hard textpos
hard geometry
hard anyfontsize
hard chngcntr
diff --git a/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf b/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf
index e12566d90c5..75d400f8588 100644
--- a/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf
+++ b/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/yb-book/yb-book.dtx b/Master/texmf-dist/source/latex/yb-book/yb-book.dtx
index 49953412a4d..105aec54c12 100644
--- a/Master/texmf-dist/source/latex/yb-book/yb-book.dtx
+++ b/Master/texmf-dist/source/latex/yb-book/yb-book.dtx
@@ -50,7 +50,7 @@
%<class>\NeedsTeXFormat{LaTeX2e}
%<class>\ProvidesClass{yb-book}
%<*class>
-[19.05.20230 0.2.1 YB Branded Book Style]
+[22.05.20230 0.3.0 YB Branded Book Style]
%</class>
%<*driver>
\documentclass{ltxdoc}
@@ -245,28 +245,27 @@ Hello, world!
% \changes{v0.1.0}{2022/01/09}{Initial version}
% \changes{v0.2.0}{2022/10/02}{Started using l3build}
-% First, we use |xkeyval| package for package options parsing:
+% First, we parse package options:
+% \changes{v0.3.0}{2023/05/22}{The \texttt{pgfopts} package is now used to parse package options.}
% \begin{macrocode}
-\RequirePackage{xkeyval}
-\makeatletter
-\newif\ifyb@draft
-\DeclareOptionX{draft}{\yb@drafttrue}
-\newif\ifyb@compact
-\DeclareOptionX{compact}{\yb@compacttrue}
-\newif\ifyb@manuscript
-\DeclareOptionX{manuscript}{\yb@manuscripttrue}
-\ProcessOptionsX
-\makeatother
+\RequirePackage{pgfopts}
+\pgfkeys{
+ /yb/.cd,
+ draft/.store in=\yb@draft,
+ compact/.store in=\yb@compact,
+ manuscript/.store in=\yb@manuscript,
+}
+\ProcessPgfPackageOptions{/yb}
% \end{macrocode}
% Then, depending on the options like |draft| and |manuscript|, we preset
% options of the class |book| and then load it:
% \begin{macrocode}
-\makeatletter\ifyb@draft
+\makeatletter\ifdefined\yb@draft
\PassOptionsToClass{11pt}{book}
\PassOptionsToClass{oneside}{book}
\else
- \ifyb@manuscript
+ \ifdefined\yb@manuscript
\PassOptionsToClass{12pt}{book}
\PassOptionsToClass{oneside}{book}
\else
@@ -283,10 +282,10 @@ Hello, world!
\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
+\makeatletter\ifdefined\yb@draft
\geometry{a4paper, margin=1in, left=1.5in}
\else
- \ifyb@manuscript
+ \ifdefined\yb@manuscript
\geometry{a4paper, margin=1.2in}
\fi
\fi\makeatother
@@ -336,9 +335,9 @@ Hello, world!
% \begin{macrocode}
\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
+ \makeatletter\ifdefined\yb@draft\setstretch{1.1}\fi\makeatother
+ \makeatletter\ifdefined\yb@compact\setstretch{1.0}\fi\makeatother
+ \makeatletter\ifdefined\yb@manuscript\setstretch{1.1}\fi\makeatother
% \end{macrocode}
% \end{macro}
@@ -384,7 +383,7 @@ Hello, world!
% \begin{macro}{microtype}
% Then, we include |microtype| for better rendering:
% \begin{macrocode}
-\makeatletter\ifyb@draft\else
+\makeatletter\ifdefined\yb@draft\else
\RequirePackage[letterspace=-50]{microtype}
\fi\makeatother
% \end{macrocode}
@@ -393,7 +392,7 @@ Hello, world!
% \begin{macro}{libertine}
% Then, we include |libertine|, for a good looking font:
% \begin{macrocode}
-\makeatletter\ifyb@manuscript
+\makeatletter\ifdefined\yb@manuscript
\RequirePackage[tt=false,type1=true]{libertine}
\fi\makeatother
% \end{macrocode}
@@ -404,14 +403,14 @@ Hello, world!
% \begin{macrocode}
\makeatletter
\let\yb@oldsection\section
-\ifyb@draft
+\ifdefined\yb@draft
\RequirePackage[medium]{titlesec}
\else
\RequirePackage[raggedright]{titlesec}
\titlespacing{\section}{0in}{6pt}{6pt}[1in]
\renewcommand\section{\newpage\yb@oldsection}
\fi
-\ifyb@compact
+\ifdefined\yb@compact
\renewcommand\section{\vspace{2em}\yb@oldsection}
\fi
\makeatother
@@ -420,29 +419,33 @@ Hello, world!
% Then, if it's a |draft|, we put a watermark comment:
% \begin{macrocode}
-\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)
- \tikz \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{textblock}
-}
-\fancyfoot[C,CO]{\small\ttfamily
- page \#\thepage{} of \pageref{LastPage}}
+\makeatletter\ifdefined\yb@draft
+ \RequirePackage[absolute]{textpos}
+ \TPGrid{16}{16}
+ \RequirePackage{fancyhdr}
+ \pagestyle{fancy}
+ \renewcommand\headrulewidth{0pt}
+ \renewcommand\footrulewidth{0pt}
+ \setlength{\headheight}{16pt}
+ \fancyhf{}
+ \fancyhead[L,C,LO,CO]{}
+ \fancyhead[R,RO]{
+ \begin{textblock}{4}(11.5,1)
+ \tikz \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{textblock}
+ }
+ \fancyfoot[C,CO,CE]{\small\ttfamily
+ page \#\thepage{} of \pageref{LastPage}}
\fi\makeatother
% \end{macrocode}
@@ -472,7 +475,7 @@ Hello, world!
% Then, we define |\ybPrintTitlePage| command:
% \begin{macrocode}
\makeatletter\newcommand\ybPrintTitlePage{
- \ifyb@draft\else
+ \ifdefined\yb@draft\else
\begin{titlepage}
\ttfamily
\vspace*{\fill}
@@ -502,8 +505,8 @@ Hello, world!
% Then, we define |ybPrintTOC| command to print table of contents:
% \begin{macrocode}
\makeatletter\newcommand\ybPrintTOC{
- \ifyb@draft\else
- \ifyb@compact\else\cleardoublepage\fi
+ \ifdefined\yb@draft\else
+ \ifdefined\yb@compact\else\cleardoublepage\fi
{\setstretch{0.7}\tableofcontents}
\fi
}\makeatother
@@ -518,7 +521,7 @@ Hello, world!
\makeindex
\indexsetup{othercode={\hyphenpenalty=10000}}
\makeatletter\newcommand\ybPrintIndex[1][Index]{
- \ifyb@draft\else
+ \ifdefined\yb@draft\else
\cleardoublepage
{
\setstretch{1.0}
@@ -568,7 +571,7 @@ Hello, world!
``#1''\\\raggedleft---#2 #3%
\fi%
}
- \ifyb@draft%
+ \ifdefined\yb@draft%
\begin{wrapfigure}{r}{0.4\textwidth}%
\begin{mdframed}[style=quoteodd]%
\yb@body%
@@ -610,7 +613,7 @@ Hello, world!
\makeatletter\newcommand\ybPrintBibliography{%
\AtNextBibliography{\small}%
\raggedright%
- \ifyb@manuscript%
+ \ifdefined\yb@manuscript%
\setlength\bibitemsep{0pt}%
\newpage%
\begin{multicols}{2}
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 780fc5730f7..9bb86baf2c9 100644
--- a/Master/texmf-dist/tex/latex/yb-book/yb-book.cls
+++ b/Master/texmf-dist/tex/latex/yb-book/yb-book.cls
@@ -32,7 +32,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{yb-book}
-[19.05.20230 0.2.1 YB Branded Book Style]
+[22.05.20230 0.3.0 YB Branded Book Style]
@@ -53,22 +53,20 @@
-\RequirePackage{xkeyval}
-\makeatletter
-\newif\ifyb@draft
-\DeclareOptionX{draft}{\yb@drafttrue}
-\newif\ifyb@compact
-\DeclareOptionX{compact}{\yb@compacttrue}
-\newif\ifyb@manuscript
-\DeclareOptionX{manuscript}{\yb@manuscripttrue}
-\ProcessOptionsX
-\makeatother
+\RequirePackage{pgfopts}
+\pgfkeys{
+ /yb/.cd,
+ draft/.store in=\yb@draft,
+ compact/.store in=\yb@compact,
+ manuscript/.store in=\yb@manuscript,
+}
+\ProcessPgfPackageOptions{/yb}
-\makeatletter\ifyb@draft
+\makeatletter\ifdefined\yb@draft
\PassOptionsToClass{11pt}{book}
\PassOptionsToClass{oneside}{book}
\else
- \ifyb@manuscript
+ \ifdefined\yb@manuscript
\PassOptionsToClass{12pt}{book}
\PassOptionsToClass{oneside}{book}
\else
@@ -81,10 +79,10 @@
\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
+\makeatletter\ifdefined\yb@draft
\geometry{a4paper, margin=1in, left=1.5in}
\else
- \ifyb@manuscript
+ \ifdefined\yb@manuscript
\geometry{a4paper, margin=1.2in}
\fi
\fi\makeatother
@@ -117,9 +115,9 @@
\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
+ \makeatletter\ifdefined\yb@draft\setstretch{1.1}\fi\makeatother
+ \makeatletter\ifdefined\yb@compact\setstretch{1.0}\fi\makeatother
+ \makeatletter\ifdefined\yb@manuscript\setstretch{1.1}\fi\makeatother
\RequirePackage[indexing=cite,style=authoryear,
natbib=true,maxnames=1,minnames=1,doi=false,
@@ -149,51 +147,55 @@
{\begingroup\setstretch{1.0}\lsstyle}
{\endgroup}
-\makeatletter\ifyb@draft\else
+\makeatletter\ifdefined\yb@draft\else
\RequirePackage[letterspace=-50]{microtype}
\fi\makeatother
-\makeatletter\ifyb@manuscript
+\makeatletter\ifdefined\yb@manuscript
\RequirePackage[tt=false,type1=true]{libertine}
\fi\makeatother
\makeatletter
\let\yb@oldsection\section
-\ifyb@draft
+\ifdefined\yb@draft
\RequirePackage[medium]{titlesec}
\else
\RequirePackage[raggedright]{titlesec}
\titlespacing{\section}{0in}{6pt}{6pt}[1in]
\renewcommand\section{\newpage\yb@oldsection}
\fi
-\ifyb@compact
+\ifdefined\yb@compact
\renewcommand\section{\vspace{2em}\yb@oldsection}
\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)
- \tikz \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{textblock}
-}
-\fancyfoot[C,CO]{\small\ttfamily
- page \#\thepage{} of \pageref{LastPage}}
+\makeatletter\ifdefined\yb@draft
+ \RequirePackage[absolute]{textpos}
+ \TPGrid{16}{16}
+ \RequirePackage{fancyhdr}
+ \pagestyle{fancy}
+ \renewcommand\headrulewidth{0pt}
+ \renewcommand\footrulewidth{0pt}
+ \setlength{\headheight}{16pt}
+ \fancyhf{}
+ \fancyhead[L,C,LO,CO]{}
+ \fancyhead[R,RO]{
+ \begin{textblock}{4}(11.5,1)
+ \tikz \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{textblock}
+ }
+ \fancyfoot[C,CO,CE]{\small\ttfamily
+ page \#\thepage{} of \pageref{LastPage}}
\fi\makeatother
\renewcommand\maketitle{
@@ -214,7 +216,7 @@
}
\makeatletter\newcommand\ybPrintTitlePage{
- \ifyb@draft\else
+ \ifdefined\yb@draft\else
\begin{titlepage}
\ttfamily
\vspace*{\fill}
@@ -239,8 +241,8 @@
}\makeatother
\makeatletter\newcommand\ybPrintTOC{
- \ifyb@draft\else
- \ifyb@compact\else\cleardoublepage\fi
+ \ifdefined\yb@draft\else
+ \ifdefined\yb@compact\else\cleardoublepage\fi
{\setstretch{0.7}\tableofcontents}
\fi
}\makeatother
@@ -250,7 +252,7 @@
\makeindex
\indexsetup{othercode={\hyphenpenalty=10000}}
\makeatletter\newcommand\ybPrintIndex[1][Index]{
- \ifyb@draft\else
+ \ifdefined\yb@draft\else
\cleardoublepage
{
\setstretch{1.0}
@@ -295,7 +297,7 @@
``#1''\\\raggedleft---#2 #3%
\fi%
}
- \ifyb@draft%
+ \ifdefined\yb@draft%
\begin{wrapfigure}{r}{0.4\textwidth}%
\begin{mdframed}[style=quoteodd]%
\yb@body%
@@ -328,7 +330,7 @@
\makeatletter\newcommand\ybPrintBibliography{%
\AtNextBibliography{\small}%
\raggedright%
- \ifyb@manuscript%
+ \ifdefined\yb@manuscript%
\setlength\bibitemsep{0pt}%
\newpage%
\begin{multicols}{2}