diff options
author | Karl Berry <karl@freefriends.org> | 2022-07-03 20:57:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-07-03 20:57:54 +0000 |
commit | 651896284226ba0b294d5d5a627bcdcadcfbc7e9 (patch) | |
tree | 5b13e478e2f9d024f0c31294d4f68d8230d05681 /Master/texmf-dist/tex | |
parent | 41700d741272326d5cdbe2ecdad932fea3a44efc (diff) |
kdpcover (3jul22)
git-svn-id: svn://tug.org/texlive/trunk@63800 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls b/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls index a04b5b2f9ec..9e38b0d3b50 100644 --- a/Master/texmf-dist/tex/latex/kdpcover/kdpcover.cls +++ b/Master/texmf-dist/tex/latex/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)% |