texlive[65150] Master/texmf-dist: kdpcover (30nov22)

commits+karl at tug.org commits+karl at tug.org
Wed Nov 30 21:30:37 CET 2022


Revision: 65150
          http://tug.org/svn/texlive?view=revision&revision=65150
Author:   karl
Date:     2022-11-30 21:30:37 +0100 (Wed, 30 Nov 2022)
Log Message:
-----------
kdpcover (30nov22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt
    trunk/Master/texmf-dist/doc/latex/kdpcover/README.md
    trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf
    trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx
    trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.ins
    trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/kdpcover/yb-book-logo.pdf

Modified: trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt	2022-11-30 20:30:02 UTC (rev 65149)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt	2022-11-30 20:30:37 UTC (rev 65150)
@@ -6,4 +6,5 @@
 hard xcolor
 hard setspace
 hard geometry
-hard textpos
\ No newline at end of file
+hard textpos
+hard etoolbox
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/kdpcover/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/README.md	2022-11-30 20:30:02 UTC (rev 65149)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/README.md	2022-11-30 20:30:37 UTC (rev 65150)
@@ -26,9 +26,6 @@
 \end{document}
 ```
 
-The full example and all commands are available in the 
-[`kdpcover.tex`](https://github.com/yegor256/kdpcover/blob/master/kdpcover.tex) file.
-
 If you want to contribute yourself, make a fork, then create a branch, 
 then run `make` in the root directory.
 It should compile everything without errors. If not, submit an issue and wait.

Modified: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/kdpcover/yb-book-logo.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/kdpcover/yb-book-logo.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/yb-book-logo.pdf	2022-11-30 20:30:02 UTC (rev 65149)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/yb-book-logo.pdf	2022-11-30 20:30:37 UTC (rev 65150)

Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/yb-book-logo.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx	2022-11-30 20:30:02 UTC (rev 65149)
+++ trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx	2022-11-30 20:30:37 UTC (rev 65150)
@@ -50,13 +50,16 @@
 %<class>\NeedsTeXFormat{LaTeX2e}
 %<class>\ProvidesClass{kdpcover}
 %<*class>
-[02.10.2022 0.4.0 Cover for Kindle Direct Publishing books]
+[2022.11.30 0.5.1 Cover for Kindle Direct Publishing books]
 %</class>
 %<*driver>
 \documentclass{ltxdoc}
 \usepackage[tt=false, type1=true]{libertine}
+\usepackage{microtype}
+\AddToHook{env/verbatim/begin}{\microtypesetup{protrusion=false}}
 \usepackage{href-ul}
-\raggedbottom
+\usepackage[dtx,margin=0,small]{docshots}
+\usepackage{graphicx}
 \PageIndex
 \EnableCrossrefs
 \CodelineIndex
@@ -69,7 +72,7 @@
 %</driver>
 % \fi
 
-% \title{|kdpcover|: \LaTeX{} Package \\ for Amazon Book Covers\thanks{The sources are in GitHub at \href{https://github.com/yegor256/kdpcover}{yegor256/kdpcover}}}
+% \title{\includegraphics[width=0.75in]{yb-book-logo.pdf} \\ |kdpcover|: \LaTeX{} Package \\ for Amazon Book Covers\thanks{The sources are in GitHub at \href{https://github.com/yegor256/kdpcover}{yegor256/kdpcover}}}
 % \author{Yegor Bugayenko \\ \texttt{yegor256 at gmail.com}}
 % \date{\filedate, \fileversion}
 %
@@ -78,29 +81,26 @@
 % \section{Introduction}
 %
 
+% \changes{v0.5.0}{2022/11/29}{The \texttt{docshots} package is used to render the documentation.}
 % This class will render you a book cover, suitable for Kindle Direct Publishing (KDP).
 % I use it for \href{https://amzn.to/2WMTXWF}{all my books}.
 % This is how you make your \LaTeX{} document look like:
-%\iffalse
-%<*verb>
-%\fi
-\begin{verbatim}
-\documentclass[pages=200,6x9]{kdpcover}
-\begin{document}
-\putSpine{kdpcover, a LaTeX class for KDP books}
-\putVolume{1}
-\putVersion{0.4.0}
-\putPrice{\$0.00}
-\putCopyright{\the\year}{Yegor Bugayenko}
-\putTitle{kdpcover}
-\putAuthor{Yegor Bugayenko}
-\putTLDR{This book will tell you an interesting story!}
-\putPicture{cactus.pdf}
-\end{document}
-\end{verbatim}
-%\iffalse
-%</verb>
-%\fi
+% \docshotPrerequisite{cactus.pdf}
+% \begin{docshot}
+% \documentclass[pages=200,6x9]{kdpcover}
+% \begin{document}
+% \putSpine{kdpcover, a LaTeX class for KDP books}
+% \putVolume{1}
+% \putVersion{0.5.1}
+% \putPrice{\$0.00}
+% \putCopyright{\the\year}{Yegor Bugayenko}
+% \putTitle{kdpcover}
+% \putAuthor{Yegor Bugayenko}
+% \putTLDR{This book will tell you
+%   an interesting story!}
+% \putPicture{cactus.pdf}
+% \end{document}
+% \end{docshot}
 
 % The problem this class solves is the necessity to change the size of the
 % cover PDF according to the number of pages in the book --- the bigger the book,
@@ -143,7 +143,7 @@
 %\fi
 % \end{macro}
 
-% \begin{macro}{9x6}
+% \begin{macro}{6x9}
 % With this option you can set the size of the page to 6x9 inches.
 % You can also set your own size like this:
 %\iffalse
@@ -208,7 +208,7 @@
 % name of the author.
 % \end{macro}
 
-% \begin{macro}{\putCopyright}
+% \begin{macro}{\putTitle}
 % This one prints the title of the book
 % \end{macro}
 
@@ -221,7 +221,7 @@
 % of the entire book.
 % \end{macro}
 
-% \begin{macro}{\putTLDR}
+% \begin{macro}{\putPicture}
 % This one prints the front picture. You can use |cactus.pdf|.
 % \end{macro}
 
@@ -236,8 +236,14 @@
 
 % \changes{v0.2.0}{2021/07/14}{Initial version}
 
-% First, we define a few internal commands:
+% First, we load our parent class:
+% \changes{v0.5.0}{2022/11/29}{The base class is now \texttt{article}.}
 %    \begin{macrocode}
+\LoadClass{article}
+%    \end{macrocode}
+
+% Then, we define a few internal commands:
+%    \begin{macrocode}
 \makeatletter
 \newcommand*\kdp at pages{100}
 \newlength\kdp at xsize
@@ -436,8 +442,9 @@
 \newcommand\putVersion[1]{%
   \begin{textblock}{4}[0,1](10,14)%
     #1
-    \quad
-    \iexec{git log -n 1 --pretty='format:\%ad' --date='format:\%e-\%b-\%Y'}
+    \IfFileExists{.git}
+      {\quad\iexec{git log -n 1 --pretty='format:\%ad' --date='format:\%e-\%b-\%Y'}}
+      {}
   \end{textblock}%
 }
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.ins	2022-11-30 20:30:02 UTC (rev 65149)
+++ trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.ins	2022-11-30 20:30:37 UTC (rev 65150)
@@ -48,8 +48,8 @@
 \endpreamble
 \generate{\file{kdpcover.cls}{\from{kdpcover.dtx}{class}}}
 \obeyspaces
-\Msg{*** To finish the installation you have to move the ".cls"}
-\Msg{*** file into a directory searched by TeX. To produce the}
-\Msg{*** documentation run the file ".dtx" through LaTeX. If any}
-\Msg{*** questions, submit a new GitHub issue.}
+\Msg{To finish the installation you have to move the ".cls"}
+\Msg{file into a directory searched by TeX. To produce the}
+\Msg{documentation run the file ".dtx" through LaTeX. If any}
+\Msg{questions, submit a new GitHub issue.}
 \endbatchfile

Modified: trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls	2022-11-30 20:30:02 UTC (rev 65149)
+++ trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls	2022-11-30 20:30:37 UTC (rev 65150)
@@ -31,7 +31,7 @@
 
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{kdpcover}
-[02.10.2022 0.4.0 Cover for Kindle Direct Publishing books]
+[2022.11.30 0.5.1 Cover for Kindle Direct Publishing books]
 
 
 
@@ -55,6 +55,8 @@
 
 
 
+\LoadClass{article}
+
 \makeatletter
 \newcommand*\kdp at pages{100}
 \newlength\kdp at xsize
@@ -184,8 +186,9 @@
 \newcommand\putVersion[1]{%
   \begin{textblock}{4}[0,1](10,14)%
     #1
-    \quad
-    \iexec{git log -n 1 --pretty='format:\%ad' --date='format:\%e-\%b-\%Y'}
+    \IfFileExists{.git}
+      {\quad\iexec{git log -n 1 --pretty='format:\%ad' --date='format:\%e-\%b-\%Y'}}
+      {}
   \end{textblock}%
 }
 



More information about the tex-live-commits mailing list.