From 55ae461252a599d6bc951065a37c16a8971fc560 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 15 Jul 2021 03:01:01 +0000 Subject: CTAN sync 202107150300 --- macros/latex/contrib/kdpbook/DEPENDS.txt | 2 +- macros/latex/contrib/kdpbook/README.md | 9 +++--- macros/latex/contrib/kdpbook/images/signature.pdf | Bin 7256 -> 0 bytes macros/latex/contrib/kdpbook/images/volume-1.pdf | Bin 8540 -> 0 bytes macros/latex/contrib/kdpbook/images/volume-2.pdf | Bin 6504 -> 0 bytes macros/latex/contrib/kdpbook/images/volume-3.pdf | Bin 7156 -> 0 bytes macros/latex/contrib/kdpbook/images/volume-4.pdf | Bin 6723 -> 0 bytes .../latex/contrib/kdpbook/kdpcover-signature.pdf | Bin 0 -> 7256 bytes macros/latex/contrib/kdpbook/kdpcover-vol-1.pdf | Bin 0 -> 8540 bytes macros/latex/contrib/kdpbook/kdpcover-vol-2.pdf | Bin 0 -> 6504 bytes macros/latex/contrib/kdpbook/kdpcover-vol-3.pdf | Bin 0 -> 7156 bytes macros/latex/contrib/kdpbook/kdpcover-vol-4.pdf | Bin 0 -> 6723 bytes macros/latex/contrib/kdpbook/kdpcover.cls | 32 ++++++--------------- macros/latex/contrib/kdpbook/kdpcover.pdf | Bin 104845 -> 103975 bytes macros/latex/contrib/kdpbook/kdpcover.tex | 4 +-- 15 files changed, 16 insertions(+), 31 deletions(-) delete mode 100644 macros/latex/contrib/kdpbook/images/signature.pdf delete mode 100644 macros/latex/contrib/kdpbook/images/volume-1.pdf delete mode 100644 macros/latex/contrib/kdpbook/images/volume-2.pdf delete mode 100644 macros/latex/contrib/kdpbook/images/volume-3.pdf delete mode 100644 macros/latex/contrib/kdpbook/images/volume-4.pdf create mode 100644 macros/latex/contrib/kdpbook/kdpcover-signature.pdf create mode 100644 macros/latex/contrib/kdpbook/kdpcover-vol-1.pdf create mode 100644 macros/latex/contrib/kdpbook/kdpcover-vol-2.pdf create mode 100644 macros/latex/contrib/kdpbook/kdpcover-vol-3.pdf create mode 100644 macros/latex/contrib/kdpbook/kdpcover-vol-4.pdf (limited to 'macros/latex/contrib/kdpbook') diff --git a/macros/latex/contrib/kdpbook/DEPENDS.txt b/macros/latex/contrib/kdpbook/DEPENDS.txt index 2be9f7df5e..75af288d41 100644 --- a/macros/latex/contrib/kdpbook/DEPENDS.txt +++ b/macros/latex/contrib/kdpbook/DEPENDS.txt @@ -1,4 +1,4 @@ -hard shellesc +hard iexec hard xkeyval hard anyfontsize hard tikz diff --git a/macros/latex/contrib/kdpbook/README.md b/macros/latex/contrib/kdpbook/README.md index 5c5765b4fc..a3fe02d0f9 100644 --- a/macros/latex/contrib/kdpbook/README.md +++ b/macros/latex/contrib/kdpbook/README.md @@ -1,4 +1,4 @@ -[![make](https://github.com/yegor256/kdpcover/actions/workflows/make.yml/badge.svg)](https://github.com/yegor256/kdpcover/actions/workflows/make.yml) +[![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), @@ -7,7 +7,7 @@ The problem this class solves is [the necessity](https://kdp.amazon.com/en_US/he 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` took from GhostScript. Obviously, +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`. @@ -18,14 +18,15 @@ and then use in the preamble: ```tex \documentclass[pdf=my-book.pdf]{kdpcover} \begin{document} -% Here you print the cover as you with, but I recommend +% 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` file. +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. diff --git a/macros/latex/contrib/kdpbook/images/signature.pdf b/macros/latex/contrib/kdpbook/images/signature.pdf deleted file mode 100644 index af185666b2..0000000000 Binary files a/macros/latex/contrib/kdpbook/images/signature.pdf and /dev/null differ diff --git a/macros/latex/contrib/kdpbook/images/volume-1.pdf b/macros/latex/contrib/kdpbook/images/volume-1.pdf deleted file mode 100644 index 8ccf53f517..0000000000 Binary files a/macros/latex/contrib/kdpbook/images/volume-1.pdf and /dev/null differ diff --git a/macros/latex/contrib/kdpbook/images/volume-2.pdf b/macros/latex/contrib/kdpbook/images/volume-2.pdf deleted file mode 100644 index 4dd3c14199..0000000000 Binary files a/macros/latex/contrib/kdpbook/images/volume-2.pdf and /dev/null differ diff --git a/macros/latex/contrib/kdpbook/images/volume-3.pdf b/macros/latex/contrib/kdpbook/images/volume-3.pdf deleted file mode 100644 index a554387e49..0000000000 Binary files a/macros/latex/contrib/kdpbook/images/volume-3.pdf and /dev/null differ diff --git a/macros/latex/contrib/kdpbook/images/volume-4.pdf b/macros/latex/contrib/kdpbook/images/volume-4.pdf deleted file mode 100644 index a2d12b0d43..0000000000 Binary files a/macros/latex/contrib/kdpbook/images/volume-4.pdf and /dev/null differ diff --git a/macros/latex/contrib/kdpbook/kdpcover-signature.pdf b/macros/latex/contrib/kdpbook/kdpcover-signature.pdf new file mode 100644 index 0000000000..af185666b2 Binary files /dev/null and b/macros/latex/contrib/kdpbook/kdpcover-signature.pdf differ diff --git a/macros/latex/contrib/kdpbook/kdpcover-vol-1.pdf b/macros/latex/contrib/kdpbook/kdpcover-vol-1.pdf new file mode 100644 index 0000000000..8ccf53f517 Binary files /dev/null and b/macros/latex/contrib/kdpbook/kdpcover-vol-1.pdf differ diff --git a/macros/latex/contrib/kdpbook/kdpcover-vol-2.pdf b/macros/latex/contrib/kdpbook/kdpcover-vol-2.pdf new file mode 100644 index 0000000000..4dd3c14199 Binary files /dev/null and b/macros/latex/contrib/kdpbook/kdpcover-vol-2.pdf differ diff --git a/macros/latex/contrib/kdpbook/kdpcover-vol-3.pdf b/macros/latex/contrib/kdpbook/kdpcover-vol-3.pdf new file mode 100644 index 0000000000..a554387e49 Binary files /dev/null and b/macros/latex/contrib/kdpbook/kdpcover-vol-3.pdf differ diff --git a/macros/latex/contrib/kdpbook/kdpcover-vol-4.pdf b/macros/latex/contrib/kdpbook/kdpcover-vol-4.pdf new file mode 100644 index 0000000000..a2d12b0d43 Binary files /dev/null and b/macros/latex/contrib/kdpbook/kdpcover-vol-4.pdf differ diff --git a/macros/latex/contrib/kdpbook/kdpcover.cls b/macros/latex/contrib/kdpbook/kdpcover.cls index 91603e47bf..1e33276217 100644 --- a/macros/latex/contrib/kdpbook/kdpcover.cls +++ b/macros/latex/contrib/kdpbook/kdpcover.cls @@ -21,34 +21,18 @@ % SOFTWARE. \NeedsTeXFormat{LaTeX2e} -\ProvidesClass{kdpcover}[2021/06/04 0.1.0 Cover for KDP book] +\ProvidesClass{kdpcover}[2021/07/14 0.2.1 Cover for KDP book] \LoadClass{article} \newcommand*\kdppages{100} \newlength\kdpxsize \newlength\kdpysize -\RequirePackage{shellesc} +\RequirePackage{iexec} \RequirePackage{xkeyval} -\DeclareOptionX{6x9}{ - \setlength\kdpxsize{6in} - \setlength\kdpysize{9in} -} +\DeclareOptionX{6x9}{\setlength\kdpxsize{6in}\setlength\kdpysize{9in}} \DeclareOptionX{pages}{\renewcommand*\kdppages{#1}} -\makeatletter\newcommand{\kdpexec}[3][1=]{% - \begingroup - \let\%\@percentchar - \let\{\@charlb - \let\}\@charrb - \ShellEscape{#3 > #2}% - \endgroup% - \ifthenelse{\isempty{#1}}{\input{#2}}{}% -}\makeatother -\makeatletter\let\primitiveinput\@@input\makeatother% -\DeclareOptionX{pdf}{ - \kdpexec[noprint]{totalpages.exc}{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}% - \renewcommand{\kdppages}{\primitiveinput totalpages.exc } -} +\DeclareOptionX{pdf}{\renewcommand*{\kdppages}{\iexec{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}}} \ProcessOptionsX\relax \RequirePackage{anyfontsize} @@ -74,7 +58,7 @@ \RequirePackage[absolute]{textpos} \TPGrid{16}{16} -\newcommand\putSpine[2]{ +\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) {}; @@ -88,7 +72,7 @@ \end{tikzpicture} \end{textblock} \begin{textblock}{2.4}[0.5,1](8,14) - \centerline{\includegraphics[width=0.32in]{#2}} + \centerline{\includegraphics[width=0.32in]{#1}} \end{textblock} } @@ -101,7 +85,7 @@ \newcommand\putVolume[1]{ \begin{textblock}{2}[1,1](15,14) \raggedleft - \includegraphics[height=0.4in]{images/volume-#1} + \includegraphics[height=0.4in]{kdpcover-vol-#1} \end{textblock} } @@ -139,7 +123,7 @@ \begin{textblock}{4}[0,1](10,14) #1 \quad - \kdpexec[]{date.exc}{git log -n 1 --pretty='format:\%ad' --date='format:\%e-\%b-\%Y'} + \iexec{git log -n 1 --pretty='format:\%ad' --date='format:\%e-\%b-\%Y'} \end{textblock} } diff --git a/macros/latex/contrib/kdpbook/kdpcover.pdf b/macros/latex/contrib/kdpbook/kdpcover.pdf index 7c9f844d5a..0b99980c10 100644 Binary files a/macros/latex/contrib/kdpbook/kdpcover.pdf and b/macros/latex/contrib/kdpbook/kdpcover.pdf differ diff --git a/macros/latex/contrib/kdpbook/kdpcover.tex b/macros/latex/contrib/kdpbook/kdpcover.tex index ef2c073d60..93b9f91eac 100644 --- a/macros/latex/contrib/kdpbook/kdpcover.tex +++ b/macros/latex/contrib/kdpbook/kdpcover.tex @@ -28,7 +28,7 @@ % 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}{./images/signature} +\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. @@ -37,7 +37,7 @@ % 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.1.0} +\putVersion{0.2.1} % This prints the price, which is a good practice to mention, I believe. \putPrice{\$0.00} -- cgit v1.2.3