diff options
author | Karl Berry <karl@freefriends.org> | 2025-01-02 20:35:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2025-01-02 20:35:05 +0000 |
commit | bce762595014123a061f2a906dc7d4eefef7f3cd (patch) | |
tree | e9d9b10b3cf8e34c62b0c930c908d3f45c795a36 /Master/texmf-dist | |
parent | d82eae6e6025375ba0a2842e9292740e49fb56ad (diff) |
yb-book (2jan25)
git-svn-id: svn://tug.org/texlive/trunk@73277 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/yb-book/LICENSE.txt | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/yb-book/yb-book.pdf | bin | 285789 -> 287468 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/yb-book/yb-book.dtx | 119 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/yb-book/yb-book.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/yb-book/yb-book.cls | 96 |
6 files changed, 151 insertions, 77 deletions
diff --git a/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt b/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt index cdd7bf4c2b3..3d880587be3 100644 --- a/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt +++ b/Master/texmf-dist/doc/latex/yb-book/DEPENDS.txt @@ -3,21 +3,25 @@ hard biblatex hard bigfoot hard changepage hard chngcntr +hard collection-fontsextra +hard collection-fontsrecommended hard csquotes +hard cyrillic hard enumitem hard fancyhdr hard float hard footmisc hard geometry +hard hypdoc hard ifmtarg hard imakeidx hard lastpage +hard lh hard libertine hard mdframed hard microtype hard needspace hard paralist -hard hypdoc hard pgf hard pgfopts hard qrcode @@ -39,4 +43,5 @@ soft imakeidx soft l3build soft pgfopts soft scheme-basic +soft silence soft xetex diff --git a/Master/texmf-dist/doc/latex/yb-book/LICENSE.txt b/Master/texmf-dist/doc/latex/yb-book/LICENSE.txt index 1f211e02878..a2ebd120aff 100644 --- a/Master/texmf-dist/doc/latex/yb-book/LICENSE.txt +++ b/Master/texmf-dist/doc/latex/yb-book/LICENSE.txt @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2021-2024 Yegor Bugayenko +Copyright (c) 2021-2025 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 diff --git a/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf b/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf Binary files differindex 0a319992b5b..25061decfd5 100644 --- a/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf +++ b/Master/texmf-dist/doc/latex/yb-book/yb-book.pdf 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 1c69ae61bbc..1c58f476734 100644 --- a/Master/texmf-dist/source/latex/yb-book/yb-book.dtx +++ b/Master/texmf-dist/source/latex/yb-book/yb-book.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment % (The MIT License) % -% Copyright (c) 2021-2024 Yegor Bugayenko +% Copyright (c) 2021-2025 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> -[23.03.2024 0.4.1 YB Branded Book Style] +[2025/01/02 0.5.0 YB Branded Book Style] %</class> %<*driver> \documentclass{ltxdoc} @@ -120,6 +120,10 @@ Hello, world! % I use this option to render \href{https://www.yegor256.com/code-ahead.html}{Code Ahead} book. % \end{macro} +% \begin{macro}{sparse} +% With this package option every section will start from a new page. +% \end{macro} + % \begin{macro}{manuscript} % When the format is not for Amazon printing, % but for some other purposes (the page size is A4), this option may be @@ -248,6 +252,7 @@ Hello, world! % First, we parse package options: % \changes{v0.3.0}{2023/05/22}{The \texttt{pgfopts} package is now used to parse package options.} +% \changes{v0.5.0}{2024/01/02}{The \texttt{sparse} package option added, to place every section in a new page.} % \begin{macrocode} \RequirePackage{pgfopts} \pgfkeys{ @@ -255,6 +260,7 @@ Hello, world! authordraft/.store in=\yb@authordraft, compact/.store in=\yb@compact, manuscript/.store in=\yb@manuscript, + sparse/.store in=\yb@sparse, } \ProcessPgfPackageOptions{/yb} % \end{macrocode} @@ -262,7 +268,8 @@ Hello, world! % 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@authordraft +\makeatletter +\ifdefined\yb@authordraft \PassOptionsToClass{11pt}{book} \PassOptionsToClass{oneside}{book} \else @@ -273,7 +280,8 @@ Hello, world! \PassOptionsToClass{11pt}{book} \PassOptionsToClass{twoside}{book} \fi -\fi\makeatother +\fi +\makeatother \LoadClass{book} % \end{macrocode} @@ -281,25 +289,22 @@ Hello, world! % Then, using |geometry|, we setup page layout: % \begin{macrocode} \RequirePackage{geometry} -\geometry{paperwidth=6in, paperheight=9in, bindingoffset=0.25in, +\geometry{ + paperwidth=6in, paperheight=9in, + bindingoffset=0.25in, left=0.75in, right=0.75in, top=0.75in, bottom=1.25in} -\makeatletter\ifdefined\yb@authordraft +\makeatletter +\ifdefined\yb@authordraft \geometry{a4paper, margin=1in, left=1.5in} \else \ifdefined\yb@manuscript \geometry{a4paper, margin=1.2in} \fi -\fi\makeatother +\fi +\makeatother % \end{macrocode} % \end{macro} -% Then, we configure input encoding for UTF-8: -% \begin{macrocode} -\RequirePackage[T1]{fontenc} -\RequirePackage[utf8]{inputenc} -\RequirePackage{lmodern} -% \end{macrocode} - % Then, we load \href{https://ctan.org/pkg/anyfontsize}{anyfontsize} to enable all sizes of fonts: % \begin{macrocode} \RequirePackage{anyfontsize} @@ -345,13 +350,30 @@ Hello, world! \setlist{nosep} % \end{macrocode} -% Then, we load more packages: +% Then, we load \href{https://ctan.org/pkg/float}{float} for floating figures: % \begin{macrocode} \RequirePackage{float} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/ulem}{ulem} for inline lists: +% \begin{macrocode} \RequirePackage[normalem]{ulem} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/xfp}{xfp} and +% \href{https://ctan.org/pkg/xifthen}{xifthen} for if-then-else: +% \begin{macrocode} \RequirePackage{xfp} -\RequirePackage{soul} \RequirePackage{xifthen} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/soul}{soul} for highlighting: +% \begin{macrocode} +\RequirePackage{soul} +% \end{macrocode} + +% Then, we load \href{https://ctan.org/pkg/csquotes}{csquotes} for better rendering: +% \begin{macrocode} \RequirePackage[autostyle=try]{csquotes} % \end{macrocode} @@ -368,9 +390,11 @@ Hello, world! % \begin{macrocode} \RequirePackage{setspace} \setstretch{1.2} - \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 + \makeatletter + \ifdefined\yb@authordraft\setstretch{1.1}\fi + \ifdefined\yb@compact\setstretch{1.0}\fi + \ifdefined\yb@manuscript\setstretch{1.1}\fi + \makeatother % \end{macrocode} % \end{macro} @@ -416,18 +440,22 @@ Hello, world! % \begin{macro}{microtype} % Then, we include |microtype| for better rendering: % \begin{macrocode} -\makeatletter\ifdefined\yb@authordraft\else +\makeatletter +\ifdefined\yb@authordraft\else \RequirePackage[letterspace=-50]{microtype} -\fi\makeatother +\fi +\makeatother % \end{macrocode} % \end{macro} % \begin{macro}{libertine} % Then, we include |libertine|, for a good looking font: % \begin{macrocode} -\makeatletter\ifdefined\yb@manuscript +\makeatletter +\ifdefined\yb@manuscript \RequirePackage[tt=false,type1=true]{libertine} -\fi\makeatother +\fi +\makeatother % \end{macrocode} % \end{macro} @@ -436,15 +464,16 @@ Hello, world! % \begin{macrocode} \makeatletter \let\yb@oldsection\section +\def\yb@secstart{\ifdefined\yb@sparse\newpage\fi} \ifdefined\yb@authordraft \RequirePackage[medium]{titlesec} \else \RequirePackage[raggedright]{titlesec} \titlespacing{\section}{0in}{6pt}{6pt}[1in] - \renewcommand\section{\newpage\yb@oldsection} + \renewcommand\section{\yb@secstart\newpage\yb@oldsection} \fi \ifdefined\yb@compact - \renewcommand\section{\vspace{2em}\yb@oldsection} + \renewcommand\section{\yb@secstart\vspace{2em}\yb@oldsection} \fi \makeatother % \end{macrocode} @@ -452,7 +481,8 @@ Hello, world! % Then, if it's a |authordraft|, we put a watermark comment: % \begin{macrocode} -\makeatletter\ifdefined\yb@authordraft +\makeatletter +\ifdefined\yb@authordraft \RequirePackage[absolute]{textpos} \TPGrid{16}{16} \RequirePackage{fancyhdr} @@ -479,7 +509,8 @@ Hello, world! } \fancyfoot[C,CO,CE]{\small\ttfamily page \#\thepage{} of \pageref{LastPage}} -\fi\makeatother +\fi +\makeatother % \end{macrocode} % \begin{macro}{\maketitle} @@ -507,13 +538,14 @@ Hello, world! % \begin{macro}{\ybPrintTitlePage} % Then, we define |\ybPrintTitlePage| command: % \begin{macrocode} -\makeatletter\newcommand\ybPrintTitlePage{ +\makeatletter +\newcommand\ybPrintTitlePage{ \ifdefined\yb@authordraft\else \begin{titlepage} \ttfamily \vspace*{\fill} \noindent - {\Huge\textbf{\thetitle}} + {\Huge\thetitle} \\[1em] by \theauthor{} \\[4em] @@ -530,19 +562,22 @@ Hello, world! \vspace*{\fill} \end{titlepage} \fi -}\makeatother +} +\makeatother % \end{macrocode} % \end{macro} % \begin{macro}{\ybPrintTOC} % Then, we define |ybPrintTOC| command to print table of contents: % \begin{macrocode} -\makeatletter\newcommand\ybPrintTOC{ +\makeatletter +\newcommand\ybPrintTOC{ \ifdefined\yb@authordraft\else \ifdefined\yb@compact\else\cleardoublepage\fi {\setstretch{0.7}\tableofcontents} \fi -}\makeatother +} +\makeatother % \end{macrocode} % \end{macro} @@ -553,7 +588,8 @@ Hello, world! \renewbibmacro*{citeindex}{\indexnames{labelname}{}} \makeindex \indexsetup{othercode={\hyphenpenalty=10000}} -\makeatletter\newcommand\ybPrintIndex[1][Index]{ +\makeatletter +\newcommand\ybPrintIndex[1][Index]{ \ifdefined\yb@authordraft\else \cleardoublepage { @@ -563,7 +599,8 @@ Hello, world! \printindex } \fi -}\makeatother +} +\makeatother % \end{macrocode} % \end{macro} @@ -588,7 +625,8 @@ Hello, world! skipabove=0pt,skipbelow=0pt, linewidth=2pt, topline=false,bottomline=false,leftline=false} -\makeatletter\newcommand\ybQuote[3]{% +\makeatletter +\newcommand\ybQuote[3]{% \ifthenelse{\isempty{#3}}{}{ \ifx\hfuzz#2\hfuzz% \index{#3}% @@ -621,7 +659,8 @@ Hello, world! \vspace{-12pt} \end{wrapfigure}% \fi% -}\makeatother +} +\makeatother % \end{macrocode} % \end{macro} @@ -643,7 +682,8 @@ Hello, world! % \begin{macro}{\ybPrintBibliography} % Then, we define |\ybPrintBibliography|, to print a list of references: % \begin{macrocode} -\makeatletter\newcommand\ybPrintBibliography{% +\makeatletter +\newcommand\ybPrintBibliography{% \AtNextBibliography{\small}% \raggedright% \ifdefined\yb@manuscript% @@ -655,7 +695,8 @@ Hello, world! \else \printbibliography \fi -}\makeatother +} +\makeatother % \end{macrocode} % \end{macro} @@ -679,6 +720,8 @@ Hello, world! \newcommand*\theversion{\textbackslash{}theversion} \newcommand*\theauthor{\textbackslash{}theauthor} \newcommand*\thereviewer{\textbackslash{}thereviewer} + +\endinput % \end{macrocode} % \Finale diff --git a/Master/texmf-dist/source/latex/yb-book/yb-book.ins b/Master/texmf-dist/source/latex/yb-book/yb-book.ins index 28537392a3e..d316cf1bb1c 100644 --- a/Master/texmf-dist/source/latex/yb-book/yb-book.ins +++ b/Master/texmf-dist/source/latex/yb-book/yb-book.ins @@ -1,6 +1,6 @@ %% (The MIT License) %% -%% Copyright (c) 2021-2024 Yegor Bugayenko +%% Copyright (c) 2021-2025 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 @@ -26,7 +26,7 @@ \preamble (The MIT License) -Copyright (c) 2021-2024 Yegor Bugayenko +Copyright (c) 2021-2025 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 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 392011e3994..6809591e635 100644 --- a/Master/texmf-dist/tex/latex/yb-book/yb-book.cls +++ b/Master/texmf-dist/tex/latex/yb-book/yb-book.cls @@ -7,7 +7,7 @@ %% yb-book.dtx (with options: `class') %% (The MIT License) %% -%% Copyright (c) 2021-2024 Yegor Bugayenko +%% Copyright (c) 2021-2025 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 @@ -32,7 +32,8 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesClass{yb-book} -[23.03.2024 0.4.1 YB Branded Book Style] +[2025/01/02 0.5.0 YB Branded Book Style] + @@ -59,10 +60,12 @@ authordraft/.store in=\yb@authordraft, compact/.store in=\yb@compact, manuscript/.store in=\yb@manuscript, + sparse/.store in=\yb@sparse, } \ProcessPgfPackageOptions{/yb} -\makeatletter\ifdefined\yb@authordraft +\makeatletter +\ifdefined\yb@authordraft \PassOptionsToClass{11pt}{book} \PassOptionsToClass{oneside}{book} \else @@ -73,23 +76,24 @@ \PassOptionsToClass{11pt}{book} \PassOptionsToClass{twoside}{book} \fi -\fi\makeatother +\fi +\makeatother \LoadClass{book} \RequirePackage{geometry} -\geometry{paperwidth=6in, paperheight=9in, bindingoffset=0.25in, +\geometry{ + paperwidth=6in, paperheight=9in, + bindingoffset=0.25in, left=0.75in, right=0.75in, top=0.75in, bottom=1.25in} -\makeatletter\ifdefined\yb@authordraft +\makeatletter +\ifdefined\yb@authordraft \geometry{a4paper, margin=1in, left=1.5in} \else \ifdefined\yb@manuscript \geometry{a4paper, margin=1.2in} \fi -\fi\makeatother - -\RequirePackage[T1]{fontenc} -\RequirePackage[utf8]{inputenc} -\RequirePackage{lmodern} +\fi +\makeatother \RequirePackage{anyfontsize} @@ -113,19 +117,25 @@ \setlist{nosep} \RequirePackage{float} + \RequirePackage[normalem]{ulem} + \RequirePackage{xfp} -\RequirePackage{soul} \RequirePackage{xifthen} + +\RequirePackage{soul} + \RequirePackage[autostyle=try]{csquotes} \pagestyle{plain} \RequirePackage{setspace} \setstretch{1.2} - \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 + \makeatletter + \ifdefined\yb@authordraft\setstretch{1.1}\fi + \ifdefined\yb@compact\setstretch{1.0}\fi + \ifdefined\yb@manuscript\setstretch{1.1}\fi + \makeatother \RequirePackage[indexing=cite,style=authoryear, natbib=true,maxnames=1,minnames=1,doi=false, @@ -155,29 +165,35 @@ {\begingroup\setstretch{1.0}\lsstyle} {\endgroup} -\makeatletter\ifdefined\yb@authordraft\else +\makeatletter +\ifdefined\yb@authordraft\else \RequirePackage[letterspace=-50]{microtype} -\fi\makeatother +\fi +\makeatother -\makeatletter\ifdefined\yb@manuscript +\makeatletter +\ifdefined\yb@manuscript \RequirePackage[tt=false,type1=true]{libertine} -\fi\makeatother +\fi +\makeatother \makeatletter \let\yb@oldsection\section +\def\yb@secstart{\ifdefined\yb@sparse\newpage\fi} \ifdefined\yb@authordraft \RequirePackage[medium]{titlesec} \else \RequirePackage[raggedright]{titlesec} \titlespacing{\section}{0in}{6pt}{6pt}[1in] - \renewcommand\section{\newpage\yb@oldsection} + \renewcommand\section{\yb@secstart\newpage\yb@oldsection} \fi \ifdefined\yb@compact - \renewcommand\section{\vspace{2em}\yb@oldsection} + \renewcommand\section{\yb@secstart\vspace{2em}\yb@oldsection} \fi \makeatother -\makeatletter\ifdefined\yb@authordraft +\makeatletter +\ifdefined\yb@authordraft \RequirePackage[absolute]{textpos} \TPGrid{16}{16} \RequirePackage{fancyhdr} @@ -204,7 +220,8 @@ } \fancyfoot[C,CO,CE]{\small\ttfamily page \#\thepage{} of \pageref{LastPage}} -\fi\makeatother +\fi +\makeatother \renewcommand\maketitle{ {\LARGE\textbf{\thetitle}} @@ -223,13 +240,14 @@ \fi } -\makeatletter\newcommand\ybPrintTitlePage{ +\makeatletter +\newcommand\ybPrintTitlePage{ \ifdefined\yb@authordraft\else \begin{titlepage} \ttfamily \vspace*{\fill} \noindent - {\Huge\textbf{\thetitle}} + {\Huge\thetitle} \\[1em] by \theauthor{} \\[4em] @@ -246,20 +264,24 @@ \vspace*{\fill} \end{titlepage} \fi -}\makeatother +} +\makeatother -\makeatletter\newcommand\ybPrintTOC{ +\makeatletter +\newcommand\ybPrintTOC{ \ifdefined\yb@authordraft\else \ifdefined\yb@compact\else\cleardoublepage\fi {\setstretch{0.7}\tableofcontents} \fi -}\makeatother +} +\makeatother \RequirePackage{imakeidx} \renewbibmacro*{citeindex}{\indexnames{labelname}{}} \makeindex \indexsetup{othercode={\hyphenpenalty=10000}} -\makeatletter\newcommand\ybPrintIndex[1][Index]{ +\makeatletter +\newcommand\ybPrintIndex[1][Index]{ \ifdefined\yb@authordraft\else \cleardoublepage { @@ -269,7 +291,8 @@ \printindex } \fi -}\makeatother +} +\makeatother \RequirePackage{wrapfig} \RequirePackage{mdframed} @@ -289,7 +312,8 @@ skipabove=0pt,skipbelow=0pt, linewidth=2pt, topline=false,bottomline=false,leftline=false} -\makeatletter\newcommand\ybQuote[3]{% +\makeatletter +\newcommand\ybQuote[3]{% \ifthenelse{\isempty{#3}}{}{ \ifx\hfuzz#2\hfuzz% \index{#3}% @@ -322,7 +346,8 @@ \vspace{-12pt} \end{wrapfigure}% \fi% -}\makeatother +} +\makeatother \RequirePackage{perpage} \RequirePackage[bottom,perpage,multiple]{footmisc} @@ -335,7 +360,8 @@ \yb@oldfootnote{#1}\futurelet\yb@nexttoken\yb@isfootnote} \makeatother -\makeatletter\newcommand\ybPrintBibliography{% +\makeatletter +\newcommand\ybPrintBibliography{% \AtNextBibliography{\small}% \raggedright% \ifdefined\yb@manuscript% @@ -347,7 +373,8 @@ \else \printbibliography \fi -}\makeatother +} +\makeatother \AtBeginDocument{% \raggedbottom% @@ -365,7 +392,6 @@ \newcommand*\theauthor{\textbackslash{}theauthor} \newcommand*\thereviewer{\textbackslash{}thereviewer} - \endinput %% %% End of file `yb-book.cls'. |