diff options
author | Norbert Preining <norbert@preining.info> | 2024-03-24 03:02:18 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2024-03-24 03:02:18 +0000 |
commit | 1feacf4295bab2d8f05aa0f5fbd1d902559bef36 (patch) | |
tree | dee2146112239740c03f05e185c464cec8dd68fa /macros/latex/contrib/yb-book/yb-book.dtx | |
parent | f3da2d2d43f8edbd18674b2ca6fa6b1a2012f7d0 (diff) |
CTAN sync 202403240302
Diffstat (limited to 'macros/latex/contrib/yb-book/yb-book.dtx')
-rw-r--r-- | macros/latex/contrib/yb-book/yb-book.dtx | 69 |
1 files changed, 51 insertions, 18 deletions
diff --git a/macros/latex/contrib/yb-book/yb-book.dtx b/macros/latex/contrib/yb-book/yb-book.dtx index 105aec54c1..1c69ae61bb 100644 --- a/macros/latex/contrib/yb-book/yb-book.dtx +++ b/macros/latex/contrib/yb-book/yb-book.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % (The MIT License) % -% Copyright (c) 2021-2023 Yegor Bugayenko +% Copyright (c) 2021-2024 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 @@ -50,7 +50,7 @@ %<class>\NeedsTeXFormat{LaTeX2e} %<class>\ProvidesClass{yb-book} %<*class> -[22.05.20230 0.3.0 YB Branded Book Style] +[23.03.2024 0.4.1 YB Branded Book Style] %</class> %<*driver> \documentclass{ltxdoc} @@ -127,7 +127,8 @@ Hello, world! % printing on paper for review purposes. % \end{macro} -% \begin{macro}{draft} +% \begin{macro}{authordraft} +% \changes{v0.4.0}{2024/03/23}{The package option \texttt{draft} renamed to \texttt{draft}} % When it's a draft for reviewers (the page size is A4) % and you want to have a watermark and a compact form of the content. This % option goes together with |\thereviewer{}| command, which you may redefine, @@ -137,7 +138,7 @@ Hello, world! %<*verb> %\fi \begin{verbatim} -\documentclass[draft]{yb-book} +\documentclass[authordraft]{yb-book} \renewcommand*\thereviewer{Walter Sobchak} \begin{document} Hello, world! @@ -251,17 +252,17 @@ Hello, world! \RequirePackage{pgfopts} \pgfkeys{ /yb/.cd, - draft/.store in=\yb@draft, + authordraft/.store in=\yb@authordraft, 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 +% Then, depending on the options like |authordraft| and |manuscript|, we preset % options of the class |book| and then load it: % \begin{macrocode} -\makeatletter\ifdefined\yb@draft +\makeatletter\ifdefined\yb@authordraft \PassOptionsToClass{11pt}{book} \PassOptionsToClass{oneside}{book} \else @@ -282,7 +283,7 @@ 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\ifdefined\yb@draft +\makeatletter\ifdefined\yb@authordraft \geometry{a4paper, margin=1in, left=1.5in} \else \ifdefined\yb@manuscript @@ -299,21 +300,53 @@ Hello, world! \RequirePackage{lmodern} % \end{macrocode} -% Then, we load many important packages: +% Then, we load \href{https://ctan.org/pkg/anyfontsize}{anyfontsize} to enable all sizes of fonts: % \begin{macrocode} \RequirePackage{anyfontsize} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/tikz}{tikz} for graphics: +% \begin{macrocode} \RequirePackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{shapes} \usetikzlibrary{fit} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/chngcntr}{chngcntr} for something else: +% \begin{macrocode} \RequirePackage{chngcntr} \counterwithout{footnote}{chapter} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/lastpage}{lastpage} to enable rendering of the last page number: +% \begin{macrocode} \RequirePackage{lastpage} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/paralist}{paralist} for inline enumeration: +% \begin{macrocode} \RequirePackage{paralist} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/xcolor}{xcolor} for colors: +% \begin{macrocode} \RequirePackage{xcolor} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/graphicx}{graphicx} to enable graphic files inclusion: +% \begin{macrocode} \RequirePackage{graphicx} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/enumitem}{enumitem} for inline enumeration: +% \begin{macrocode} \RequirePackage[inline]{enumitem} \setlist{nosep} +% \end{macrocode} + +% Then, we load more packages: +% \begin{macrocode} \RequirePackage{float} \RequirePackage[normalem]{ulem} \RequirePackage{xfp} @@ -335,7 +368,7 @@ Hello, world! % \begin{macrocode} \RequirePackage{setspace} \setstretch{1.2} - \makeatletter\ifdefined\yb@draft\setstretch{1.1}\fi\makeatother + \makeatletter\ifdefined\yb@authordraft\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} @@ -383,7 +416,7 @@ Hello, world! % \begin{macro}{microtype} % Then, we include |microtype| for better rendering: % \begin{macrocode} -\makeatletter\ifdefined\yb@draft\else +\makeatletter\ifdefined\yb@authordraft\else \RequirePackage[letterspace=-50]{microtype} \fi\makeatother % \end{macrocode} @@ -403,7 +436,7 @@ Hello, world! % \begin{macrocode} \makeatletter \let\yb@oldsection\section -\ifdefined\yb@draft +\ifdefined\yb@authordraft \RequirePackage[medium]{titlesec} \else \RequirePackage[raggedright]{titlesec} @@ -417,9 +450,9 @@ Hello, world! % \end{macrocode} % \end{macro} -% Then, if it's a |draft|, we put a watermark comment: +% Then, if it's a |authordraft|, we put a watermark comment: % \begin{macrocode} -\makeatletter\ifdefined\yb@draft +\makeatletter\ifdefined\yb@authordraft \RequirePackage[absolute]{textpos} \TPGrid{16}{16} \RequirePackage{fancyhdr} @@ -475,7 +508,7 @@ Hello, world! % Then, we define |\ybPrintTitlePage| command: % \begin{macrocode} \makeatletter\newcommand\ybPrintTitlePage{ - \ifdefined\yb@draft\else + \ifdefined\yb@authordraft\else \begin{titlepage} \ttfamily \vspace*{\fill} @@ -505,7 +538,7 @@ Hello, world! % Then, we define |ybPrintTOC| command to print table of contents: % \begin{macrocode} \makeatletter\newcommand\ybPrintTOC{ - \ifdefined\yb@draft\else + \ifdefined\yb@authordraft\else \ifdefined\yb@compact\else\cleardoublepage\fi {\setstretch{0.7}\tableofcontents} \fi @@ -521,7 +554,7 @@ Hello, world! \makeindex \indexsetup{othercode={\hyphenpenalty=10000}} \makeatletter\newcommand\ybPrintIndex[1][Index]{ - \ifdefined\yb@draft\else + \ifdefined\yb@authordraft\else \cleardoublepage { \setstretch{1.0} @@ -571,7 +604,7 @@ Hello, world! ``#1''\\\raggedleft---#2 #3% \fi% } - \ifdefined\yb@draft% + \ifdefined\yb@authordraft% \begin{wrapfigure}{r}{0.4\textwidth}% \begin{mdframed}[style=quoteodd]% \yb@body% |