texlive[59932] Master/texmf-dist: kdpbook (14jul21)

commits+karl at tug.org commits+karl at tug.org
Wed Jul 14 23:11:45 CEST 2021


Revision: 59932
          http://tug.org/svn/texlive?view=revision&revision=59932
Author:   karl
Date:     2021-07-14 23:11:45 +0200 (Wed, 14 Jul 2021)
Log Message:
-----------
kdpbook (14jul21)

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

Modified: trunk/Master/texmf-dist/doc/latex/kdpbook/DEPENDS.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpbook/DEPENDS.txt	2021-07-14 21:11:30 UTC (rev 59931)
+++ trunk/Master/texmf-dist/doc/latex/kdpbook/DEPENDS.txt	2021-07-14 21:11:45 UTC (rev 59932)
@@ -1,4 +1,4 @@
-hard shellesc
+hard iexec
 hard xkeyval
 hard anyfontsize
 hard tikz

Modified: trunk/Master/texmf-dist/doc/latex/kdpbook/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpbook/README.md	2021-07-14 21:11:30 UTC (rev 59931)
+++ trunk/Master/texmf-dist/doc/latex/kdpbook/README.md	2021-07-14 21:11:45 UTC (rev 59932)
@@ -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 @@
 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,7 +18,7 @@
 ```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}
@@ -25,7 +25,8 @@
 \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.

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

Modified: trunk/Master/texmf-dist/doc/latex/kdpbook/kdpcover.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/kdpbook/kdpcover.tex	2021-07-14 21:11:30 UTC (rev 59931)
+++ trunk/Master/texmf-dist/doc/latex/kdpbook/kdpcover.tex	2021-07-14 21:11:45 UTC (rev 59932)
@@ -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.0}
 
 % This prints the price, which is a good practice to mention, I believe.
 \putPrice{\$0.00}

Modified: trunk/Master/texmf-dist/tex/latex/kdpbook/kdpcover.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/kdpbook/kdpcover.cls	2021-07-14 21:11:30 UTC (rev 59931)
+++ trunk/Master/texmf-dist/tex/latex/kdpbook/kdpcover.cls	2021-07-14 21:11:45 UTC (rev 59932)
@@ -21,7 +21,7 @@
 % SOFTWARE.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{kdpcover}[2021/06/04 0.1.0 Cover for KDP book]
+\ProvidesClass{kdpcover}[2021/07/14 0.2.0 Cover for KDP book]
 \LoadClass{article}
 
 \newcommand*\kdppages{100}
@@ -28,27 +28,11 @@
 \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}
@@ -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}
 }
 



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