texlive[60404] Master: kdpcover (2sep21)
commits+karl at tug.org
commits+karl at tug.org
Thu Sep 2 22:33:04 CEST 2021
Revision: 60404
http://tug.org/svn/texlive?view=revision&revision=60404
Author: karl
Date: 2021-09-02 22:33:03 +0200 (Thu, 02 Sep 2021)
Log Message:
-----------
kdpcover (2sep21)
Modified Paths:
--------------
trunk/Master/tlpkg/bin/tlpkg-ctan-check
trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/kdpcover/
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-signature.pdf
trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-1.pdf
trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-2.pdf
trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-3.pdf
trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-4.pdf
trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf
trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex
trunk/Master/texmf-dist/tex/latex/kdpcover/
trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls
trunk/Master/tlpkg/tlpsrc/kdpcover.tlpsrc
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt 2021-09-02 20:33:03 UTC (rev 60404)
@@ -0,0 +1,11 @@
+hard iexec
+hard xkeyval
+hard anyfontsize
+hard tikz
+hard microtype
+hard xifthen
+hard xcolor
+hard graphicx
+hard setspace
+hard geometry
+hard textpos
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/DEPENDS.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/README.md 2021-09-02 20:33:03 UTC (rev 60404)
@@ -0,0 +1,35 @@
+[![make](https://github.com/yegor256/kdpcover/actions/workflows/latexmk.yml/badge.svg)](https://github.com/yegor256/kdpcover/actions/workflows/latexmk.yml)
+[![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),
+which I sell [on Amazon](https://www.amazon.com/Yegor-Bugayenko/e/B01AM1QMDK).
+The problem this class solves is [the necessity](https://kdp.amazon.com/en_US/help/topic/G201953020)
+to change the size of the cover PDF respectfully
+to the number of pages in the book — the bigger
+the book, the larger must be the cover. The provided class makes necessary
+calculations on-fly, using the [`qpdf`](http://qpdf.sourceforge.net/) 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`.
+
+First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
+from [CTAN](https://ctan.org/pkg/kdpcover)
+and then use in the preamble:
+
+```tex
+\documentclass[pdf=my-book.pdf]{kdpcover}
+\begin{document}
+% Here you print the cover as you wish, but I recommend
+% you to use the commands available in the class, such as:
+\putSpine{my book, vol. 1}
+\putAuthor{Yegor Bugayenko}
+\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.
+Otherwise, make your changes and then run `make` again. If the build is
+still clean, submit a pull request.
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-signature.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-signature.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-signature.pdf 2021-09-02 20:31:39 UTC (rev 60403)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-signature.pdf 2021-09-02 20:33:03 UTC (rev 60404)
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-signature.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-1.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-1.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-1.pdf 2021-09-02 20:31:39 UTC (rev 60403)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-1.pdf 2021-09-02 20:33:03 UTC (rev 60404)
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-1.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-2.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-2.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-2.pdf 2021-09-02 20:31:39 UTC (rev 60403)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-2.pdf 2021-09-02 20:33:03 UTC (rev 60404)
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-2.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-3.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-3.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-3.pdf 2021-09-02 20:31:39 UTC (rev 60403)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-3.pdf 2021-09-02 20:33:03 UTC (rev 60404)
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-3.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-4.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-4.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-4.pdf 2021-09-02 20:31:39 UTC (rev 60403)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-4.pdf 2021-09-02 20:33:03 UTC (rev 60404)
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover-vol-4.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf 2021-09-02 20:31:39 UTC (rev 60403)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf 2021-09-02 20:33:03 UTC (rev 60404)
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex 2021-09-02 20:33:03 UTC (rev 60404)
@@ -0,0 +1,90 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 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.
+\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.2.2}
+
+% 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
Property changes on: trunk/Master/texmf-dist/doc/latex/kdpcover/kdpcover.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls 2021-09-02 20:33:03 UTC (rev 60404)
@@ -0,0 +1,147 @@
+% (The MIT License)
+%
+% Copyright (c) 2021 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}[2021/09/02 0.2.2 Cover for Kindle Direct Publishing books]
+\LoadClass{article}
+
+\newcommand*\kdppages{100}
+\newlength\kdpxsize
+\newlength\kdpysize
+
+\RequirePackage{iexec}
+\RequirePackage{xkeyval}
+\DeclareOptionX{6x9}{\setlength\kdpxsize{6in}\setlength\kdpysize{9in}}
+\DeclareOptionX{7x10}{\setlength\kdpxsize{7in}\setlength\kdpysize{10in}}
+\DeclareOptionX{8x10}{\setlength\kdpxsize{8in}\setlength\kdpysize{10in}}
+\DeclareOptionX{pages}{\renewcommand*\kdppages{#1}}
+\DeclareOptionX{pdf}{\renewcommand*{\kdppages}{\iexec{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}}}
+\ProcessOptionsX\relax
+
+\RequirePackage{anyfontsize}
+\RequirePackage{tikz}
+\RequirePackage[letterspace=-50]{microtype}
+\RequirePackage{xifthen}
+\RequirePackage{xcolor}
+\RequirePackage{graphicx}
+\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
+\newlength\kdpheight
+\setlength\kdpheight{0.125in + \kdpysize + 0.125in}
+% 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. Also, there is a
+%
+\newlength\kdpwidth
+\setlength\kdpwidth{0.125in + \kdpxsize + 0.0025in * \kdppages + \kdpxsize + 0.125in}
+\RequirePackage{geometry}
+ \geometry{paperwidth=\kdpwidth,paperheight=\kdpheight,left=0pt,right=0pt,top=0pt,bottom=0pt}
+\RequirePackage[absolute]{textpos}
+ \TPGrid{16}{16}
+
+\newcommand\putSpine[2][kdpcover-signature]{
+ \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}
+ \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 #1
+ };
+ \end{tikzpicture}
+ \end{textblock}
+ \begin{textblock}{2.4}[0.5,1](8,14)
+ \centerline{\includegraphics[width=0.32in]{#1}}
+ \end{textblock}
+}
+
+\newcommand\putPicture[1]{
+ \begin{textblock}{4}(10,2)
+ \includegraphics[width=\textwidth]{#1}
+ \end{textblock}
+}
+
+\newcommand\putVolume[1]{
+ \begin{textblock}{2}[1,1](15,14)
+ \raggedleft
+ \includegraphics[height=0.4in]{kdpcover-vol-#1}
+ \end{textblock}
+}
+
+\newcommand\putPrice[1]{
+ \begin{textblock}{4}[0,1](1,2)
+ \small #1
+ \end{textblock}
+}
+
+\newcommand\putBack[1]{
+ \begin{textblock}{5}[0,0](1,3)
+ \small #1
+ \end{textblock}
+}
+
+\newcommand\putTitle[1]{
+ \begin{textblock}{5}(10,9)
+ \fontsize{32}{32}\selectfont #1
+ \end{textblock}
+}
+
+\newcommand\putAuthor[1]{
+ \begin{textblock}{4}(10,10)
+ \large by #1
+ \end{textblock}
+}
+
+\newcommand\putTLDR[1]{
+ \begin{textblock}{5}(10,11)
+ TL;DR #1
+ \end{textblock}
+}
+
+\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}
+}
+
+\newcommand\putCopyright[2]{
+ \begin{textblock}{4}[0,1](1,14)
+ \small (c)
+ #1 #2
+ \end{textblock}
+}
+
+\AtBeginDocument{
+ \ttfamily%
+ \raggedright%
+ \setlength\parindent{0pt}%
+ \setlength\parskip{0pt}%
+ \interfootnotelinepenalty=10000
+}
+
+\endinput
Property changes on: trunk/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check 2021-09-02 20:31:39 UTC (rev 60403)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check 2021-09-02 20:33:03 UTC (rev 60404)
@@ -423,7 +423,7 @@
jslectureplanner jumplines junicode jupynotex
jura juraabbrev jurabib juramisc jurarsp js-misc jvlisting
kalendarium kanaparser kantlipsum karnaugh karnaugh-map karnaughmap kastrup
- kblocks kdgdocs kdpbook kerkis kerntest ketcindy
+ kblocks kdgdocs kdpcover kerkis kerntest ketcindy
keycommand keyfloat keyindex keyparse keyreader keystroke
keyval2e keyvaltable kix kixfont
knitting knittingpattern knowledge
Modified: trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc 2021-09-02 20:31:39 UTC (rev 60403)
+++ trunk/Master/tlpkg/tlpsrc/collection-publishers.tlpsrc 2021-09-02 20:33:03 UTC (rev 60404)
@@ -109,7 +109,7 @@
depend jnuexam
depend jpsj
depend kdgdocs
-depend kdpbook
+depend kdpcover
depend kluwer
depend ksp-thesis
depend ku-template
Added: trunk/Master/tlpkg/tlpsrc/kdpcover.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/kdpcover.tlpsrc (rev 0)
+++ trunk/Master/tlpkg/tlpsrc/kdpcover.tlpsrc 2021-09-02 20:33:03 UTC (rev 60404)
@@ -0,0 +1,14 @@
+#depend shellesc
+depend tools
+depend xkeyval
+depend anyfontsize
+#depend tikz
+depend pgf
+depend microtype
+depend xifthen
+depend xcolor
+#depend graphicx
+depend graphics
+depend setspace
+depend geometry
+depend textpos
More information about the tex-live-commits
mailing list.