summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/kdpcover
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-07-04 03:03:43 +0000
committerNorbert Preining <norbert@preining.info>2022-07-04 03:03:43 +0000
commit1c10375ec46d7d83b2f1efc2a71b7ea114c889f0 (patch)
tree47b3469111105b7767111dcb89858fbc1e73377f /macros/latex/contrib/kdpcover
parent34d318af65decbdb242ae03b64bf3f53266067b6 (diff)
CTAN sync 202207040303
Diffstat (limited to 'macros/latex/contrib/kdpcover')
-rw-r--r--macros/latex/contrib/kdpcover/kdpcover.cls18
-rw-r--r--macros/latex/contrib/kdpcover/kdpcover.pdfbin104774 -> 104667 bytes
-rw-r--r--macros/latex/contrib/kdpcover/kdpcover.tex5
3 files changed, 16 insertions, 7 deletions
diff --git a/macros/latex/contrib/kdpcover/kdpcover.cls b/macros/latex/contrib/kdpcover/kdpcover.cls
index a04b5b2f9e..9e38b0d3b5 100644
--- a/macros/latex/contrib/kdpcover/kdpcover.cls
+++ b/macros/latex/contrib/kdpcover/kdpcover.cls
@@ -21,7 +21,7 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{kdpcover}[2022/01/09 0.2.4 Cover for Kindle Direct Publishing books]
+\ProvidesClass{kdpcover}[2022/07/03 0.3.0 Cover for Kindle Direct Publishing books]
\LoadClass{article}
\makeatletter
@@ -41,6 +41,8 @@
\DeclareOptionX{7x10}{\setlength\kdp@xsize{7in}\setlength\kdp@ysize{10in}}
\DeclareOptionX{8x10}{\setlength\kdp@xsize{8in}\setlength\kdp@ysize{10in}}
\DeclareOptionX{pages}{\renewcommand*\kdp@pages{#1}}
+\newif\ifkdp@barless
+\DeclareOptionX{barless}{\kdp@barlesstrue}
\DeclareOptionX{pdf}{%
\iexec[trace,quiet,stdout=kdpcover-pages-count.txt]{qpdf --show-npages #1 | tr -d '[[:space:]]' | \{ cat; echo \%; \}}%
\newread\kdp@pagescount%
@@ -75,12 +77,15 @@
\RequirePackage[absolute]{textpos}
\TPGrid{16}{16}
+\makeatletter
\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}%
+ \ifkdp@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) {
@@ -92,6 +97,7 @@
\centerline{\includegraphics[width=0.32in]{#1}}%
\end{textblock}%
}
+\makeatother
\newcommand\putPicture[1]{%
\begin{textblock}{4}(10,2)%
diff --git a/macros/latex/contrib/kdpcover/kdpcover.pdf b/macros/latex/contrib/kdpcover/kdpcover.pdf
index d80edde8e3..984c26469b 100644
--- a/macros/latex/contrib/kdpcover/kdpcover.pdf
+++ b/macros/latex/contrib/kdpcover/kdpcover.pdf
Binary files differ
diff --git a/macros/latex/contrib/kdpcover/kdpcover.tex b/macros/latex/contrib/kdpcover/kdpcover.tex
index 9e94ac13a6..793ba90b01 100644
--- a/macros/latex/contrib/kdpcover/kdpcover.tex
+++ b/macros/latex/contrib/kdpcover/kdpcover.tex
@@ -27,6 +27,9 @@
% 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}
@@ -45,7 +48,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.2.4}
+\putVersion{0.3.0}
% This prints the price, which is a good practice to mention, I believe.
\putPrice{\$0.00}