texlive[67188] Master/texmf-dist: yb-book (22may23)
commits+karl at tug.org
commits+karl at tug.org
Mon May 22 22:27:32 CEST 2023
Revision: 67188
http://tug.org/svn/texlive?view=revision&revision=67188
Author: karl
Date: 2023-05-22 22:27:32 +0200 (Mon, 22 May 2023)
Log Message:
-----------
yb-book (22may23)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt
trunk/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf
trunk/Master/texmf-dist/source/latex/yb-book/yb-book.dtx
trunk/Master/texmf-dist/tex/latex/yb-book/yb-book.cls
Modified: trunk/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt 2023-05-22 20:27:20 UTC (rev 67187)
+++ trunk/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt 2023-05-22 20:27:32 UTC (rev 67188)
@@ -1,5 +1,7 @@
hard pgf
+hard pgfopts
hard xkeyval
+hard textpos
hard geometry
hard anyfontsize
hard chngcntr
Modified: trunk/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/yb-book/yb-book.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/yb-book/yb-book.dtx 2023-05-22 20:27:20 UTC (rev 67187)
+++ trunk/Master/texmf-dist/source/latex/yb-book/yb-book.dtx 2023-05-22 20:27:32 UTC (rev 67188)
@@ -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 @@
% \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 at draft
-\DeclareOptionX{draft}{\yb at drafttrue}
-\newif\ifyb at compact
-\DeclareOptionX{compact}{\yb at compacttrue}
-\newif\ifyb at manuscript
-\DeclareOptionX{manuscript}{\yb at manuscripttrue}
-\ProcessOptionsX
-\makeatother
+\RequirePackage{pgfopts}
+\pgfkeys{
+ /yb/.cd,
+ draft/.store in=\yb at draft,
+ compact/.store in=\yb at compact,
+ manuscript/.store in=\yb at 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 at draft
+\makeatletter\ifdefined\yb at draft
\PassOptionsToClass{11pt}{book}
\PassOptionsToClass{oneside}{book}
\else
- \ifyb at manuscript
+ \ifdefined\yb at manuscript
\PassOptionsToClass{12pt}{book}
\PassOptionsToClass{oneside}{book}
\else
@@ -283,10 +282,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 at draft
+\makeatletter\ifdefined\yb at draft
\geometry{a4paper, margin=1in, left=1.5in}
\else
- \ifyb at manuscript
+ \ifdefined\yb at manuscript
\geometry{a4paper, margin=1.2in}
\fi
\fi\makeatother
@@ -336,9 +335,9 @@
% \begin{macrocode}
\RequirePackage{setspace}
\setstretch{1.2}
- \makeatletter\ifyb at draft\setstretch{1.1}\fi\makeatother
- \makeatletter\ifyb at compact\setstretch{1.0}\fi\makeatother
- \makeatletter\ifyb at manuscript\setstretch{1.1}\fi\makeatother
+ \makeatletter\ifdefined\yb at draft\setstretch{1.1}\fi\makeatother
+ \makeatletter\ifdefined\yb at compact\setstretch{1.0}\fi\makeatother
+ \makeatletter\ifdefined\yb at manuscript\setstretch{1.1}\fi\makeatother
% \end{macrocode}
% \end{macro}
@@ -384,7 +383,7 @@
% \begin{macro}{microtype}
% Then, we include |microtype| for better rendering:
% \begin{macrocode}
-\makeatletter\ifyb at draft\else
+\makeatletter\ifdefined\yb at draft\else
\RequirePackage[letterspace=-50]{microtype}
\fi\makeatother
% \end{macrocode}
@@ -393,7 +392,7 @@
% \begin{macro}{libertine}
% Then, we include |libertine|, for a good looking font:
% \begin{macrocode}
-\makeatletter\ifyb at manuscript
+\makeatletter\ifdefined\yb at manuscript
\RequirePackage[tt=false,type1=true]{libertine}
\fi\makeatother
% \end{macrocode}
@@ -404,7 +403,7 @@
% \begin{macrocode}
\makeatletter
\let\yb at oldsection\section
-\ifyb at draft
+\ifdefined\yb at draft
\RequirePackage[medium]{titlesec}
\else
\RequirePackage[raggedright]{titlesec}
@@ -411,7 +410,7 @@
\titlespacing{\section}{0in}{6pt}{6pt}[1in]
\renewcommand\section{\newpage\yb at oldsection}
\fi
-\ifyb at compact
+\ifdefined\yb at compact
\renewcommand\section{\vspace{2em}\yb at oldsection}
\fi
\makeatother
@@ -420,29 +419,33 @@
% Then, if it's a |draft|, we put a watermark comment:
% \begin{macrocode}
-\makeatletter\ifyb at 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 at 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 @@
% Then, we define |\ybPrintTitlePage| command:
% \begin{macrocode}
\makeatletter\newcommand\ybPrintTitlePage{
- \ifyb at draft\else
+ \ifdefined\yb at draft\else
\begin{titlepage}
\ttfamily
\vspace*{\fill}
@@ -502,8 +505,8 @@
% Then, we define |ybPrintTOC| command to print table of contents:
% \begin{macrocode}
\makeatletter\newcommand\ybPrintTOC{
- \ifyb at draft\else
- \ifyb at compact\else\cleardoublepage\fi
+ \ifdefined\yb at draft\else
+ \ifdefined\yb at compact\else\cleardoublepage\fi
{\setstretch{0.7}\tableofcontents}
\fi
}\makeatother
@@ -518,7 +521,7 @@
\makeindex
\indexsetup{othercode={\hyphenpenalty=10000}}
\makeatletter\newcommand\ybPrintIndex[1][Index]{
- \ifyb at draft\else
+ \ifdefined\yb at draft\else
\cleardoublepage
{
\setstretch{1.0}
@@ -568,7 +571,7 @@
``#1''\\\raggedleft---#2 #3%
\fi%
}
- \ifyb at draft%
+ \ifdefined\yb at draft%
\begin{wrapfigure}{r}{0.4\textwidth}%
\begin{mdframed}[style=quoteodd]%
\yb at body%
@@ -610,7 +613,7 @@
\makeatletter\newcommand\ybPrintBibliography{%
\AtNextBibliography{\small}%
\raggedright%
- \ifyb at manuscript%
+ \ifdefined\yb at manuscript%
\setlength\bibitemsep{0pt}%
\newpage%
\begin{multicols}{2}
Modified: trunk/Master/texmf-dist/tex/latex/yb-book/yb-book.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/yb-book/yb-book.cls 2023-05-22 20:27:20 UTC (rev 67187)
+++ trunk/Master/texmf-dist/tex/latex/yb-book/yb-book.cls 2023-05-22 20:27:32 UTC (rev 67188)
@@ -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 at draft
-\DeclareOptionX{draft}{\yb at drafttrue}
-\newif\ifyb at compact
-\DeclareOptionX{compact}{\yb at compacttrue}
-\newif\ifyb at manuscript
-\DeclareOptionX{manuscript}{\yb at manuscripttrue}
-\ProcessOptionsX
-\makeatother
+\RequirePackage{pgfopts}
+\pgfkeys{
+ /yb/.cd,
+ draft/.store in=\yb at draft,
+ compact/.store in=\yb at compact,
+ manuscript/.store in=\yb at manuscript,
+}
+\ProcessPgfPackageOptions{/yb}
-\makeatletter\ifyb at draft
+\makeatletter\ifdefined\yb at draft
\PassOptionsToClass{11pt}{book}
\PassOptionsToClass{oneside}{book}
\else
- \ifyb at manuscript
+ \ifdefined\yb at 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 at draft
+\makeatletter\ifdefined\yb at draft
\geometry{a4paper, margin=1in, left=1.5in}
\else
- \ifyb at manuscript
+ \ifdefined\yb at manuscript
\geometry{a4paper, margin=1.2in}
\fi
\fi\makeatother
@@ -117,9 +115,9 @@
\RequirePackage{setspace}
\setstretch{1.2}
- \makeatletter\ifyb at draft\setstretch{1.1}\fi\makeatother
- \makeatletter\ifyb at compact\setstretch{1.0}\fi\makeatother
- \makeatletter\ifyb at manuscript\setstretch{1.1}\fi\makeatother
+ \makeatletter\ifdefined\yb at draft\setstretch{1.1}\fi\makeatother
+ \makeatletter\ifdefined\yb at compact\setstretch{1.0}\fi\makeatother
+ \makeatletter\ifdefined\yb at manuscript\setstretch{1.1}\fi\makeatother
\RequirePackage[indexing=cite,style=authoryear,
natbib=true,maxnames=1,minnames=1,doi=false,
@@ -149,17 +147,17 @@
{\begingroup\setstretch{1.0}\lsstyle}
{\endgroup}
-\makeatletter\ifyb at draft\else
+\makeatletter\ifdefined\yb at draft\else
\RequirePackage[letterspace=-50]{microtype}
\fi\makeatother
-\makeatletter\ifyb at manuscript
+\makeatletter\ifdefined\yb at manuscript
\RequirePackage[tt=false,type1=true]{libertine}
\fi\makeatother
\makeatletter
\let\yb at oldsection\section
-\ifyb at draft
+\ifdefined\yb at draft
\RequirePackage[medium]{titlesec}
\else
\RequirePackage[raggedright]{titlesec}
@@ -166,34 +164,38 @@
\titlespacing{\section}{0in}{6pt}{6pt}[1in]
\renewcommand\section{\newpage\yb at oldsection}
\fi
-\ifyb at compact
+\ifdefined\yb at compact
\renewcommand\section{\vspace{2em}\yb at oldsection}
\fi
\makeatother
-\makeatletter\ifyb at 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 at 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 at draft\else
+ \ifdefined\yb at draft\else
\begin{titlepage}
\ttfamily
\vspace*{\fill}
@@ -239,8 +241,8 @@
}\makeatother
\makeatletter\newcommand\ybPrintTOC{
- \ifyb at draft\else
- \ifyb at compact\else\cleardoublepage\fi
+ \ifdefined\yb at draft\else
+ \ifdefined\yb at 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 at draft\else
+ \ifdefined\yb at draft\else
\cleardoublepage
{
\setstretch{1.0}
@@ -295,7 +297,7 @@
``#1''\\\raggedleft---#2 #3%
\fi%
}
- \ifyb at draft%
+ \ifdefined\yb at draft%
\begin{wrapfigure}{r}{0.4\textwidth}%
\begin{mdframed}[style=quoteodd]%
\yb at body%
@@ -328,7 +330,7 @@
\makeatletter\newcommand\ybPrintBibliography{%
\AtNextBibliography{\small}%
\raggedright%
- \ifyb at manuscript%
+ \ifdefined\yb at manuscript%
\setlength\bibitemsep{0pt}%
\newpage%
\begin{multicols}{2}
More information about the tex-live-commits
mailing list.