summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-14 21:11:45 +0000
committerKarl Berry <karl@freefriends.org>2021-07-14 21:11:45 +0000
commit79026d255b4cca46f09ab1f8d1c81ae90afbe052 (patch)
tree53bad69019870995f6b0bec87c8f6e89f402eec8 /Master/texmf-dist
parenta1ce037dac21c122c2252645490ffbb4f8733b08 (diff)
kdpbook (14jul21)
git-svn-id: svn://tug.org/texlive/trunk@59932 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/kdpbook/DEPENDS.txt2
-rw-r--r--Master/texmf-dist/doc/latex/kdpbook/README.md9
-rw-r--r--Master/texmf-dist/doc/latex/kdpbook/kdpcover.pdfbin104845 -> 104845 bytes
-rw-r--r--Master/texmf-dist/doc/latex/kdpbook/kdpcover.tex2
-rw-r--r--Master/texmf-dist/tex/latex/kdpbook/kdpcover.cls26
5 files changed, 12 insertions, 27 deletions
diff --git a/Master/texmf-dist/doc/latex/kdpbook/DEPENDS.txt b/Master/texmf-dist/doc/latex/kdpbook/DEPENDS.txt
index 2be9f7df5ef..75af288d41d 100644
--- a/Master/texmf-dist/doc/latex/kdpbook/DEPENDS.txt
+++ b/Master/texmf-dist/doc/latex/kdpbook/DEPENDS.txt
@@ -1,4 +1,4 @@
-hard shellesc
+hard iexec
hard xkeyval
hard anyfontsize
hard tikz
diff --git a/Master/texmf-dist/doc/latex/kdpbook/README.md b/Master/texmf-dist/doc/latex/kdpbook/README.md
index 5c5765b4fcc..a3fe02d0f99 100644
--- a/Master/texmf-dist/doc/latex/kdpbook/README.md
+++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/kdpbook/kdpcover.pdf b/Master/texmf-dist/doc/latex/kdpbook/kdpcover.pdf
index 7c9f844d5a5..094cb3421fd 100644
--- a/Master/texmf-dist/doc/latex/kdpbook/kdpcover.pdf
+++ b/Master/texmf-dist/doc/latex/kdpbook/kdpcover.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/kdpbook/kdpcover.tex b/Master/texmf-dist/doc/latex/kdpbook/kdpcover.tex
index ef2c073d608..da2a836110e 100644
--- a/Master/texmf-dist/doc/latex/kdpbook/kdpcover.tex
+++ b/Master/texmf-dist/doc/latex/kdpbook/kdpcover.tex
@@ -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}
diff --git a/Master/texmf-dist/tex/latex/kdpbook/kdpcover.cls b/Master/texmf-dist/tex/latex/kdpbook/kdpcover.cls
index 91603e47bf9..eafa4efe0d9 100644
--- a/Master/texmf-dist/tex/latex/kdpbook/kdpcover.cls
+++ b/Master/texmf-dist/tex/latex/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.0 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}
@@ -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}
}