texlive[64582] Master/texmf-dist: kdpcover (2oct22)

commits+karl at tug.org commits+karl at tug.org
Sun Oct 2 22:18:52 CEST 2022


Revision: 64582
          http://tug.org/svn/texlive?view=revision&revision=64582
Author:   karl
Date:     2022-10-02 22:18:52 +0200 (Sun, 02 Oct 2022)
Log Message:
-----------
kdpcover (2oct22)

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/tex/latex/kdpcover/kdpcover.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/kdpcover/LICENSE.txt
    trunk/Master/texmf-dist/doc/latex/kdpcover/cactus.pdf
    trunk/Master/texmf-dist/source/latex/kdpcover/
    trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx
    trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.ins

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex

Modified: trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt	2022-10-02 20:18:20 UTC (rev 64581)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt	2022-10-02 20:18:52 UTC (rev 64582)
@@ -1,11 +1,9 @@
 hard iexec
 hard xkeyval
 hard anyfontsize
-hard tikz
+hard pgf
 hard microtype
 hard xcolor
-hard graphicx
-hard calc
 hard setspace
 hard geometry
-hard textpos
+hard textpos
\ No newline at end of file

Added: trunk/Master/texmf-dist/doc/latex/kdpcover/LICENSE.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/LICENSE.txt	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/LICENSE.txt	2022-10-02 20:18:52 UTC (rev 64582)
@@ -0,0 +1,21 @@
+(The MIT License)
+
+Copyright (c) 2021-2022 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
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.


Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/LICENSE.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/kdpcover/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/README.md	2022-10-02 20:18:20 UTC (rev 64581)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/README.md	2022-10-02 20:18:52 UTC (rev 64582)
@@ -1,4 +1,5 @@
-[![make](https://github.com/yegor256/kdpcover/actions/workflows/latexmk.yml/badge.svg)](https://github.com/yegor256/kdpcover/actions/workflows/latexmk.yml)
+[![make](https://github.com/yegor256/kdpcover/actions/workflows/l3build.yml/badge.svg)](https://github.com/yegor256/kdpcover/actions/workflows/l3build.yml)
+[![CTAN](https://img.shields.io/ctan/v/kdpcover)](https://ctan.org/pkg/kdpcover)
 [![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/kdpcover/blob/master/LICENSE.txt)
 
 This LaTeX class I use to format covers for [my books](https://www.yegor256.com/books.html), 

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

Index: trunk/Master/texmf-dist/doc/latex/kdpcover/cactus.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/cactus.pdf	2022-10-02 20:18:20 UTC (rev 64581)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/cactus.pdf	2022-10-02 20:18:52 UTC (rev 64582)

Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/cactus.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex	2022-10-02 20:18:20 UTC (rev 64581)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex	2022-10-02 20:18:52 UTC (rev 64582)
@@ -1,93 +0,0 @@
-% (The MIT License)
-%
-% Copyright (c) 2021-2022 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
-% in the Software without restriction, including without limitation the rights
-% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-% copies of the Software, and to permit persons to whom the Software is
-% furnished to do so, subject to the following conditions:
-%
-% The above copyright notice and this permission notice shall be included in all
-% copies or substantial portions of the Software.
-%
-% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-% SOFTWARE.
-
-% Here we set the total count of the pages in the book and set the size
-% of the page to 6x9 inches. You can set your own size like this:
-%   \setlength\kdpxsize{8.1in}
-%   \setlength\kdpysize{12.7in}
-% It's better not to use "pages" option here, but to let it calculate
-% the size of your book from the PDF file. Just say "pdf=book.pdf" and it
-% will be calculated automatically.
-%
-% To get rid of the black bar at the center of the page, just add
-% "barless" option here.
-\documentclass[pages=200,6x9]{kdpcover}
-
-\begin{document}
-% Here we put the vertical black spine line with two white elements
-% inside: the text at the top and the logo at the bottom. Make sure
-% the text is short enough so that it doesn't touch the logo. It's
-% a good practice to mention the volume number at the end of the text,
-% if you have more than one volume, e.g. "my book, vol. 1". I suggest
-% using small caps in the text only.
-\putSpine{kdpcover, a LaTeX class for KDP books}
-
-% This one prints the volume picture. It is intentionally made large,
-% in order to make it obvious.
-\putVolume{1}
-
-% Here we print the version and it will also add the date of the latest
-% Git commit in the current directory. If it's not a Git repository,
-% the date won't be printed.
-\putVersion{0.3.0}
-
-% This prints the price, which is a good practice to mention, I believe.
-\putPrice{\$0.00}
-
-% This one prints the copyright short message with the year and the
-% name of the autor.
-\putCopyright{\the\year}{Yegor Bugayenko}
-
-% Here we print the title of the book
-\putTitle{kdpcover}
-
-% Here we print the author.
-\putAuthor{Yegor Bugayenko}
-
-% Here we print the TL;DR paragraph, which summarizies the message
-% of the entire book.
-\putTLDR{I use this LaTeX class to design covers for my books published
-by Kindle Direct Publishing; you also can do it, provided you like the layout and the style.}
-
-% The picture.
-\putPicture{cactus.pdf}
-
-% This is the text on the back of the book, which usually I suggest
-% to omit and keep the back empty and white.
-\putBack{
-    You need to either specify the number of pages
-    in your PDF book, or provide the path to the PDF.
-    In the latter case, the pages will be counted using
-    "qpdf," which has to be installed:
-    \newline\newline
-    \char`\\documentclass[pages=200,pdf=book.pdf]\string{kdpcover\string}\newline
-    \char`\\begin\string{document\string}\newline
-    \char`\\putSpine\string{my book\string}\newline
-    \char`\\end\string{document\string}
-    \newline\newline
-    See the file "kdpcover.tex" for a full example with all
-    available commands and class options.
-    \newline\newline
-    Even more details you can find on GitHub:\newline
-    https://github.com/yegor256/kdpcover
-}
-\end{document}
\ No newline at end of file

Added: trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx	2022-10-02 20:18:52 UTC (rev 64582)
@@ -0,0 +1,475 @@
+% \iffalse meta-comment
+% (The MIT License)
+%
+% Copyright (c) 2021-2022 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
+% in the Software without restriction, including without limitation the rights
+% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+% copies of the Software, and to permit persons to whom the Software is
+% furnished to do so, subject to the following conditions:
+%
+% The above copyright notice and this permission notice shall be included in all
+% copies or substantial portions of the Software.
+%
+% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+% SOFTWARE.
+% \fi
+
+% \CheckSum{0}
+%
+% \CharacterTable
+%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%   Digits        \0\1\2\3\4\5\6\7\8\9
+%   Exclamation   \!     Double quote  \"     Hash (number) \#
+%   Dollar        \$     Percent       \%     Ampersand     \&
+%   Acute accent  \'     Left paren    \(     Right paren   \)
+%   Asterisk      \*     Plus          \+     Comma         \,
+%   Minus         \-     Point         \.     Solidus       \/
+%   Colon         \:     Semicolon     \;     Less than     \<
+%   Equals        \=     Greater than  \>     Question mark \?
+%   Commercial at \@     Left bracket  \[     Backslash     \\
+%   Right bracket \]     Circumflex    \^     Underscore    \_
+%   Grave accent  \`     Left brace    \{     Vertical bar  \|
+%   Right brace   \}     Tilde         \~}
+
+% \GetFileInfo{kdpcover.dtx}
+% \DoNotIndex{\endgroup,\begingroup,\let,\else,\fi,\newcommand,\newenvironment}
+
+% \iffalse
+%<*driver>
+\ProvidesFile{kdpcover.dtx}
+%</driver>
+%<class>\NeedsTeXFormat{LaTeX2e}
+%<class>\ProvidesClass{kdpcover}
+%<*class>
+[02.10.2022 0.4.0 Cover for Kindle Direct Publishing books]
+%</class>
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage[tt=false, type1=true]{libertine}
+\usepackage{href-ul}
+\raggedbottom
+\PageIndex
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+	\DocInput{kdpcover.dtx}
+	\PrintChanges
+	\PrintIndex
+\end{document}
+%</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}}}
+% \author{Yegor Bugayenko \\ \texttt{yegor256 at gmail.com}}
+% \date{\filedate, \fileversion}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+
+% 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
+
+% 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,
+% the larger the spine of the book must be. The provided class makes
+% the necessary calculations on-the-fly, using the |qpdf| tool. Obviously,
+% you need to have it installed. Also, you must run pdflatex with
+% the |--shell-escape| option, in order to allow \LaTeX{} to run |qpdf|.
+
+% \section{Class Options}
+
+% \begin{macro}{pages}
+% With |pages| you can set the total count of the pages in the book:
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\documentclass[pages=120]{kdpcover}
+\begin{document}
+\end{document}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+% \end{macro}
+
+% \begin{macro}{pdf}
+% It's better not to use |pages| option, but let the class calculate
+% the size of your book from the PDF file (using |qpdf| command line
+% tool, which has to be installed):
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\documentclass[pdf=book.pdf]{kdpcover}
+\begin{document}
+\end{document}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+% \end{macro}
+
+% \begin{macro}{9x6}
+% With this option you can set the size of the page to 6x9 inches.
+% You can also set your own size like this:
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\documentclass[6x9]{kdpcover}
+\setlength\kdpxsize{8.1in}
+\setlength\kdpysize{12.7in}
+\begin{document}
+\end{document}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+% \end{macro}
+
+% \begin{macro}{barless}
+% To get rid of the black bar at the center of the page, just add
+% |barless| option:
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\documentclass[barless]{kdpcover}
+\begin{document}
+\end{document}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+% \end{macro}
+
+% \section{Commands}
+
+% \begin{macro}{\putSpine}
+% The |\putSpine| command puts a vertical black spine line with two white elements
+% inside: the text at the top and the logo at the bottom. Make sure
+% the text is short enough so that it doesn't touch the logo. It's
+% a good practice to mention the volume number at the end of the text,
+% if you have more than one volume, e.g. "my book, vol. 1". I suggest
+% using small caps in the text only.
+% \end{macro}
+
+% \begin{macro}{\putVolume}
+% This one prints the volume picture. It is intentionally made large,
+% in order to make it obvious.
+% \end{macro}
+
+% \begin{macro}{\putVersion}
+% This one prints the version and it will also add the date of the latest
+% Git commit in the current directory. If it's not a Git repository,
+% the hash won't be printed.
+% \end{macro}
+
+% \begin{macro}{\putPrice}
+% This one prints the price, which is a good practice to mention, I believe.
+% \end{macro}
+
+% \begin{macro}{\putCopyright}
+% This one prints the copyright short message with the year and the
+% name of the author.
+% \end{macro}
+
+% \begin{macro}{\putCopyright}
+% This one prints the title of the book
+% \end{macro}
+
+% \begin{macro}{\putAuthor}
+% This one prints the author.
+% \end{macro}
+
+% \begin{macro}{\putTLDR}
+% This one prints the TL;DR paragraph, which summarizies the message
+% of the entire book.
+% \end{macro}
+
+% \begin{macro}{\putTLDR}
+% This one prints the front picture. You can use |cactus.pdf|.
+% \end{macro}
+
+% \begin{macro}{\putBack}
+% This is prints the text on the back of the book, which usually I suggest
+% to omit and keep the back empty and white.
+% \end{macro}
+
+% \StopEventually{}
+
+% \section{Implementation}
+
+% \changes{v0.2.0}{2021/07/14}{Initial version}
+
+% First, we define a few internal commands:
+%    \begin{macrocode}
+\makeatletter
+\newcommand*\kdp at pages{100}
+\newlength\kdp at xsize
+\setlength\kdp at xsize{6in}
+\newlength\kdp at ysize
+\setlength\kdp at ysize{9in}
+\makeatother
+%    \end{macrocode}
+
+% Then, we include |iexec| for being able to execute |qpdf|:
+%    \begin{macrocode}
+\RequirePackage{iexec}
+%    \end{macrocode}
+
+% Then, we parse class options:
+%    \begin{macrocode}
+\RequirePackage{xkeyval}
+\makeatletter
+\DeclareOptionX{6x9}
+  {\setlength\kdp at xsize{6in}\setlength\kdp at ysize{9in}}
+\DeclareOptionX{7x10}
+  {\setlength\kdp at xsize{7in}\setlength\kdp at ysize{10in}}
+\DeclareOptionX{8x10}
+  {\setlength\kdp at xsize{8in}\setlength\kdp at ysize{10in}}
+\DeclareOptionX{pages}
+  {\renewcommand*\kdp at pages{#1}}
+\newif\ifkdp at barless
+\DeclareOptionX{barless}{\kdp at barlesstrue}
+\DeclareOptionX{pdf}{%
+  \iexec[trace,quiet,stdout=kdpcover-pages-count.txt]
+    {qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}%
+  \newread\kdp at pagescount%
+  \openin\kdp at pagescount=kdpcover-pages-count.txt
+  \read\kdp at pagescount to \kdp at pages%
+}
+\ProcessOptionsX\relax\makeatother
+%    \end{macrocode}
+
+% Then, we include a few useful packages:
+%    \begin{macrocode}
+\RequirePackage{anyfontsize}
+\RequirePackage{tikz}
+\RequirePackage[letterspace=-50]{microtype}
+\RequirePackage{xcolor}
+\RequirePackage{graphicx}
+\RequirePackage{calc}
+%    \end{macrocode}
+
+% Then, we set spacing using |setspace|:
+%    \begin{macrocode}
+\RequirePackage{setspace}
+  \setstretch{1.2}
+%    \end{macrocode}
+
+% Then, we set calculate size.
+% The height of the page is 9 inches plus 0.125 "bleed" on top and
+% on the bottom, see \href{https://kdp.amazon.com/en_US/help/topic/G201953020}{this}.
+% The width is 6 inches plus 0.125 "bleed" on each side. The width of the
+% "spine" depends on the amount of pages in the book.
+%    \begin{macrocode}
+\makeatletter
+  \newlength\kdp at height
+  \setlength\kdp at height{0.125in + \kdp at ysize + 0.125in}
+  \newlength\kdp at width
+  \setlength\kdp at width{
+    0.125in + \kdp at xsize
+    + 0.0025in * \kdp at pages
+    + \kdp at xsize + 0.125in}
+\makeatother
+%    \end{macrocode}
+
+% Then, we set the size of the page, using |geometry|:
+%    \begin{macrocode}
+\RequirePackage{geometry}
+\makeatletter
+\geometry{paperwidth=\kdp at width,paperheight=\kdp at height,
+  left=0pt,right=0pt,top=0pt,bottom=0pt}
+\makeatother
+%    \end{macrocode}
+
+% Then, we set coordinates using |textpos|:
+%    \begin{macrocode}
+\RequirePackage[absolute]{textpos}
+\TPGrid{16}{16}
+%    \end{macrocode}
+
+% \begin{macro}{\putSpine}
+% Then, we define |\putSpine|:
+%    \begin{macrocode}
+\makeatletter\newcommand\putSpine[2][kdpcover-signature]{%
+  \ifkdp at barless\else
+    \begin{textblock}{2.4}[0.5,0](8,0)%
+      \begin{tikzpicture}%
+        \node [rectangle, inner sep=0em, fill=black,
+        minimum width=2.4\TPHorizModule,
+        minimum height=16\TPVertModule] at (0,0) {};
+      \end{tikzpicture}%
+    \end{textblock}%
+  \fi
+  \begin{textblock}{1}[0.5,0](8,2)%
+    \begin{tikzpicture}%
+      \node [color=white, inner sep=0cm, outer sep=0cm,
+        rotate=270, minimum height=\TPHorizModule] at (0,0) {
+        \Large #2
+      };%
+    \end{tikzpicture}%
+  \end{textblock}%
+  \begin{textblock}{2.4}[0.5,1](8,14)%
+    \centerline{\includegraphics[width=0.32in]{#1}}%
+  \end{textblock}%
+}\makeatother
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putPicture}
+% Then, we define |\putPicture|:
+%    \begin{macrocode}
+\newcommand\putPicture[1]{%
+  \begin{textblock}{4}(10,2)%
+    \includegraphics[width=\textwidth]{#1}
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putVolume}
+% Then, we define |\putVolume|:
+%    \begin{macrocode}
+\newcommand\putVolume[1]{%
+  \begin{textblock}{2}[1,1](15,14)%
+    \raggedleft
+    \includegraphics[height=0.4in]{kdpcover-vol-#1}
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putPrice}
+% Then, we define |\putPrice|:
+%    \begin{macrocode}
+\newcommand\putPrice[1]{%
+  \begin{textblock}{4}[0,1](1,2)%
+    \small #1
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putBack}
+% Then, we define |\putBack|:
+%    \begin{macrocode}
+\newcommand\putBack[1]{%
+  \begin{textblock}{5}[0,0](1,3)%
+    \small #1
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putTitle}
+% Then, we define |\putTitle|:
+%    \begin{macrocode}
+\newcommand\putTitle[1]{%
+  \begin{textblock}{5}(10,9)%
+    \fontsize{32}{32}\selectfont #1
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putAuthor}
+% Then, we define |\putAuthor|:
+%    \begin{macrocode}
+\newcommand\putAuthor[1]{%
+  \begin{textblock}{4}(10,10)%
+    \large by #1
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putTLDR}
+% Then, we define |\putTLDR|:
+%    \begin{macrocode}
+\newcommand\putTLDR[1]{%
+  \begin{textblock}{5}(10,11)%
+    TL;DR #1
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putVersion}
+% Then, we define |\putVersion|:
+%    \begin{macrocode}
+\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'}
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\putCopyright}
+% Then, we define |\putCopyright|:
+%    \begin{macrocode}
+\newcommand\putCopyright[2]{%
+  \begin{textblock}{4}[0,1](1,14)%
+    \small (c)
+    #1 #2
+  \end{textblock}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+% Finally, a few layout instructions:
+%    \begin{macrocode}
+\AtBeginDocument{%
+  \ttfamily%
+  \raggedright%
+  \setlength\parindent{0pt}%
+  \setlength\parskip{0pt}%
+  \interfootnotelinepenalty=10000%
+}
+%    \end{macrocode}
+
+% \Finale
+
+%\clearpage
+%
+%\PrintChanges
+%\clearpage
+%\PrintIndex


Property changes on: trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/kdpcover/kdpcover.ins	2022-10-02 20:18:52 UTC (rev 64582)
@@ -0,0 +1,55 @@
+%% (The MIT License)
+%%
+%% Copyright (c) 2021-2022 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
+%% in the Software without restriction, including without limitation the rights
+%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+%% copies of the Software, and to permit persons to whom the Software is
+%% furnished to do so, subject to the following conditions:
+%%
+%% The above copyright notice and this permission notice shall be included in all
+%% copies or substantial portions of the Software.
+%%
+%% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+%% SOFTWARE.
+
+\input docstrip.tex
+\keepsilent
+\usedir{macros/latex/contrib/kdpcover}
+\preamble
+(The MIT License)
+
+Copyright (c) 2021-2022 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
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+\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.}
+\endbatchfile

Modified: trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls	2022-10-02 20:18:20 UTC (rev 64581)
+++ trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls	2022-10-02 20:18:52 UTC (rev 64582)
@@ -1,29 +1,60 @@
-% (The MIT License)
-%
-% Copyright (c) 2021-2022 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
-% in the Software without restriction, including without limitation the rights
-% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-% copies of the Software, and to permit persons to whom the Software is
-% furnished to do so, subject to the following conditions:
-%
-% The above copyright notice and this permission notice shall be included in all
-% copies or substantial portions of the Software.
-%
-% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-% SOFTWARE.
+%%
+%% This is file `kdpcover.cls',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% kdpcover.dtx  (with options: `class')
+%% (The MIT License)
+%% 
+%% Copyright (c) 2021-2022 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
+%% in the Software without restriction, including without limitation the rights
+%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+%% copies of the Software, and to permit persons to whom the Software is
+%% furnished to do so, subject to the following conditions:
+%% 
+%% The above copyright notice and this permission notice shall be included in all
+%% copies or substantial portions of the Software.
+%% 
+%% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+%% SOFTWARE.
 
+
+
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{kdpcover}[2022/07/03 0.3.0 Cover for Kindle Direct Publishing books]
-\LoadClass{article}
+\ProvidesClass{kdpcover}
+[02.10.2022 0.4.0 Cover for Kindle Direct Publishing books]
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 \makeatletter
 \newcommand*\kdp at pages{100}
 \newlength\kdp at xsize
@@ -35,16 +66,20 @@
 \RequirePackage{iexec}
 
 \RequirePackage{xkeyval}
-
 \makeatletter
-\DeclareOptionX{6x9}{\setlength\kdp at xsize{6in}\setlength\kdp at ysize{9in}}
-\DeclareOptionX{7x10}{\setlength\kdp at xsize{7in}\setlength\kdp at ysize{10in}}
-\DeclareOptionX{8x10}{\setlength\kdp at xsize{8in}\setlength\kdp at ysize{10in}}
-\DeclareOptionX{pages}{\renewcommand*\kdp at pages{#1}}
+\DeclareOptionX{6x9}
+  {\setlength\kdp at xsize{6in}\setlength\kdp at ysize{9in}}
+\DeclareOptionX{7x10}
+  {\setlength\kdp at xsize{7in}\setlength\kdp at ysize{10in}}
+\DeclareOptionX{8x10}
+  {\setlength\kdp at xsize{8in}\setlength\kdp at ysize{10in}}
+\DeclareOptionX{pages}
+  {\renewcommand*\kdp at pages{#1}}
 \newif\ifkdp at barless
 \DeclareOptionX{barless}{\kdp at barlesstrue}
 \DeclareOptionX{pdf}{%
-  \iexec[trace,quiet,stdout=kdpcover-pages-count.txt]{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}%
+  \iexec[trace,quiet,stdout=kdpcover-pages-count.txt]
+    {qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}%
   \newread\kdp at pagescount%
   \openin\kdp at pagescount=kdpcover-pages-count.txt
   \read\kdp at pagescount to \kdp at pages%
@@ -61,34 +96,39 @@
 \RequirePackage{setspace}
   \setstretch{1.2}
 
-% The height of the page is 9 inches plus 0.125 "bleed" on top and
-% on the bottom.
-% Check this doc: https://kdp.amazon.com/en_US/help/topic/G201953020
-\makeatletter\newlength\kdp at height\makeatother%
-\makeatletter\setlength\kdp at height{0.125in + \kdp at ysize + 0.125in}\makeatother%
-% The width is 6 inches plus 0.125 "bleed" on each side. The width of the
-% "spine" depends on the amount of pages in the book.
-\makeatletter\newlength\kdp at width\makeatother
-\makeatletter\setlength\kdp at width{0.125in + \kdp at xsize + 0.0025in * \kdp at pages + \kdp at xsize + 0.125in}\makeatother
+\makeatletter
+  \newlength\kdp at height
+  \setlength\kdp at height{0.125in + \kdp at ysize + 0.125in}
+  \newlength\kdp at width
+  \setlength\kdp at width{
+    0.125in + \kdp at xsize
+    + 0.0025in * \kdp at pages
+    + \kdp at xsize + 0.125in}
+\makeatother
+
 \RequirePackage{geometry}
-  \makeatletter
-  \geometry{paperwidth=\kdp at width,paperheight=\kdp at height,left=0pt,right=0pt,top=0pt,bottom=0pt}
-  \makeatother
+\makeatletter
+\geometry{paperwidth=\kdp at width,paperheight=\kdp at height,
+  left=0pt,right=0pt,top=0pt,bottom=0pt}
+\makeatother
+
 \RequirePackage[absolute]{textpos}
-  \TPGrid{16}{16}
+\TPGrid{16}{16}
 
-\makeatletter
-\newcommand\putSpine[2][kdpcover-signature]{%
+\makeatletter\newcommand\putSpine[2][kdpcover-signature]{%
   \ifkdp at barless\else
     \begin{textblock}{2.4}[0.5,0](8,0)%
       \begin{tikzpicture}%
-        \node [rectangle, inner sep=0em, fill=black, minimum width=2.4\TPHorizModule, minimum height=16\TPVertModule] at (0,0) {};
+        \node [rectangle, inner sep=0em, fill=black,
+        minimum width=2.4\TPHorizModule,
+        minimum height=16\TPVertModule] at (0,0) {};
       \end{tikzpicture}%
     \end{textblock}%
   \fi
   \begin{textblock}{1}[0.5,0](8,2)%
     \begin{tikzpicture}%
-      \node [color=white, inner sep=0cm, outer sep=0cm, rotate=270, minimum height=\TPHorizModule] at (0,0) {
+      \node [color=white, inner sep=0cm, outer sep=0cm,
+        rotate=270, minimum height=\TPHorizModule] at (0,0) {
         \Large #2
       };%
     \end{tikzpicture}%
@@ -96,8 +136,7 @@
   \begin{textblock}{2.4}[0.5,1](8,14)%
     \centerline{\includegraphics[width=0.32in]{#1}}%
   \end{textblock}%
-}
-\makeatother
+}\makeatother
 
 \newcommand\putPicture[1]{%
   \begin{textblock}{4}(10,2)%
@@ -165,4 +204,7 @@
   \interfootnotelinepenalty=10000%
 }
 
+
 \endinput
+%%
+%% End of file `kdpcover.cls'.



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