texlive[57079] Master/texmf-dist: bookcover (6dec20)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 6 23:15:49 CET 2020


Revision: 57079
          http://tug.org/svn/texlive?view=revision&revision=57079
Author:   karl
Date:     2020-12-06 23:15:49 +0100 (Sun, 06 Dec 2020)
Log Message:
-----------
bookcover (6dec20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.tex
    trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.tex
    trunk/Master/texmf-dist/doc/latex/bookcover/bookcover.pdf
    trunk/Master/texmf-dist/source/latex/bookcover/bookcover.dtx
    trunk/Master/texmf-dist/tex/latex/bookcover/bookcover.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-barcode.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-bg.jpg
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-cards.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-dice.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-einstein.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-newpart.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-parts.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-pi.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-result.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-ruler.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-scheme.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-sizes.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikz.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikzclip.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-trimming.pdf

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/background1.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/background2.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/background3.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/background4.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/background5.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/barcode.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bg.jpg
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bg1.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/bg4.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/cards.png
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/cover.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/coverscheme.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/dice.png
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/foreground1.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/foreground2.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/newpart.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/parts.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/result.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/ruler.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/sizes.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/summa.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/tikz.pdf
    trunk/Master/texmf-dist/doc/latex/bookcover/figures/tikzclip.pdf

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

Modified: trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.tex	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.tex	2020-12-06 22:15:49 UTC (rev 57079)
@@ -1,17 +1,16 @@
-\documentclass[spinewidth=25mm,coverwidth=15cm,coverheight=20cm,flapwidth=6cm]{bookcover}
+\documentclass[coverwidth=15cm,coverheight=20cm,spinewidth=25mm,
+               flapwidth=6cm,wrapwidth=5mm]{bookcover}
 
 \newbookcovercomponenttype{center rotate}{
-    \parbox[t][\partheight][c]{\partwidth}{
-        \begin{center}
-            \rotatebox[origin=c]{90}{#1}
-        \end{center}}}
+    \vfill
+    \centering
+    \rotatebox[origin=c]{-90}{#1}
+    \vfill}
 
 \usepackage[outline]{contour}% It doesn't work with xelatex and lualatex
 \contourlength{1pt}
-\definecolor{lightbrown}{RGB}{176,88,0}
-\colorlet{title}{yellow!60!black}
 \usepackage[latin]{babel}
-\usepackage{lipsum}
+\usepackage{lipsum,microtype}
 
 \begin{document}
 
@@ -19,80 +18,68 @@
 
 % Remark
 \begin{bookcoverelement}{center}{above front}
-    \textcolor{blue}{A DUST JACKET}
+    \textcolor{blue}{A dust jacket example}
 \end{bookcoverelement}
 
-% Black background color on the whole cover
+% Background color on the whole cover
 \begin{bookcoverelement}{color}{bg whole}
     black
 \end{bookcoverelement}
 
-% Brown background picture on the whole cover, without the flaps
+% Background picture on the whole cover without flaps
 \begin{bookcoverelement}{picture}{bg whole without flaps}
-    ./figures/bg.jpg
+    ./figures/bookcover-bg.jpg
 \end{bookcoverelement}
 
-% Vertical light brown transparent trails on the back cover by a tikz code
-\begin{bookcoverelement}{tikz}{bg back}
-    \fill[opacity=0.3,color=lightbrown] 
-    (0mm,0mm) rectangle (20mm,210mm) (100mm,0mm) rectangle (150mm,210mm);
+% Transparent areas on the back cover
+\begin{bookcoverelement}{tikz}{bg back and wrap}
+    \fill[opacity=0.3,black!50] 
+    (0,0) rectangle (25mm,\partheight) 
+    (part.north east) rectangle ([xshift=-5cm]part.south east);
 \end{bookcoverelement}
 
-% Vertical light brown transparent trails on the front cover by a tikz code
-\begin{bookcoverelement}{tikz}{bg front}
-    \fill[opacity=0.3,color=lightbrown] 
-    (0mm,0mm) rectangle (50mm,210mm) (130mm,0mm) rectangle (150mm,210mm);
+% Transparent areas on the front cover
+\begin{bookcoverelement}{tikz}{bg front and wrap}
+    \fill[opacity=0.3,black!50] 
+    (0,0) rectangle (50mm,\partheight) 
+    (part.north east) rectangle ([xshift=-25mm]part.south east);
 \end{bookcoverelement}
 
-% Picture on the front, behind the title
-\begin{bookcoverelement}{normal}{front}
-    \vspace{70mm}
-    \centering
-    \includegraphics[width=8cm]{./figures/cards.png}
+% Picture on the front cover behind the title
+\begin{bookcoverelement}{center}{front}
+    \includegraphics{./figures/bookcover-cards.pdf}
 \end{bookcoverelement}
 
-% Text on the front cover
-\begin{bookcoverelement}{normal}{front}
+% Author and title on the front cover
+\begin{bookcoverelement}{normal}{front}[,,,5cm]
     \centering
-    \vspace{60mm}
-    \color{title}\sffamily\bfseries
-    \resizebox*{50mm}{8mm}{\contour{black}{Rose Taylor}}
-    \par\vspace{20mm}
-    \resizebox*{90mm}{40mm}{\parbox{35mm}{
-        \centering
-        \contour{black}{PROBABILITY}\\
-        \contour{black}{THEORY}\\}}
+    \color{yellow!60!black}\sffamily\bfseries
+    \resizebox{!}{5mm}{\contour{black}{Rose Taylor}}\\[26mm]
+    \resizebox{!}{7mm}{\contour{black}{GAMBLING SYSTEMS}}\\[8mm]
+    \resizebox{!}{7mm}{\contour{black}{AND STRATEGIES}}\\
 \end{bookcoverelement}
 
-% Text on the spine
+% Title on the spine
 \begin{bookcoverelement}{center rotate}{spine}
-    \contour{black}{%
-        \color{title}\huge\sffamily\bfseries
-        Rose Taylor -- Probability Theory}
+    \color{yellow!60!black}\huge\sffamily\bfseries
+    \contour{black}{Rose Taylor -- Gambling Systems and Strategies}
 \end{bookcoverelement}
 
 % Text on the back cover
-\begin{bookcoverelement}{normal}{back}
-    \centering
-    \vspace{20mm}
-    \parbox{110mm}{\color{white}\lipsum[1]}
+\begin{bookcoverelement}{normal}{back}[2cm,2cm,2cm,2cm]
+    \color{white}\lipsum[1]
 \end{bookcoverelement}
 
 % Text and picture on the front flap
-\begin{bookcoverelement}{normal}{front flap}
-    \centering
-    \vspace{20mm}
-    \parbox{40mm}{\color{white}\lipsum[2]}
+\begin{bookcoverelement}{normal}{front flap}[1cm,1cm,1cm,2cm]
+    \color{white}\lipsum[2]
     \vfill
-    \includegraphics[width=30mm]{./figures/dice.png}
-    \vspace{10mm}
+    {\centering\includegraphics{./figures/bookcover-dice.pdf}\par}
 \end{bookcoverelement}
 
 % Text on the back flap
-\begin{bookcoverelement}{normal}{back flap}
-    \centering
-    \vspace{20mm}
-    \parbox{40mm}{\color{white}\lipsum[2]}
+\begin{bookcoverelement}{normal}{back flap}[1cm,2cm,1cm,2cm]
+    \color{white}\lipsum[2]
 \end{bookcoverelement}
 
 \end{bookcover}

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

Modified: trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.tex	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.tex	2020-12-06 22:15:49 UTC (rev 57079)
@@ -1,79 +1,68 @@
 \documentclass[markcolor=black,spinewidth=15mm]{bookcover}
 \usepackage[latin]{babel}
-\usepackage{lipsum}
-\definecolor{amiyellow}{cmyk}{0,0,.6,0}
+\usepackage{lipsum,microtype}
 
 \begin{document}
 
-% The outside of the book cover
+% Outside cover
 \begin{bookcover}
 
 % Remark
 \bookcovercomponent{center}{above front}{
-    \textcolor{red}{\textsc{Annales Mathematicae et Informaticae} book cover -- outside}}
+    \textcolor{red}{\textsc{Annales Mathematicae} book cover (outside)}}
 
-% Yellow triangle on the back cover by tikz code
+% Blue area on the back cover
 \bookcovercomponent{tikz}{bg back}{
-    \fill[amiyellow](.5,.5)--(17.5,24.5)--(17.5,0)--(.5,0)--cycle;}
+    \fill[blue!50](7/48,0)--(17.5,24.5)--(17.5,0)--cycle;}
 
-% Yellow triangle on the front cover by tikz code
+% Blue area on the front cover
 \bookcovercomponent{tikz}{bg front}{
-    \fill[amiyellow](0,0)--(0,24.5)--(17,.5)--(17,0)--cycle;}
+    \fill[blue!50](0,0)--(0,24.5)--(833/48,0)--cycle;}
 
-% Yellow background color on the spine
-\bookcovercomponent{color}{bg spine}{amiyellow}
+% Background color on the spine
+\bookcovercomponent{color}{bg spine}{blue!50}
 
-% Text on the spine
+% Title on the spine
 \bookcovercomponent{center}{spine}{
-    \rotatebox[origin=c]{90}{\footnotesize\bfseries
-        ANNALES MATHEMATICAE ET INFORMATICAE 43.~(2020)}}
+    \rotatebox[origin=c]{-90}{\large\bfseries
+        ANNALES MATHEMATICAE 43.~(2020)}}
 
-% Text and pictures on the front cover
-\bookcovercomponent{normal}{front}{
-    \vspace{30mm}
+% Text and picture on the front cover
+\bookcovercomponent{normal}{front}[22mm,20mm,22mm,40mm]{
     \centering
-    {\huge\bfseries ANNALES\\ MATHEMATICAE ET\\ INFORMATICAE\\[13mm]}
-    {\large\bfseries TOMUS 43.~(2020)}\\[10mm]
-    \includegraphics{./figures/summa.pdf}
+    {\huge\bfseries ANNALES\\ MATHEMATICAE\\[13mm]}
+    {\large\bfseries TOMUS 43.~(2020)}
     \vfill
+    \includegraphics{./figures/bookcover-pi.pdf}
+    \vfill
     {\large COMMISSIO REDACTORIUM}\\[3mm]
-    \parbox{123mm}{\centering\lipsum[2]\par}
-    \vfill
-    {\large\bfseries HUNGARIA}
-    \vspace{10mm}}
+    \lipsum[2]}
 
 % Text on the back cover
-\bookcovercomponent{normal}{back}{
-    \vspace{30mm}
-    \centering
-    {\large\bfseries Contents}\\[5mm]
-    \parbox{126mm}{\lipsum[1-4]}}
+\bookcovercomponent{normal}{back}[22mm,10mm,22mm,30mm]{
+    {\centering\large ABSTRACTUM\\[5mm]}
+    \lipsum[1-4]}
 
 \end{bookcover}
 
-% The inside of the book cover
+% Inside cover
 \begin{bookcover}
 
 % Remark
-\bookcovercomponent{center}{above front}{
-    \textcolor{red}{\textsc{Annales Mathematicae et Informaticae} book cover -- inside}}
+\bookcovercomponent{center}{above inside back}{
+    \textcolor{red}{\textsc{Annales Mathematicae} book cover (inside)}}
 
-% Text on the front cover (it is back of the inside book cover!)
-\bookcovercomponent{normal}{front}{
-    \vspace{27mm}
-    \begin{center}
-        \bfseries
-        ANNALES MATHEMATICAE ET INFORMATICAE\\[3mm]
-        International journal for mathematics and computer science\\[3mm]
-        Referred by\\
-        Zentralblatt f\"{u}r Mathematik\\
-        and\\
-        Mathematical Reviews\\
-    \end{center}
+% Background color on the whole inside cover
+\bookcovercomponent{color}{bg whole}{blue!50}
+
+% Text on the inside back cover
+\bookcovercomponent{normal}{inside back}[22mm,10mm,22mm,30mm]{
+    \color{white}
+    {\centering\bfseries
+    ANNALES MATHEMATICAE\\[3mm]
+    Acta internationalis mathematicae\par}
     \bigskip
-    \begin{center}
-        \parbox{126mm}{\lipsum[1]}
-    \end{center}}
+    \lipsum[1]}
 
 \end{bookcover}
 

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

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/background1.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/background2.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/background3.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/background4.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/background5.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/barcode.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bg.jpg
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bg1.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bg4.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-barcode.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-barcode.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-barcode.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-barcode.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-barcode.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-bg.jpg
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-bg.jpg
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-bg.jpg	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-bg.jpg	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-bg.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-cards.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-cards.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-cards.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-cards.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-cards.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-dice.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-dice.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-dice.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-dice.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-dice.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-einstein.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-einstein.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-einstein.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-einstein.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-einstein.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-newpart.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-newpart.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-newpart.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-newpart.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-newpart.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-parts.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-parts.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-parts.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-parts.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-parts.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-pi.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-pi.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-pi.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-pi.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-pi.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-result.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-result.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-result.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-result.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-result.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-ruler.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-ruler.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-ruler.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-ruler.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-ruler.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-scheme.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-scheme.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-scheme.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-scheme.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-scheme.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-sizes.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-sizes.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-sizes.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-sizes.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-sizes.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikz.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikz.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikz.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikz.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikz.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikzclip.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikzclip.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikzclip.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikzclip.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-tikzclip.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-trimming.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-trimming.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-trimming.pdf	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-trimming.pdf	2020-12-06 22:15:49 UTC (rev 57079)

Property changes on: trunk/Master/texmf-dist/doc/latex/bookcover/figures/bookcover-trimming.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/cards.png
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/cover.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/coverscheme.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/dice.png
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/foreground1.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/foreground2.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/newpart.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/parts.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/result.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/ruler.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/sizes.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/summa.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/tikz.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/latex/bookcover/figures/tikzclip.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/bookcover/bookcover.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bookcover/bookcover.dtx	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/source/latex/bookcover/bookcover.dtx	2020-12-06 22:15:49 UTC (rev 57079)
@@ -17,34 +17,36 @@
 % \iffalse
 %<*driver>
 \ProvidesFile{bookcover.dtx}
-\newcommand{\eifiledate}{2020/11/16}
-\newcommand{\eifilever}{v2.5}
+\newcommand{\eifiledate}{2020/12/06}
+\newcommand{\eifilever}{v3.0}
 %</driver>
 %<class>
 %<class>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-%<class>\ProvidesClass{bookcover}[2020/11/16 v2.5 class for book covers and dust jackets]
+%<class>\ProvidesClass{bookcover}[2020/12/06 v3.0 class for book covers and dust jackets]
 %
 %<*driver>
 \documentclass{ltxdoc}
 \OnlyDescription
-\usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
 \usepackage[paperwidth=210mm,paperheight=295mm,textwidth=160mm,top=25mm,bottom=25mm,outer=25mm]{geometry}
 \usepackage[unicode,pdfstartview=FitH,bookmarksnumbered,colorlinks,allcolors=teal]{hyperref}
 \usepackage[english]{babel}
-\usepackage{xcolor,graphicx,listings,calc,multirow,array,pdfpages}
+\usepackage{graphicx,listings,calc,multirow,array,paralist,eso-pic,tikz}
 
 \colorlet{command}{blue!80!black}
-\colorlet{example}{black}
-\colorlet{layer}{purple}
 \colorlet{param}{green!50!black}
 
 \lstnewenvironment{examplelst}{\lstset{
     gobble=2,
-    belowskip=5mm,
-    basicstyle=\color{example}\small\ttfamily,
+    aboveskip=1.4pt,
+    basicstyle=\small\ttfamily,
     backgroundcolor=\color{black!10},
     columns=fullflexible,
+    comment=[l][\ttfamily\color{purple}]{\%},
+    frame=trbl,
+    framesep=3pt,
+    xleftmargin=3.4pt,
+    xrightmargin=3.4pt, 
     keepspaces}}{}
 
 \lstnewenvironment{commandlst}{\lstset{
@@ -51,19 +53,29 @@
     literate={<}{{$\langle$}}1{>}{{$\rangle$}}1,
     delim=[is][\color{param}\normalfont\itshape\small]{!}{!},
     gobble=2,
+    belowskip=-4pt,
+    aboveskip=4pt,
     basicstyle=\color{command}\ttfamily,
     backgroundcolor=\color{white},
     columns=fullflexible,
+    frame=trbl,
+    frameround=tttt,
+    framesep=3pt,
+    xleftmargin=3.4pt,
+    xrightmargin=3.4pt, 
     keepspaces}}{}
 
 \lstdefinestyle{examplefile}{
     literate={ü}{{\"u}}1{ó}{{\'o}}1{é}{{\'e}}1{á}{{\'a}}1{Á}{{\'A}}1,
-    belowskip=5mm,
-    basicstyle=\color{example}\small\ttfamily,
+    basicstyle=\small\ttfamily,
     backgroundcolor=\color{black!10},
     columns=fullflexible,
     keepspaces,
-    comment=[l][\ttfamily\color{black!50}]{\%}}
+    frame=trbl,
+    framesep=3pt,
+    xleftmargin=3.4pt,
+    xrightmargin=3.4pt, 
+    comment=[l][\ttfamily\color{purple}]{\%}}
 
 \newcommand{\commandinline}{\lstinline[
     literate={<}{{$\langle$}}1{>}{{$\rangle$}}1,
@@ -72,16 +84,20 @@
     columns=fullflexible,
     keepspaces]}
 
-\flushbottom
-
 \def\meta#1{{\color{param}\normalfont\itshape\small$\langle$#1$\rangle$}}
 
-\def\example{\colorbox{command}{\footnotesize\sffamily\bfseries\color{white}EXAMPLE}}
+\def\example{{\setlength{\fboxsep}{3pt}\colorbox{command}{\footnotesize\sffamily\bfseries\color{white}EXAMPLE}}}
 
 \def\BookCover{{\def\sfdefault{ugq}\sffamily\bfseries
-    \color{gray}\mbox{}\lower.15ex\hbox{[B}ook%
-    \color{orange}\lower.15ex\hbox{C}over\lower.15ex\hbox{]}}}
+    \color{black!90}\mbox{}\lower.15ex\hbox{[B}ook%
+    \color{red!80!black}\lower.15ex\hbox{C}over\lower.15ex\hbox{]}}}
 
+\setlength{\parindent}{0pt}
+\setlength{\parskip}{8pt}
+\renewcommand{\descriptionlabel}[1]{\hspace{5mm}}
+\setlength{\fboxsep}{0pt}
+\newcounter{partfig}
+
 \begin{document}
     \DocInput{./bookcover.dtx}
 \end{document}
@@ -107,295 +123,279 @@
 % \GetFileInfo{bookcover.cls}
 %
 % \title{{\Huge\BookCover\\[5mm]}
-%        Class for book covers and dust jackets\\[2mm]
-%        \textsf{bookcover.cls}\\
-%        {\large\eifilever\ (\eifiledate)}}
-% \author{Tibor Tómács\\{\normalsize\href{mailto:tomacs.tibor at uni-eszterhazy.hu}{\texttt{tomacs.tibor at uni-eszterhazy.hu}}}}
+%        \textsf{Class for book covers and dust jackets}\\[2mm]
+%        {\large\texttt{bookcover.cls}\\
+%        \eifilever\ (\eifiledate)}}
+% \author{Tibor T\'{o}m\'{a}cs\\{\normalsize\href{mailto:tomacs.tibor at uni-eszterhazy.hu}{\texttt{tomacs.tibor at uni-eszterhazy.hu}}}}
 % \date{}
 % \maketitle
 %
+% \AddToShipoutPictureBG*{\tikz[overlay]\fill[top color=black!50, bottom color=white] (current page.north west) rectangle +(\paperwidth,-11cm);}
+%
 % \section{Introduction}
-% In the following picture we can see a typical dust jacket. Its parts are back flap, back, spine, front and front flap. 
-% Typographically, a book cover is a dust jacket without flaps, the only difference is that the book cover is a fixed part of the book, whereas the dust jacket is removable.
+% In the following picture you can see a typical book cover with flaps, i.e.\ a dust jacket. Its parts are back flap, back cover, spine, front cover and front flap. The dust jacket is removable, whereas a book cover without flaps is a fixed part of the book.
 % \begin{center}
-% \includegraphics{figures/cover}
+% \includegraphics{figures/bookcover-einstein}
 % \end{center}
-% When we prepare a cover for printing, some marks are needed to know where to trim or fold the paper. These marks determine a special area of the sheet, which is called ``bleed'' (see the green area in the next figure). The background will be expanded onto the bleed, taking account of slight inaccuracy when trimming.
+% When you prepare a book cover for printing, some marks are needed to know where to trim or fold the paper. The crop marks determine a special area of the sheet, which is called ``bleed'' (see the green area in the next figure). The background will be expanded onto the bleed, taking account of slight inaccuracy when trimming. If there is no bleed, the likelihood of having a white strip on the edge of the finished product is high. In the next schematics figure, the red lines are the marks. The scissors symbols show the crop marks, and the other ones are the fold marks. The blue frame is the border of the printed area.
 % \begin{center}
-% \includegraphics{figures/coverscheme}
+% \includegraphics{figures/bookcover-scheme}
 % \end{center}
+% The ``wraps'' are the areas between the front cover and front flap, and back cover and back flap (see the gray area in the previous figure). The reason this is defined is that if the front and back covers have background colors or images that continue to the foreedge of each cover, they must continue onto the flap. Because putting the edge of color right at the edge of the board would result in an unsightly boundary line when the book is closed.
+%
 % We get the following result after trimming:
 % \begin{center}
-% \includegraphics{figures/result}
+% \includegraphics{figures/bookcover-result}
 % \end{center}
+% The \texttt{bookcover} document class can be used to create such book covers.
 %
-% \section{Loading class}
-% The class \texttt{bookcover} requires the services of the class \texttt{article} and the following packages:
-% \texttt{kvoptions}, \texttt{geometry}, \texttt{graphicx}, \texttt{calc}, \texttt{ifthen}, \texttt{tikz}, \texttt{environ}, \texttt{fgruler}.
+% \section{Loading class}\label{sec:class}
+% The \texttt{bookcover} class requires the services of the \texttt{article} class and the following packages:
+% \texttt{kvoptions}, \texttt{geometry}, \texttt{graphicx}, \texttt{calc}, \texttt{tikz}, \texttt{xparse}, \texttt{etoolbox}, \texttt{fgruler}.
 %
-% \medskip\noindent
 % Load the class as usual, with
 % \begin{commandlst}
 % \documentclass[!<options>!]{bookcover}
 % \end{commandlst}
 %
+% \medskip The list of \meta{options}:
+%
+% \begin{compactdesc}
+% \item[]\commandinline|coverheight=!<length>!| Cover height (default \texttt{coverheight=240mm}).
+% \item[]\commandinline|coverwidth=!<length>!| Front/back cover width (default \texttt{coverwidth=170mm}).
+% \item[]\commandinline|spinewidth=!<length>!| Spine width (default \texttt{spinewidth=5mm}).
+% \item[]\commandinline|flapwidth=!<length>!| Flap width (default \texttt{flapwidth=0mm}).
+% \item[]\commandinline|wrapwidth=!<length>!| Wrap width (default \texttt{wrapwidth=0mm}). It only has an effect if the flap width is positive.
+% \item[]\commandinline|bleedwidth=!<length>!| Bleed width (default \texttt{bleedwidth=5mm}).
+% \item[]\commandinline|marklength=!<length>!| Mark length (default \texttt{marklength=10mm}).
+% \end{compactdesc}
 % \begin{center}
-% \begin{tabular}{@{}l@{}l@{\hspace{-13mm}}r@{}}
-% \textbf{option}                        & \textbf{description}  & \textbf{default value}\\
-% \hline
-% \commandinline|coverwidth=!<length>!|  & \multirow{6}*{\hspace{-1mm}$\left.\hbox{\rule[-11mm]{0pt}{22mm}}\right\}$ See the next figure}& \texttt{170mm}\\
-% \commandinline|coverheight=!<length>!| & & \texttt{240mm}\\
-% \commandinline|spinewidth=!<length>!|  & &   \texttt{5mm}\\
-% \commandinline|flapwidth=!<length>!|   & &   \texttt{0mm}\\
-% \commandinline|marklength=!<length>!|  & &  \texttt{10mm}\\
-% \commandinline|bleedwidth=!<length>!|  & &   \texttt{5mm}\\
-% \commandinline|markthick=!<length>!|   & Thickness of marks & \texttt{0.4pt}\\
-% \commandinline|markcolor=!<color>!|    & Color of marks     &   \texttt{red}\\
-% \commandinline|10pt|                   & \multirow{3}*{\hspace{-1mm}$\left.\hbox{\rule[-4mm]{0pt}{8mm}}\right\}$ Normal font size (default: \texttt{10pt})}&\\
-% \commandinline|11pt|                   & &\\
-% \commandinline|12pt|                   & &\\
-% \commandinline|trimmed|                & It shows trimmed version&\texttt{false}\\
-% \hline
-% \end{tabular}
+% \includegraphics{figures/bookcover-sizes}
 % \end{center}
-% \begin{center}
-% \includegraphics{figures/sizes}
-% \end{center}
+% \begin{compactdesc}
+% \item[]\commandinline|10pt| (Default.) Normal font size is 10\,pt.
+% \item[]\commandinline|11pt| Normal font size is 11\,pt.
+% \item[]\commandinline|12pt| Normal font size is 12\,pt.
+% \item[]\commandinline|markthick=!<length>!| Thickness of marks (default \texttt{markthick=0.4pt}).
+% \item[]\commandinline|markcolor=!<color name>!| Color of marks (default \texttt{markcolor=red}).
+% \item[]\commandinline|pagecolor=!<color name>!| Color of page (default \texttt{pagecolor=white}).
+% \item[]\commandinline|trimmed| or \commandinline|trimmed=true| Trimmed version for demonstration.
+% \item[]\commandinline|trimmed=false| (Default.) No trimming. Use this for printing!
+% \item[]\commandinline|trimmingcolor=!<color name>!| Color of trimming (default \texttt{trimmingcolor=white}).
+% \end{compactdesc}
 %
-% \noindent\example
-% \begin{examplelst}
-% \documentclass[flapwidth=50mm,spinewidth=15mm]{bookcover}
-% \end{examplelst}
-%
-% \section{Creating book cover}\label{sec:mainmethod}
-% \subsection{Commands and environments}
-% Use \commandinline{bookcover} environment in the body of the document to make a new book cover. In this environment, you can create a component of the book cover by the following command or environment:
+% \section{Commands and environments}
+% Use \commandinline{bookcover} environment in the document body to make a new book cover. If you need to edit both sides of the cover, you can do it with two \texttt{bookcover} environments (see an example in subsection~\ref{subsec-two-sided-example}). You can create a component of the book cover by the following command or environment in the \texttt{bookcover} environment:
 % \begin{commandlst}
-% \bookcovercomponent{!<component type>!}{!<part>!}{!<content>!}
+% \bookcovercomponent{!<component type>!}{!<part>!}[!<left>!,!<bottom>!,!<right>!,!<top>!]{!<content>!}
 % \end{commandlst}
-% or
+% or its equivalent
 % \begin{commandlst}
-% \begin{bookcoverelement}{!<component type>!}{!<part>!}
+% \begin{bookcoverelement}{!<component type>!}{!<part>!}[!<left>!,!<bottom>!,!<right>!,!<top>!]
 % !<content>!
 % \end{bookcoverelement}
 % \end{commandlst}
-% See the subsection~\ref{subsec:componenttypes} for the description of \meta{component type}. You can read the description of \meta{part} in subsection~\ref{subsec:parts-main-method} and section~\ref{sec:illustration-parts}. The \meta{content} depends on the \meta{component type} (see subsection~\ref{subsec:componenttypes}).
+% See the section~\ref{sec:componenttypes} for the description of \meta{component type}. You can read the description of \meta{part} in section~\ref{sec:parts}. The \meta{left}, \meta{bottom}, \meta{right} and \meta{top} are the margins of the \meta{part}. The default value of every margin is \texttt{0mm}. If the \meta{left}, \meta{bottom}, \meta{right} or \meta{top} is empty or space, then its value will be \texttt{0mm}. The \meta{content} depends on the \meta{component type} (see section~\ref{sec:componenttypes}). You can use the following length commands in \meta{content}:
 %
-% \medskip\noindent
+% \begin{compactdesc}
+% \item[]\commandinline{\partwidth} The width of the \meta{part} reduced by \meta{left} and \meta{right}.
+% \item[]\commandinline{\partheight} The height of the \meta{part} reduced by \meta{bottom} and \meta{top}.
+% \end{compactdesc}
+%
 % Every |\bookcovercomponent| command and |bookcoverelement| environment generates a layer on the sheet. The first one generates the bottom layer and the last one generates the top layer.
 %
-% \medskip\noindent
-% The following two examples are equivalent.
+% In the following example we use |\bookcovercomponent| commands.
 %
-% \medskip\noindent\example
+% \example
 % \begin{examplelst}
+% \documentclass[spinewidth=15mm,markcolor=black]{bookcover}
+% \begin{document}
 % \begin{bookcover}
-%     \bookcovercomponent{color}{bg whole}{blue}
-%     \bookcovercomponent{normal}{front}{
-%         \vspace{5cm}
-%         \begin{center}
-%             \bfseries\huge Book title
-%         \end{center}}
+%     \bookcovercomponent{color}{bg whole}{orange}
+%     \bookcovercomponent{normal}{front}[,,,5cm]{\centering\bfseries\huge Book title\par}
 % \end{bookcover}
+% \end{document}
 % \end{examplelst}
 %
-% \noindent\example
+% In the following example we use |bookcoverelement| environments. This example is equivalent to the previous one.
+%
+% \example
 % \begin{examplelst}
+% \documentclass[spinewidth=15mm,markcolor=black]{bookcover}
+% \begin{document}
 % \begin{bookcover}
 %     \begin{bookcoverelement}{color}{bg whole}
-%         blue
+%         orange
 %     \end{bookcoverelement}
-%     \begin{bookcoverelement}{normal}{front}
-%         \vspace{5cm}
-%         \begin{center}
-%             \bfseries\huge Book title
-%         \end{center}
+%     \begin{bookcoverelement}{normal}{front}[,,,5cm]
+%         \centering\bfseries\huge Book title\par
 %     \end{bookcoverelement}
 % \end{bookcover}
+% \end{document}
 % \end{examplelst}
 %
-% \noindent Use \commandinline{bookcoverdescription} environment in the body of the document for adding the description of the book cover and other information. Don't use it in |bookcover| environment! You can set the page geometry of the description by the following command:
+% If the value of the \texttt{trimmed} option is \texttt{true}, then you can set the trimmed part by the following command before any \texttt{bookcover} environment:
 % \begin{commandlst}
-% \bookcoverdescgeometry{!<geometry parameteres>!}
+% \bookcovertrimmedpart{!<trimmed part>!}[!<left>!,!<bottom>!,!<right>!,!<top>!]
 % \end{commandlst}
-% See the \meta{geometry parameteres} in the |geometry| package. Its default value is |margin=1in|. See an example in the subsection~\ref{subsec:desc}.
 %
-% \subsection{Parts}\label{subsec:parts-main-method}
-% It is important, that the background parts are expanded onto the bleed, taking account of slight inaccuracy when trimming!
-% \subsubsection{One-piece background parts}
-% \commandinline{bg back flap}, \commandinline{bg back}, \commandinline{bg spine}, \commandinline{bg front}, \commandinline{bg front flap}
+% Without this command, or if the \meta{trimmed part} is empty or space, then its value will be \texttt{whole} (see section~\ref{sec:parts}). The \meta{left}, \meta{bottom}, \meta{right} and \meta{top} are the margins of the \meta{part}. The default value of every margin is \texttt{0mm}. If the \meta{left}, \meta{bottom}, \meta{right} or \meta{top} is empty or space, then its value will be \texttt{0mm}. The trimmed area will be the \meta{trimmed part} reduced by the margins.
 %
-% \begin{center}
-% \textbf{With flaps}\\*[0pt]
-% \includegraphics{figures/bg1}
-% \end{center}
-% \begin{center}
-% \textbf{Without flaps}\\*[0pt]
-% \includegraphics{figures/bg4}
-% \end{center}
+% You can change some options before any \texttt{bookcover} environment by the following command:
+% \begin{commandlst}
+% \setbookcover{!<options>!}
+% \end{commandlst}
+% The \meta{options} can be as follows: \commandinline|markthick=!<length>!|, \commandinline|markcolor=!<color name>!|, \commandinline|pagecolor=!<color name>!|, \commandinline|trimmed|, \commandinline|trimmed=false|, \commandinline|trimmingcolor=!<color name>!| (see section~\ref{sec:class}). See an example in the subsection~\ref{subsec:trimming}
 %
-% \subsubsection{One-piece foreground parts}
-% \commandinline{back flap}, \commandinline{back}, \commandinline{spine}, \commandinline{front}, \commandinline{front flap}, \commandinline{above back}, \commandinline{above front}, \commandinline{below back}, \commandinline{below front}
+% Use \commandinline{bookcoverdescription} environment in the document body for adding the description of the book cover and other information. Don't use it in |bookcover| environment! You can set the page geometry of the description by the following command:
+% \begin{commandlst}
+% \bookcoverdescgeometry{!<geometry parameteres>!}
+% \end{commandlst}
+% The possible \meta{geometry parameteres} are the same as for |\newgeometry| in the |geometry| package. Its default value is |margin=1in|. Unlike |\newgeometry|, it can be used in the preamble as well. See an example in the subsection~\ref{subsec:desc}.
 %
-% \begin{center}
-% \textbf{With flaps}\\*[0pt]
-% \includegraphics{figures/foreground1}
-% \end{center}
-% \begin{center}
-% \textbf{Without flaps}\\*[0pt]
-% \includegraphics{figures/foreground2}
-% \end{center}
+% You can use the following length commands, which are declared by the options of the document class:
+% \begin{compactdesc}
+% \item[]\commandinline{\coverwidth}
+% \item[]\commandinline{\coverheight}
+% \item[]\commandinline{\spinewidth}
+% \item[]\commandinline{\flapwidth}
+% \item[]\commandinline{\wrapwidth}
+% \item[]\commandinline{\marklength}
+% \item[]\commandinline{\bleedwidth}
+% \end{compactdesc}
 %
-% \subsubsection{Combined parts}
-% The following combined parts are defined. You can see illustrations in the section~\ref{sec:illustration-parts}.
-% \begin{center}
-% \begin{tabular}{@{}>{\color{command}\ttfamily}l@{\hspace{1cm}}>{\color{command}\ttfamily}l@{}}
-% {\rmfamily\bfseries\textcolor{black}{background}}&{\rmfamily\bfseries\textcolor{black}{foreground}}\\
-% \hline
-% bg back and flap            & back and flap\\
-% bg back and spine           & back and spine\\
-% bg front and spine          & front and spine\\
-% bg front and flap           & front and flap\\
-% bg back and flap and spine  & back and flap and spine\\
-% bg front and flap and spine & front and flap and spine\\
-% bg whole without front flap & whole without front flap\\
-% bg whole without back flap  & whole without back flap\\
-% bg whole without flaps      & whole without flaps\\
-% bg whole                    & whole\\
-% whole page                  &
-% \end{tabular}
-% \end{center}
+% \section{Component types}\label{sec:componenttypes}
 %
-% \subsection{Component types}\label{subsec:componenttypes}
-% The following component types are defined: \commandinline{color}, \commandinline{picture}, \commandinline{tikz}, \commandinline{tikz clip}, \commandinline{normal}, \commandinline{center}, \commandinline{ruler}.
-% \subsubsection[color]{Component type: \texttt{color}}
+% Predefined component types: \commandinline{color}, \commandinline{tikz}, \commandinline{tikz clip}, \commandinline{picture}, \commandinline{normal}, \commandinline{center}, \commandinline{ruler}.
+%
+% \subsection{The color component type}
 % It determines the color of the part. The \meta{content} is the options of the |\fill| in the \texttt{tikz} package:
+% \begin{compactdesc}
+% \item[]\commandinline{!<color name>!} (See it in the \texttt{xcolor} package.)
+% \item[]\commandinline{color=!<color name>!} (It is equivalent to the previous one.)
+% \item[]\commandinline{top color=!<color name>!}
+% \item[]\commandinline{bottom color=!<color name>!}
+% \item[]\commandinline{middle color=!<color name>!}
+% \item[]\commandinline{inner color=!<color name>!}
+% \item[]\commandinline{outer color=!<color name>!}
+% \item[]\commandinline{ball color=!<color name>!}
+% \item[]\commandinline{shading angle=!<degree>!} It rotates the shading by the given angle.
+% \item[]\commandinline{opacity=!<value>!} Sets the filling opacity. The \meta{value} is between 0 and 1.
+% \end{compactdesc}
 %
-% \medskip
-% \indent\commandinline{!<color name>!} (See it in the \texttt{xcolor} package.)\\
-% \indent\commandinline{color=!<color name>!} (It is equivalent to the previous one.)\\
-% \indent\commandinline{top color=!<color name>!}\\
-% \indent\commandinline{bottom color=!<color name>!}\\
-% \indent\commandinline{middle color=!<color name>!}\\
-% \indent\commandinline{inner color=!<color name>!}\\
-% \indent\commandinline{outer color=!<color name>!}\\
-% \indent\commandinline{ball color=!<color name>!}\\
-% \indent\commandinline{shading angle=!<degree>!} It rotates the shading by the given angle.
-%
-% \bigskip\noindent\example
+% \example
 % \begin{examplelst}
-% \bookcovercomponent{color}{bg whole without flaps}{red}
+% \begin{bookcover}
+%     \bookcovercomponent{color}{bg front}{red}
+%     \bookcovercomponent{color}{bg back}{
+%         top color=white, bottom color=blue!50!black, shading angle=60}
+% \end{bookcover}
 % \end{examplelst}
 %
-% \noindent\example\ It is equivalent to the previous example.
-% \begin{examplelst}
-% \bookcovercomponent{color}{bg whole without flaps}{color=red}
-% \end{examplelst}
-%
-% \noindent\example
-% \begin{examplelst}
-% \bookcovercomponent{color}{bg whole without flaps}{
-%     top color=white, bottom color=blue!50!black, shading angle=60}
-% \end{examplelst}
-%
-% \subsubsection[picture]{Component type: \texttt{picture}}
-% The \meta{content} is a picture file, which will be rescaled according to the sizes of the \meta{part}.
-%
-% \bigskip\noindent\example
-% \begin{examplelst}
-% \bookcovercomponent{picture}{bg front flap}{fig.png}
-% \end{examplelst}
-%
-% \subsubsection[tikz]{Component type: \texttt{tikz}}
+% \subsection{The tikz component type}
 % The \meta{content} is a Ti\emph{k}Z code without |\tikz| command and |tikzpicture| environment. The origin of the Ti\emph{k}Z figure is the lower left corner of the \meta{part}. Two rectangle nodes come into being: \commandinline{part} and \commandinline{trimmed part}. (Thanks to Zunbeltz Izaola for the idea.)
 %
-% \bigskip\noindent\example
+% \begin{minipage}{\textwidth}
+% \example
 % \begin{examplelst}
+% \begin{bookcover}
 % \bookcovercomponent{tikz}{bg whole}{
 %     \fill[yellow] (part.south west) rectangle (part.north east);
-%     \fill[gray] (trimmed part.south east) rectangle (trimmed part.north west);
-%     \draw[green] (0,0) circle [radius=10mm];}
-% \bookcovercomponent{tikz}{bg spine}{
-%     \fill[orange] (part.center) circle [radius=8mm];}
+%     \fill[gray] (trimmed part.south east) rectangle (trimmed part.north west);}
+% \bookcovercomponent{tikz}{bg front}{
+%     \fill[green] (part.south west) -- (part.center) -- (part.north west) -- cycle;}
+% \end{bookcover}
 % \end{examplelst}
+% \end{minipage}
 % \begin{center}
-% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt}
-% \fcolorbox{black!50}{white}{\includegraphics{figures/tikz}}
+% \fcolorbox{black!50}{white}{\includegraphics{figures/bookcover-tikz}}
 % \end{center}
 %
-% \subsubsection[tikz clip]{Component type: \texttt{tikz clip}}
-% It works the same as the \texttt{tikz} component type, but it clips the \meta{part}.
+% \subsection{The tikz clip component type}
+% It works the same way as the \texttt{tikz} component type, but it clips the \meta{part}.
 %
-% \bigskip\noindent\example
+% \example
 % \begin{examplelst}
-% \bookcovercomponent{tikz clip}{bg whole}{
-%     \fill[yellow] (part.south west) rectangle (part.north east);
-%     \fill[gray] (trimmed part.south east) rectangle (trimmed part.north west);
-%     \draw[green] (0,0) circle [radius=10mm];}
-% \bookcovercomponent{tikz clip}{bg spine}{
-%     \fill[orange] (part.center) circle [radius=8mm];}
+% \begin{bookcover}
+% \bookcovercomponent{tikz clip}{front}{
+%     \fill[green] (part.west) circle [radius=8mm];}
+% \bookcovercomponent{tikz}{front}{
+%     \fill[orange] (part.west) circle [radius=4mm];}
+% \end{bookcover}
 % \end{examplelst}
 % \begin{center}
-% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt}
-% \fcolorbox{black!50}{white}{\includegraphics{figures/tikzclip}}
+% \fcolorbox{black!50}{white}{\includegraphics{figures/bookcover-tikzclip}}
 % \end{center}
 %
-% \subsubsection[normal]{Component type: \texttt{normal}}
+% \subsection{The picture component type}
+% The \meta{content} is a picture file, which will be rescaled according to the sizes of the \meta{part}.
+%
+% \example
+% \begin{examplelst}
+% \begin{bookcover}
+%     \bookcovercomponent{picture}{bg whole}{fig.png}
+% \end{bookcover}
+% \end{examplelst}
+%
+% \subsection{The normal component type}
 % In this case, the \meta{content} is not specific. You can choose it as text or picture etc.
 %
-% \bigskip\noindent\example
+% \example
 % \begin{examplelst}
-% \bookcovercomponent{normal}{front}{
-%     \vspace{5cm}
-%     \begin{center}
+% \begin{bookcover}
+%     \bookcovercomponent{normal}{front}[,,,5cm]{
+%         \centering
 %         {\bfseries\huge Book title}\\[5mm]
-%         \includegraphics[width=6cm]{fig.png}
-%     \end{center}}
+%         \includegraphics[width=0.4\partwidth]{fig.png}\\}
+% \end{bookcover}
 % \end{examplelst}
 %
-% \subsubsection[center]{Component type: \texttt{center}}
-% It works the same as the \texttt{normal} component type, but the position of the content is the center of the part (horizontally and vertically).
+% \subsection{The center component type}
+% It works the same way as the \texttt{normal} component type, but the position of the content is the center of the part horizontally and vertically.
 %
-% \bigskip\noindent\example
+% \example
 % \begin{examplelst}
-% \bookcovercomponent{center}{above front}{
-%     \textcolor{blue}{Remark above front}}
-% \bookcovercomponent{center}{spine}{
-%     \rotatebox[origin=c]{90}{\bfseries\Large Book title}}
+% \begin{bookcover}
+%     \bookcovercomponent{center}{above front}{
+%         \textcolor{blue}{Remark above front}}
+%     \bookcovercomponent{center}{spine}{
+%         \rotatebox[origin=c]{-90}{\bfseries\Large Book title}}
+% \end{bookcover}
 % \end{examplelst}
 %
-% \subsubsection[ruler]{Component type: \texttt{ruler}}
-% Use the \texttt{ruler} component type to check the sizes of the part. The \meta{content} is
+% \subsection{The ruler component type}
+% Use the \texttt{ruler} component type to check the dimensions of the part. It draws a square ruler at the borders of the part. The \meta{content} is
 % \begin{commandlst}
-% \setruler[!<unit>!]{!<coordsys>!}{!<shift x>!}{!<shift y>!}{!<color>!}
+% !<unit>!,!<origin>!,!<color name>!
 % \end{commandlst}
-% \meta{unit} The ruler unit:\\
-% \indent\commandinline{cm} Metric ruler (centimeter). Default value.\\
-% \indent\commandinline{in} English ruler (inch).
 %
-% \medskip\noindent
-% \meta{coordsys} The type of the coordinate system:\\
-% \indent\commandinline{upper left } The origin is the upper left corner of the part.\\
-% \indent\commandinline{upper right} The origin is the upper right corner of the part.\\
-% \indent\commandinline{lower left } The origin is the lower left corner of the part.\\
-% \indent\commandinline{lower right} The origin is the lower right corner of the part.
+% \medskip\meta{unit} The ruler unit:
+% \begin{compactdesc}
+% \item[]\commandinline{cm} Metric ruler (centimeter). If the \meta{unit} is empty or space, then its value will be \texttt{cm}.
+% \item[]\commandinline{in} English ruler (inch).
+% \end{compactdesc}
 %
-% \medskip\noindent
-% \meta{shift x},\meta{shift y} Moving the origin of the ruler to the vector (\meta{shift x},\meta{shift y}).
+% \meta{origin} The origin of the square ruler:
+% \begin{compactdesc}
+% \item[]\commandinline{upperleft } The origin is the upper left corner of the part. Directions: down and right. If the \meta{origin} is empty or space, then its value will be \texttt{upperleft}.
+% \item[]\commandinline{upperright} The origin is the upper right corner of the part. Directions: down and left.
+% \item[]\commandinline{lowerleft } The origin is the lower left corner of the part. Directions: up and right.
+% \item[]\commandinline{lowerright} The origin is the lower right corner of the part. Directions: up and left.
+% \end{compactdesc}
 %
-% \medskip\noindent
-% \meta{color} The color of the ruler.
+% \meta{color name} The color of the ruler. If it is empty or space, then its value will be the color of the marks.
 %
-% \bigskip\noindent\example
+% \example
 % \begin{examplelst}
-% \bookcovercomponent{ruler}{back}{\setruler{upper left}{0cm}{0cm}{blue}}
-% \bookcovercomponent{ruler}{back}{\setruler{upper left}{2cm}{1cm}{black}}
-% \bookcovercomponent{ruler}{front}{\setruler{lower right}{0cm}{0cm}{green}}
-% \bookcovercomponent{ruler}{front}{\setruler{lower right}{2cm}{1cm}{gray}}
+% \begin{bookcover}
+%     \bookcovercomponent{ruler}{back}{,,}
+%     \bookcovercomponent{ruler}{back}[2cm,,,1cm]{,,blue}
+%     \bookcovercomponent{ruler}{front}{,lowerright,green}
+%     \bookcovercomponent{ruler}{front}[,1cm,2cm,]{,lowerright,gray}
+% \end{bookcover}
 % \end{examplelst}
 % \begin{center}
-% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt}
-% \fcolorbox{black!50}{white}{\includegraphics{figures/ruler}}
+% \fcolorbox{black!50}{white}{\includegraphics{figures/bookcover-ruler}}
 % \end{center}
 %
 % \subsection{Defining component type}
@@ -404,39 +404,115 @@
 % \newbookcovercomponenttype{!<new component type name>!}{!<formatting>!}
 % \renewbookcovercomponenttype{!<defined component type name>!}{!<formatting>!}
 % \newnamebookcovercomponenttype{!<new component type name>!}{!<defined component type name>!}
+% \letnamebookcovercomponenttype{!<new component type name>!}{!<defined component type name>!}
 % \end{commandlst}
+%
+% \medskip Using |\newnamebookcovercomponenttype|, the definition of \meta{new component type name} and \meta{defined component type name} are always the same, even if you redefine \meta{defined component type name} later with |\renewbookcovercomponenttype|.
+%
+% Using |\letnamebookcovercomponenttype|, the definition of \meta{new component type name} is the same as the current definition of \meta{defined component type name}. If you change \meta{defined component type name} later with |\renewbookcovercomponenttype|, \meta{new component type name} doesn't change with it.
+%
 % You can use the following length commands in \meta{formatting}:
 %
-% \medskip\noindent
-% \commandinline{\partwidth  } Width of the part.\\
-% \commandinline{\partheight } Height of the part.
+% \begin{compactdesc}
+% \item[]\commandinline{\partwidth} The width of the part (reduced by the margins) in which you are using the defined component type.
+% \item[]\commandinline{\partheight} The height of the part (reduced by the margins) in which you are using the defined component type.
+% \end{compactdesc}
 %
-% \bigskip\noindent
 % You have to referrence the content as \verb|#1|. 
 %
-% \bigskip\noindent\example
+% \example
 % \begin{examplelst}
-% \documentclass[spinewidth=1cm]{bookcover}
-% \newbookcovercomponenttype{center rotate}{
-%     \parbox[t][\partheight][c]{\partwidth}{
-%         \begin{center}
-%             \rotatebox[origin=c]{90}{#1}
-%         \end{center}}}
+% \documentclass{bookcover}
+% \newbookcovercomponenttype{center picture}{
+%     \vfill
+%     \centering
+%     \includegraphics[width=0.5\partwidth]{#1}
+%     \vfill}
 % \begin{document}
 % \begin{bookcover}
-%      \bookcovercomponent{center rotate}{spine}{Author -- Book title}
+%     \bookcovercomponent{center picture}{front}{fig.pdf}
 % \end{bookcover}
 % \end{document}
 % \end{examplelst}
 %
+% \section{Parts}\label{sec:parts}
+%
+% Each predefined part is illustrated below. The background parts are expanded onto the bleed, taking account of slight inaccuracy when trimming. In contrast, the foreground parts do not extend onto the bleed. The names of the background parts start with \commandinline{bg}.
+%
+% If your book will also have printing on the inside cover, the layout for the inside cover will be the exact opposite of the outside cover. Therefore, these parts also have synonymous names. The synonymous names contain \commandinline{inside front} instead of \commandinline{back} and \commandinline{inside back} instead of \commandinline{front}. For example \commandinline{bg front} is the same as \commandinline{bg inside back}, \commandinline{above back} is the same as \commandinline{above inside front}, etc.
+%
+% You can also use short names to specify foreground and background parts. The elements of the abbreviations are as follows:
+% \begin{compactdesc}
+% \item[]\commandinline{F}: flap
+% \item[]\commandinline{W}: wrap
+% \item[]\commandinline{C}: cover
+% \item[]\commandinline{S}: spine
+% \item[]\commandinline{l}: left (a part to the left of the spine)
+% \item[]\commandinline{r}: right (a part to the right of the spine)
+% \end{compactdesc}
+% For example \commandinline{lC} is the abbreviation of the left cover, i.e.\ the back cover of the outside cover, or the inside front cover of the inside cover. It is not extended onto the bleed, i.e.\ it is a foreground part. If you want to extend that part onto the bleed, type \commandinline{bg} and then a space in the front of the name. For example \commandinline{bg lC} is the left cover extended onto the bleed. Use a hyphen to specify multi-piece parts. For example \commandinline{lW-S} is the part from the left wrap to the spine, which is not extended onto the bleed.
+% 
+% The following figures also show the normal and abbreviated names of the yellow parts.
+%
+% \subsection{Book cover widthout flaps, background parts}
+%
+% \setcounter{partfig}{1}
+% \loop
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\hfill\stepcounter{partfig}
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\par\smallskip\stepcounter{partfig}
+% \ifnum\value{partfig}<7\repeat
+%
+% \subsection{Book cover widthout flaps, foreground parts}
+%
+% \loop
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\hfill\stepcounter{partfig}
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\par\smallskip\stepcounter{partfig}
+% \ifnum\value{partfig}<13\repeat
+%
+% \subsection{Book cover widthout flaps, other parts}
+%
+% \loop
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\hfill\stepcounter{partfig}
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\par\smallskip\stepcounter{partfig}
+% \ifnum\value{partfig}<17\repeat
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\stepcounter{partfig}
+%
+% \subsection{Book cover width flaps, background parts}
+%
+% \loop
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\hfill\stepcounter{partfig}
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\par\smallskip\stepcounter{partfig}
+% \ifnum\value{partfig}<46\repeat
+%
+% \subsection{Book cover width flaps, foreground parts}
+%
+% \loop
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\hfill\stepcounter{partfig}
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\par\smallskip\stepcounter{partfig}
+% \ifnum\value{partfig}<74\repeat
+%
+% \subsection{Book cover width flaps, other parts}
+%
+% \loop
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\hfill\stepcounter{partfig}
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}\par\smallskip\stepcounter{partfig}
+% \ifnum\value{partfig}<78\repeat
+% \fbox{\includegraphics[page=\thepartfig]{figures/bookcover-parts.pdf}}
+%
 % \subsection{Defining part}
-% You can define a new part, redefine or rename a defined part with the following commands:
+% You can define a new rectangular part, redefine or rename a defined part with the following commands:
 % \begin{commandlst}
 % \newbookcoverpart{!<new part name>!}{!<setting>!}
 % \renewbookcoverpart{!<defined part name>!}{!<setting>!}
 % \newnamebookcoverpart{!<new part name>!}{!<defined part name>!}
+% \letnamebookcoverpart{!<new part name>!}{!<defined part name>!}
 % \end{commandlst}
-% In \meta{setting} you have to set the new part sizes, the coordinates of its upper left corner (the origin is the upper left corner of the printed box), and the parameters of the \texttt{trimmed part} rectangle node in \texttt{tikz} and \texttt{tikz clip} component types. For this purpose, use the following commands:
+%
+% \medskip Using |\newnamebookcoverpart|, the definition of \meta{new part name} and \meta{defined part name} are always the same, even if you redefine \meta{defined part name} later with |\renewbookcoverpart|.
+%
+% Using |\letnamebookcoverpart|, the definition of \meta{new part name} is the same as the current definition of \meta{defined part name}. If you change \meta{defined part name} later with |\renewbookcoverpart|, \meta{new part name} doesn't change with it.
+%
+% In \meta{setting} you have to set the new part sizes, the coordinates of its upper left corner (the origin is the upper left corner of the printed area), and the parameters of the \texttt{trimmed part} rectangle node in \texttt{tikz} and \texttt{tikz clip} component types. For this purpose, use the following commands:
 % \begin{commandlst}
 % \setpartposx{!<coord x>!}
 % \setpartposy{!<coord y>!}
@@ -445,20 +521,27 @@
 % \settrimmedpart{!<width minus>!}{!<height minus>!}{!<shift x>!}{!<shift y>!}
 % \end{commandlst}
 %
-%\begin{center}
-%\includegraphics{./figures/newpart}
-%\end{center}
+% \begin{center}
+% \includegraphics{./figures/bookcover-newpart}
+% \end{center}
 %
-% \noindent To give the previous lengths, you can use the following length commands:
+% To give the previous lengths, you can use the following length commands, which are declared by the options of the document class:
 %
-% \medskip\noindent
-% \commandinline{\marklength \bleedwidth \flapwidth \coverwidth \spinewidth \coverheight}
+% \begin{compactdesc}
+% \item[]\commandinline{\coverwidth}
+% \item[]\commandinline{\coverheight}
+% \item[]\commandinline{\spinewidth}
+% \item[]\commandinline{\flapwidth}
+% \item[]\commandinline{\wrapwidth}
+% \item[]\commandinline{\marklength}
+% \item[]\commandinline{\bleedwidth}
+% \end{compactdesc}
 %
-% \bigskip\noindent\example
+% \example
 % \begin{examplelst}
-% \documentclass[flapwidth=3cm]{bookcover}
+% \documentclass[flapwidth=3cm]{bookcover} % Also try it with flapwidth=0cm option!
 % \newbookcoverpart{bg half front}{
-%     \setpartposx{\marklength+\bleedwidth+\flapwidth+\spinewidth+1.5\coverwidth}
+%     \setpartposx{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\spinewidth+1.5\coverwidth}
 %     \setpartposy{\marklength}
 %     \setpartheight{\coverheight+2\bleedwidth}
 %     \ifdim\flapwidth>0mm
@@ -476,78 +559,123 @@
 % \end{document}
 % \end{examplelst}
 %
-% \includepdfset{nup=2x5,delta=4mm 4mm,noautoscale,frame}
-% \includepdf[pages=1-10,pagecommand={\section{Illustration of the predefined parts}\label{sec:illustration-parts}\subsection{Background parts (cover width flaps)}}]{figures/parts.pdf}
-% \includepdf[pages=11-16,pagecommand={}]{figures/parts.pdf}
-% \includepdf[pages=36-42,pagecommand={\subsection{Background parts (cover widthout flaps)}}]{figures/parts.pdf}
-% \includepdf[pages=17-26,pagecommand={\subsection{Foreground parts (cover width flaps)}}]{figures/parts.pdf}
-% \includepdf[pages=27-35,pagecommand={}]{figures/parts.pdf}
-% \includepdf[pages=43-52,pagecommand={\subsection{Foreground parts (cover widthout flaps)}}]{figures/parts.pdf}
-%
-% \newpage\section{Examples}
+% \section{Examples}
 % \subsection{A dust jacket}
 % \begin{center}
-% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt}
-% \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-.8pt]{bookcover-example1}}\label{page:example1}
+% \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-.8pt]{bookcover-example1}}
 % \end{center}
 % \lstinputlisting[style=examplefile]{bookcover-example1.tex}
 %
-% \newpage\subsection{A two-sided book cover}
-% \begin{center}
-% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt}%
-% \fcolorbox{black!50}{white}{\includegraphics[page=1,width=\textwidth-.8pt]{bookcover-example2}}\\[5mm]
-% \fcolorbox{black!50}{white}{\includegraphics[page=2,width=\textwidth-.8pt]{bookcover-example2}}
-% \end{center}
-% \newpage\lstinputlisting[style=examplefile]{bookcover-example2.tex}
-%
 % \subsection{Barcode}
 % \begin{center}
-% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt}
-% \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-.8pt]{figures/barcode}}
+% \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-.8pt]{figures/bookcover-barcode}}
 % \end{center}
 % \begin{examplelst}
 % \documentclass{bookcover}
+% % The pdflatex or lualatex should be called with the -shell-escape option.
+% % The next line is only required for pdflatex and lualatex.
+% \usepackage[pdfcrop={-hires}]{auto-pst-pdf}
 % \usepackage{pst-barcode}
 % \begin{document}
 % \begin{bookcover} 
-%     \bookcovercomponent{normal}{back}{
+%     \bookcovercomponent{normal}{back}[0mm,5mm,0mm,0mm]{
 %         \vfill
 %         \centering
 %         \begin{pspicture}(1.5in,1in)
 %             \psbarcode{1787-6117}{includetext height=1 width=1.5}{issn}
-%         \end{pspicture}
-%         \vspace{5mm}}
+%         \end{pspicture}}
 % \end{bookcover}
 % \end{document}
 % \end{examplelst}
 %
-% \noindent You can compile this file with \texttt{latex} or \texttt{xelatex}. Using \texttt{pdflatex} or \texttt{lualatex}, write the following code into the preamble:
+% \subsection{A two-sided book cover}\label{subsec-two-sided-example}
+% \begin{center}
+% \fcolorbox{black!50}{white}{\includegraphics[page=1,width=\textwidth-.8pt]{bookcover-example2}}\\[5mm]
+% \fcolorbox{black!50}{white}{\includegraphics[page=2,width=\textwidth-.8pt]{bookcover-example2}}
+% \end{center}
+% \lstinputlisting[style=examplefile]{bookcover-example2.tex}
+%
+% \subsection{Trimming and checking dimensions}\label{subsec:trimming}
+%
+% The next example shows the usage of the \texttt{trimmed} option and the |\bookcovertrimmedpart| command. These allow you to view the finished product for demonstration purposes. We also check the cover dimensions. Set the value of the \texttt{trimmed} option \texttt{false} and clear \texttt{ruler} component type before printing!
+%
+% \medskip
 % \begin{examplelst}
-% \usepackage[pdfcrop={-hires}]{auto-pst-pdf}
+% \documentclass[markcolor=black,spinewidth=15mm,trimmed,trimmingcolor=gray]{bookcover}
+% \usepackage[latin]{babel}
+% \usepackage{lipsum,microtype}
+% 
+% \begin{document}
+%
+% % Trimmed outside cover
+% \begin{bookcover}
+% 
+% \bookcovercomponent{color}{bg whole}{
+%     top color=white, bottom color=green!30!black}
+% 
+% \bookcovercomponent{normal}{front}[22mm,60mm,22mm,70mm]{
+%     \centering
+%     {\huge\bfseries ANNALES\\ INFORMATICAE\par}
+%     \vfill
+%     {\large\bfseries TOMUS 43.~(2020)}
+%     \vfill
+%     {\large COMMISSIO REDACTORIUM}\\[3mm]
+%     \lipsum[2]}
+% 
+% \bookcovercomponent{normal}{back}[22mm,10mm,22mm,30mm]{
+%     {\centering\large ABSTRACTUM\\[5mm]}
+%     \lipsum[1-4]}
+% 
+% \bookcovercomponent{center}{spine}{
+%     \rotatebox[origin=c]{-90}{\footnotesize\bfseries
+%         ANNALES INFORMATICAE 43.~(2020)}}
+% 
+% \bookcovercomponent{ruler}{whole}{,,} % Check dimensions
+%
+% \end{bookcover}
+% 
+% % Trimmed inside back cover
+% \setbookcover{trimmingcolor=black,markcolor=white}
+% \bookcovertrimmedpart{inside back}
+% 
+% \begin{bookcover}
+% 
+% \bookcovercomponent{normal}{inside back}[22mm,10mm,22mm,30mm]{
+%     {\centering\large GRATULATIO\\[5mm]}
+%     \lipsum[1-4]}
+% 
+% \end{bookcover}
+% 
+% \end{document}
 % \end{examplelst}
-% In this case, the \texttt{pdflatex} or \texttt{lualatex} must be called with the \texttt{-shell-escape} option.
 %
+% \newpage\begin{center}
+% \fcolorbox{black!50}{white}{\includegraphics[page=1,width=\textwidth-.8pt]{figures/bookcover-trimming}}\\[5mm]
+% \fcolorbox{black!50}{white}{\includegraphics[page=2,width=\textwidth-.8pt]{figures/bookcover-trimming}}
+% \end{center}% 
 % \subsection{Adding description}\label{subsec:desc}
 % \begin{examplelst}
 % \documentclass{bookcover}
 % \usepackage[latin]{babel}
-% \usepackage{lipsum,multicol}
+% \usepackage{lipsum,multicol,microtype}
 % \bookcoverdescgeometry{vmargin=25mm,hmargin=9cm}
 % 
 % \begin{document}
 % 
+% % Description text
 % \begin{bookcoverdescription}
-% \title{Description}
-% \author{John Taylor}
-% \date{}
-% \maketitle
-% \begin{multicols}{3}
-% \lipsum
-% \end{multicols}
+%     \title{Description}
+%     \author{John Taylor}
+%     \date{}
+%     \maketitle
+%     \begin{multicols}{3}
+%         \lipsum
+%     \end{multicols}
 % \end{bookcoverdescription}
 % 
+% % Book cover
 % \begin{bookcover}
-% % book cover components
+%     \bookcovercomponent{center}{front}{\Huge TITULUS LIBRIA}
 % \end{bookcover}
 % 
 % \end{document}
@@ -568,10 +696,13 @@
 \DeclareStringOption[240mm]{coverheight}
 \DeclareStringOption[5mm]{spinewidth}
 \DeclareStringOption[0mm]{flapwidth}
+\DeclareStringOption[0mm]{wrapwidth}
 \DeclareStringOption[10mm]{marklength}
 \DeclareStringOption[.4pt]{markthick}
 \DeclareStringOption[5mm]{bleedwidth}
 \DeclareStringOption[red]{markcolor}
+\DeclareStringOption[white]{pagecolor}
+\DeclareStringOption[white]{trimmingcolor}
 \DeclareBoolOption[false]{trimmed}
 \ProcessKeyvalOptions{bookcover}
 
@@ -578,7 +709,7 @@
 %% CLASS AND PACKAGES
 
 \LoadClass{article}
-\RequirePackage{geometry,graphicx,calc,ifthen,tikz,environ}
+\RequirePackage{geometry,graphicx,calc,tikz,xparse,etoolbox}
 \RequirePackage[nonefgrulers]{fgruler}
 
 %% PAGE STYLE
@@ -596,6 +727,7 @@
 \newlength{\coverheight}
 \newlength{\spinewidth}
 \newlength{\flapwidth}
+\newlength{\wrapwidth}
 \newlength{\marklength}
 \newlength{\markthick}
 \newlength{\bleedwidth}
@@ -611,8 +743,6 @@
 \newlength{\bookcover at tikz@trimmed at part@height at minus}
 \newlength{\bookcover at tikz@trimmed at part@push at right}
 \newlength{\bookcover at tikz@trimmed at part@push at up}
-\newlength{\bookcover at rulerwidth@}
-\newlength{\bookcover at rulerheight@}
 \let\partheight\bookcover at partheight@
 \let\partwidth\bookcover at partwidth@
 
@@ -622,6 +752,8 @@
 \setlength{\coverheight}{\bookcover at coverheight}
 \setlength{\spinewidth}{\bookcover at spinewidth}
 \setlength{\flapwidth}{\bookcover at flapwidth}
+\setlength{\wrapwidth}{\bookcover at wrapwidth}
+\ifdim\flapwidth=0pt\setlength{\wrapwidth}{0pt}\fi
 \setlength{\marklength}{\bookcover at marklength}
 \setlength{\markthick}{\bookcover at markthick}
 \setlength{\bleedwidth}{\bookcover at bleedwidth}
@@ -630,7 +762,7 @@
 
 \geometry{%
     margin=0pt,
-    paperwidth=2\marklength+2\bleedwidth+2\coverwidth+2\flapwidth+\spinewidth,
+    paperwidth=2\marklength+2\bleedwidth+2\coverwidth+2\flapwidth+2\wrapwidth+\spinewidth,
     paperheight=2\marklength+2\bleedwidth+\coverheight}
 
 %% INTERNAL LENGTHS SETTING
@@ -650,6 +782,12 @@
 \let\setpartheight\bookcover at partheight
 \let\settrimmedpart\bookcover at tikz@trimmed at part@param
 
+%% SETBOOKCOVER
+
+\def\setbookcover#1{%
+    \setkeys{bookcover}{#1}%
+    \setlength{\markthick}{\bookcover at markthick}}
+
 %% BOOKCOVERDESCGEOMETRY
 
 \def\bookcoverdescgeometry#1{\def\bookcover at descgeometry{#1}}
@@ -664,209 +802,180 @@
 
 %% POSBOX
 
-\newcommand{\bookcover at posbox}[4]{%
-    \setlength{\bookcover at templength@}{#3}%
-    \put(#2,-\bookcover at templength@){\parbox[b][0pt][t]{#1}{#4}}}
+\newcommand{\bookcover at posbox}[5]{%
+    \setlength{\bookcover at templength@}{#4}%
+    \put(#3,-\bookcover at templength@){%
+        \parbox[b][0pt][t]{#1}{%
+            \parbox[t][#2][t]{#1}{#5}}}}
 
 %% MARKS
 
-\def\bookcover at vmark{%
-    \bookcover at posbox{\bookcover at partwidth@}{\bookcover at xpos@}{\bookcover at ypos@}{%
-        {\color{\bookcover at markcolor}\rule[0pt]{\markthick}{\marklength}}}}
+\def\bookcover at marks{\bookcovercomponent{bookcovertype at tikz}{bookcoverpart at wholepage}{
+    \begin{scope}[line width=\markthick,\bookcover at markcolor]
+        \draw (\marklength+\bleedwidth,0mm) -- +(0mm,\marklength);
+        \ifdim\flapwidth>0mm\draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth,0) -- +(0,\marklength);\fi
+        \draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth,0) -- +(0,\marklength);
+        \draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth,0) -- +(0,\marklength);
+        \ifdim\flapwidth>0mm\draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth,0) -- +(0,\marklength);\fi
+        \draw (\marklength+\bleedwidth+2\flapwidth+2\wrapwidth+2\coverwidth+\spinewidth,0) -- +(0,\marklength);
+        \draw (\marklength+\bleedwidth,\paperheight) -- +(0,-\marklength);
+        \ifdim\flapwidth>0mm\draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth,\paperheight) -- +(0,-\marklength);\fi%
+        \draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth,\paperheight) -- +(0,-\marklength);
+        \draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth,\paperheight) -- +(0,-\marklength);
+        \ifdim\flapwidth>0mm\draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth,\paperheight) -- +(0,-\marklength);\fi
+        \draw (\marklength+\bleedwidth+2\flapwidth+2\wrapwidth+2\coverwidth+\spinewidth,\paperheight) -- +(0,-\marklength);
+        \draw (0,\paperheight-\marklength-\bleedwidth) -- +(\marklength,0);
+        \draw (0,\marklength+\bleedwidth) -- +(\marklength,0);
+        \draw (\paperwidth,\paperheight-\marklength-\bleedwidth) -- +(-\marklength,0);
+        \draw (\paperwidth,\marklength+\bleedwidth) -- +(-\marklength,0);
+    \end{scope}}}
 
-\def\bookcover at hmark{%
-    \bookcover at posbox{\bookcover at partwidth@}{\bookcover at xpos@}{\bookcover at ypos@}{%
-        {\color{\bookcover at markcolor}\rule[0pt]{\marklength}{\markthick}}}}
+%% TRIMMING
 
-\def\bookcover at marks{
-    \bookcover at ypos{0mm}
-    \bookcover at partwidth{\markthick}
-    \bookcover at xpos{\marklength+\bleedwidth-.5\markthick}
-    \bookcover at vmark
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+2\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at ypos{\paperheight-\marklength}
-    \bookcover at partwidth{\markthick}
-    \bookcover at xpos{\marklength+\bleedwidth-.5\markthick}
-    \bookcover at vmark
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+2\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{0mm}
-    \bookcover at partwidth{\marklength}
-    \bookcover at ypos{\marklength+\bleedwidth-.5\markthick}
-    \bookcover at hmark
-    \bookcover at ypos{\marklength+\bleedwidth+\coverheight-.5\markthick}
-    \bookcover at hmark
-    \bookcover at xpos{\paperwidth-\marklength}
-    \bookcover at partwidth{\marklength}
-    \bookcover at ypos{\marklength+\bleedwidth-.5\markthick}
-    \bookcover at hmark
-    \bookcover at ypos{\marklength+\bleedwidth+\coverheight-.5\markthick}
-    \bookcover at hmark}
+\def\bookcover at trimming@part{%
+    \expandafter\ifblank\expandafter{\bookcover at trimmedpart}{\def\bookcover at trimmedpart{bookcoverpart at whole}}{}%
+    \@ifundefined{bookcover at part@param@\bookcover at trimmedpart}{\@latexerr{Part '\bookcover at trimmedpart' is undefined.}{}}{%
+        \begingroup%
+        \csname bookcover at part@param@\bookcover at trimmedpart\endcsname%
+        \expandafter\bookcover at setpartmargin\expandafter(\bookcover at trimmedmargin)%
+        \ifdim\bookcover at partwidth@>0mm
+            \ifdim\bookcover at partheight@>0mm
+                \bookcover at posbox{\paperwidth}{\paperheight}{0mm}{0mm}{%
+                    \begin{tikzpicture}
+                        \begin{scope}[\bookcover at trimmingcolor]
+                        \fill (0,0) rectangle (\paperwidth,\paperheight-\bookcover at ypos@-\bookcover at partheight@);
+                        \fill (0,\paperheight) rectangle (\paperwidth,\paperheight-\bookcover at ypos@);
+                        \fill (0,0) rectangle (\bookcover at xpos@,\paperheight);
+                        \fill (\bookcover at xpos@+\bookcover at partwidth@,0) rectangle (\paperwidth,\paperheight);
+                        \end{scope}
+                    \end{tikzpicture}}\fi\fi
+        \endgroup}}
 
-%% TRIMMING
+\NewDocumentCommand{\bookcovertrimmedpart}{ m O{,,,} }{\def\bookcover at trimmedpart{#1}\def\bookcover at trimmedmargin{#2}}
+\def\bookcover at trimmedpart{bookcoverpart at whole}
+\def\bookcover at trimmedmargin{,,,}
 
-\def\bookcover at trimming{%
-    \bookcover at posbox{\paperwidth}{0mm}{0mm}{%
-        \begin{tikzpicture}
-            \begin{scope}[color=white]
-                \fill(0,0)--
-                     (\paperwidth,0)--
-                     (\paperwidth,\marklength+\bleedwidth)--
-                     (0,\marklength+\bleedwidth)--cycle;
-                \fill(0,\paperheight)--
-                     (\paperwidth,\paperheight)--
-                     (\paperwidth,\paperheight-\marklength-\bleedwidth)--
-                     (0,\paperheight-\marklength-\bleedwidth)--cycle;
-                \fill(0,0)--
-                     (\marklength+\bleedwidth,0)--
-                     (\marklength+\bleedwidth,\paperheight)--
-                     (0,\paperheight)--cycle;
-                \fill(\paperwidth-\marklength-\bleedwidth,0)--
-                     (\paperwidth,0)--
-                     (\paperwidth,\paperheight)--
-                     (\paperwidth-\marklength-\bleedwidth,\paperheight)--cycle;
-            \end{scope}
-            \draw[color=\bookcover at markcolor,line width=\markthick]
-                 (\marklength+\bleedwidth,\marklength+\bleedwidth)--
-                 (\paperwidth-\marklength-\bleedwidth,\marklength+\bleedwidth)--
-                 (\paperwidth-\marklength-\bleedwidth,\paperheight-\marklength-\bleedwidth)--
-                 (\marklength+\bleedwidth,\paperheight-\marklength-\bleedwidth)--cycle;
-        \end{tikzpicture}}
-    \bookcover at ypos{\bleedwidth}
-    \bookcover at partwidth{\markthick}
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
-        \bookcover at vmark
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at ypos{\paperheight-\marklength-\bleedwidth}
-    \bookcover at partwidth{\markthick}
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
-        \bookcover at vmark
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark}
-
 %% BOOKCOVER ENVIRONMENT
 
 \def\bookcover{%
     \@inbookcoverenvtrue%
     \newpage%
+    \pagecolor{\bookcover at pagecolor}
     \noindent%
     \begin{picture}(\paperwidth,\paperheight)(0,-\paperheight)}
 
 \def\endbookcover{%
+    \ifbookcover at trimmed\bookcover at trimming@part\fi%
     \bookcover at marks%
-    \ifbookcover at trimmed\bookcover at trimming\fi%
     \end{picture}%
-    \@inbookcoverenvfalse}
+    \par\@inbookcoverenvfalse}
 
 %% BOOKCOVER COMPONENT
 
-\long\def\bookcovercomponent#1#2#3{
-    \if at inbookcoverenv\else
-        \@latexerr{\string\bookcovercomponent\space is not in 'bookcover' environment.}{}\fi
-    \bookcover at xpos{0pt}
-    \bookcover at ypos{0pt}
-    \bookcover at partwidth{0pt}
-    \bookcover at partheight{0pt}
-    \bookcover at tikz@trimmed at part@param{0pt}{0pt}{0pt}{0pt}
-    \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' undefined.}{}}{
-        \@ifundefined{bookcover at componenttype@#1}{\@latexerr{Component type '#1' undefined.}{}}{
-            \ifx\@empty#3\else
-                \csname bookcover at part@param@#2\endcsname
-                \ifdim\bookcover at partwidth@>0mm
-                    \ifdim\bookcover at partheight@>0mm
-                        \csname bookcover at componenttype@#1\endcsname{#3}\fi\fi\fi}}}
+\def\bookcover at setpartmargin(#1,#2,#3,#4){%
+    \ifblank{#1}{}{%
+        \addtolength{\bookcover at xpos@}{#1}%
+        \addtolength{\bookcover at partwidth@}{-#1}}%
+    \ifblank{#2}{}{%
+        \addtolength{\bookcover at partheight@}{-#2}}%
+    \ifblank{#3}{}{%
+        \addtolength{\bookcover at partwidth@}{-#3}}%
+    \ifblank{#4}{}{%
+        \addtolength{\bookcover at ypos@}{#4}%
+        \addtolength{\bookcover at partheight@}{-#4}}}
 
+\NewDocumentCommand{\bookcovercomponent}{ m m O{,,,} +m }{%
+    \if at inbookcoverenv\else%
+        \@latexerr{Use \string\bookcovercomponent\space or 'bookcoverelement' in 'bookcover' environment!}{}\fi%
+    \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' is undefined.}{}}{%
+        \@ifundefined{bookcover at componenttype@#1}{\@latexerr{Component type '#1' is undefined.}{}}{%
+            \ifblank{#4}{}{%
+                \begingroup%
+                \csname bookcover at part@param@#2\endcsname%
+                \bookcover at setpartmargin(#3)%
+                \ifdim\bookcover at partwidth@>0mm%
+                    \ifdim\bookcover at partheight@>0mm%
+                        \csname bookcover at componenttype@#1\endcsname{#4}\fi\fi%
+                \endgroup}}}}
+
 %% BOOKCOVERELEMENT ENVIRONMENT
 
-\NewEnviron{bookcoverelement}[2]{\bookcovercomponent{#1}{#2}{\BODY}}
+\NewDocumentEnvironment{bookcoverelement}{ m m O{,,,} +b }{\bookcovercomponent{#1}{#2}[#3]{#4}}
 
 %% NEW BOOKCOVER PART
 
-\def\newbookcoverpart#1#2{
-    \@ifundefined{bookcover at part@param@#1}{
+\def\newbookcoverpart#1#2{%
+    \@ifundefined{bookcover at part@param@#1}{%
         \expandafter\def\csname bookcover at part@param@#1\endcsname{#2}}
-    {\@latexerr{Part '#1' already defined.}{}}}
+    {\@latexerr{Part '#1' is already defined.}{}}}
 
 %% RENEW BOOKCOVER PART
 
-\def\renewbookcoverpart#1#2{
-    \@ifundefined{bookcover at part@param@#1}{\@latexerr{Part '#1' undefined.}{}}{
+\def\renewbookcoverpart#1#2{%
+    \ifstrequal{#1}{bookcoverpart at wholepage}{\@latexerr{Part '#1' is protected.}{}}%
+    \ifstrequal{#1}{bookcoverpart at whole}{\@latexerr{Part '#1' is protected.}{}}%
+    \@ifundefined{bookcover at part@param@#1}{\@latexerr{Part '#1' is undefined.}{}}{%
         \expandafter\def\csname bookcover at part@param@#1\endcsname{#2}}}
 
 %% NEW NAME BOOKCOVER PART
 
-\def\newnamebookcoverpart#1#2{
-    \@ifundefined{bookcover at part@param@#1}{
-        \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' undefined.}{}}{
+\def\newnamebookcoverpart#1#2{%
+    \@ifundefined{bookcover at part@param@#1}{%
+        \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' is undefined.}{}}{%
             \expandafter\def\csname bookcover at part@param@#1\endcsname{%
                 \csname bookcover at part@param@#2\endcsname}}}
-    {\@latexerr{Part '#1' already defined.}{}}}
+    {\@latexerr{Part '#1' is already defined.}{}}}
 
+%% LET NAME BOOKCOVER PART
+
+\def\letnamebookcoverpart#1#2{%
+    \@ifundefined{bookcover at part@param@#1}{%
+        \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' is undefined.}{}}{%
+            \csletcs{bookcover at part@param@#1}{bookcover at part@param@#2}}}
+    {\@latexerr{Part '#1' is already defined.}{}}}
+
 %% NEW BOOKCOVER COMPONENT TYPE
 
 \def\newbookcovercomponenttype#1#2{%
     \@ifundefined{bookcover at componenttype@#1}{%
         \long\expandafter\def\csname bookcover at componenttype@#1\endcsname##1{%
-        \bookcover at posbox{\bookcover at partwidth@}{\bookcover at xpos@}{\bookcover at ypos@}{#2}}}
-    {\@latexerr{Component type '#1' already defined.}{}}}
+        \bookcover at posbox{\bookcover at partwidth@}{\bookcover at partheight@}{\bookcover at xpos@}{\bookcover at ypos@}{#2}}}
+    {\@latexerr{Component type '#1' is already defined.}{}}}
 
 %% RENEW BOOKCOVER COMPONENT TYPE
 
 \def\renewbookcovercomponenttype#1#2{%
-    \@ifundefined{bookcover at componenttype@#1}{\@latex at error{Component type '#1' undefined.}{}}{%
+    \ifstrequal{#1}{bookcovertype at tikz}{\@latexerr{Component type '#1' is protected.}{}}%
+    \@ifundefined{bookcover at componenttype@#1}{\@latexerr{Component type '#1' is undefined.}{}}{%
         \long\expandafter\def\csname bookcover at componenttype@#1\endcsname##1{%
-        \bookcover at posbox{\bookcover at partwidth@}{\bookcover at xpos@}{\bookcover at ypos@}{#2}}}}
+        \bookcover at posbox{\bookcover at partwidth@}{\bookcover at partheight@}{\bookcover at xpos@}{\bookcover at ypos@}{#2}}}}
 
 %% NEW NAME BOOKCOVER COMPONENT TYPE
 
-\def\newnamebookcovercomponenttype#1#2{
-    \@ifundefined{bookcover at componenttype@#1}{
-        \@ifundefined{bookcover at componenttype@#2}{\@latexerr{Component type '#2' undefined.}{}}{
+\def\newnamebookcovercomponenttype#1#2{%
+    \@ifundefined{bookcover at componenttype@#1}{%
+        \@ifundefined{bookcover at componenttype@#2}{\@latexerr{Component type '#2' is undefined.}{}}{%
             \expandafter\def\csname bookcover at componenttype@#1\endcsname{%
                 \csname bookcover at componenttype@#2\endcsname}}}
-    {\@latexerr{Component type '#1' already defined.}{}}}
+    {\@latexerr{Component type '#1' is already defined.}{}}}
 
+%% LET NAME BOOKCOVER COMPONENT TYPE
+
+\def\letnamebookcovercomponenttype#1#2{%
+    \@ifundefined{bookcover at componenttype@#1}{%
+        \@ifundefined{bookcover at componenttype@#2}{\@latexerr{Component type '#2' is undefined.}{}}{%
+            \csletcs{bookcover at componenttype@#1}{bookcover at componenttype@#2}}}
+    {\@latexerr{Component type '#1' is already defined.}{}}}
+
 %% COMPONENT TYPES
 
-\newbookcovercomponenttype{color}{
+\newbookcovercomponenttype{color}{%
     \tikz\fill\expandafter[#1] (0,0) rectangle (\bookcover at partwidth@,\bookcover at partheight@);}
 
-\newbookcovercomponenttype{picture}{
+\newbookcovercomponenttype{picture}{%
     \includegraphics[width=\bookcover at partwidth@,height=\bookcover at partheight@]{#1}}
 
-\newbookcovercomponenttype{tikz}{
+\newbookcovercomponenttype{tikz}{%
     \begin{tikzpicture}[overlay,yshift=-\bookcover at partheight@]
     \begin{scope}[transparent,line width=0pt]
         \pgfset{minimum width=\bookcover at partwidth@,minimum height=\bookcover at partheight@}
@@ -880,7 +989,9 @@
     #1
     \end{tikzpicture}}
 
-\newbookcovercomponenttype{tikz clip}{
+\letnamebookcovercomponenttype{bookcovertype at tikz}{tikz} % bookcovertype at tikz is protected type
+
+\newbookcovercomponenttype{tikz clip}{%
     \begin{tikzpicture}[overlay,yshift=-\bookcover at partheight@]
     \begin{scope}[transparent,line width=0pt]
         \pgfset{minimum width=\bookcover at partwidth@,minimum height=\bookcover at partheight@}
@@ -895,31 +1006,22 @@
     #1
     \end{tikzpicture}}
 
-\newbookcovercomponenttype{normal}{
-    \parbox[t][\bookcover at partheight@][t]{\bookcover at partwidth@}{#1}}
+\newbookcovercomponenttype{normal}{#1}
 
-\newbookcovercomponenttype{center}{
-    \parbox[t][\bookcover at partheight@][c]{\bookcover at partwidth@}{\begin{center}#1\end{center}}}
+\newbookcovercomponenttype{center}{\vfill\begin{center}#1\end{center}\vfill}
 
-\newbookcovercomponenttype{ruler}{
-    \parbox[t][\bookcover at partheight@][t]{\bookcover at partwidth@}{#1}}
-\newcommand{\setruler}[5][cm]{%
+\newbookcovercomponenttype{ruler}{\expandafter\bookcover at setruler\expandafter(#1)}
+
+\def\bookcover at setruler(#1,#2,#3){%
     \rulernorotatenum%
-    \rulerparams{}{}{#5}{}{}%
-    \setlength{\bookcover at rulerwidth@}{\bookcover at partwidth@-#3}%
-    \setlength{\bookcover at rulerheight@}{\bookcover at partheight@-#4}%
-    \ifthenelse{\equal{#2}{upper left}}{%
-        \vspace{#4}%
-        \hspace{#3}%
-        \squareruler[#1]{upperleft}{\bookcover at rulerwidth@}{\bookcover at rulerheight@}}{}%
-    \ifthenelse{\equal{#2}{upper right}}{%
-        \vspace{#4}%
-        \squareruler[#1]{upperright}{\bookcover at rulerwidth@}{\bookcover at rulerheight@}}{}%
-    \ifthenelse{\equal{#2}{lower left}}{%
-        \hspace{#3}%
-        \squareruler[#1]{lowerleft}{\bookcover at rulerwidth@}{\bookcover at rulerheight@}}{}%
-    \ifthenelse{\equal{#2}{lower right}}{%
-        \squareruler[#1]{lowerright}{\bookcover at rulerwidth@}{\bookcover at rulerheight@}}{}}
+    \ifblank{#3}{\rulerparams{}{}{\bookcover at markcolor}{}{}}{\rulerparams{}{}{#3}{}{}}%
+    \ifblank{#2}%
+        {\ifblank{#1}%
+            {\squareruler{upperleft}{\bookcover at partwidth@}{\bookcover at partheight@}}%
+            {\squareruler[#1]{upperleft}{\bookcover at partwidth@}{\bookcover at partheight@}}}%
+        {\ifblank{#1}%
+            {\squareruler{#2}{\bookcover at partwidth@}{\bookcover at partheight@}}%
+            {\squareruler[#1]{#2}{\bookcover at partwidth@}{\bookcover at partheight@}}}}
 
 %% BOOKCOVER PARTS
 
@@ -931,11 +1033,19 @@
         \bookcover at partwidth{\flapwidth+\bleedwidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
 
+\newbookcoverpart{bg back wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength}
+        \bookcover at partheight{\coverheight+2\bleedwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg back}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
         \bookcover at partwidth{\coverwidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
     \else
@@ -946,7 +1056,7 @@
 \newbookcoverpart{bg spine}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
     \bookcover at partwidth{\spinewidth}
     \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}}
 
@@ -953,7 +1063,7 @@
 \newbookcoverpart{bg front}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
     \ifdim\flapwidth>0mm
         \bookcover at partwidth{\coverwidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
@@ -961,26 +1071,47 @@
         \bookcover at partwidth{\coverwidth+\bleedwidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
 
+\newbookcoverpart{bg front wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength}
+        \bookcover at partheight{\coverheight+2\bleedwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth}
+        \bookcover at partwidth{\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg front flap}{
     \ifdim\flapwidth>0mm
         \bookcover at ypos{\marklength}
         \bookcover at partheight{\coverheight+2\bleedwidth}
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\wrapwidth+2\coverwidth+\spinewidth}
         \bookcover at partwidth{\flapwidth+\bleedwidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
 
-\newbookcoverpart{bg back and flap}{
+\newbookcoverpart{bg back flap and wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength}
+        \bookcover at partheight{\coverheight+2\bleedwidth}
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{\flapwidth+\wrapwidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg back and wrap}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength}
-    \bookcover at partwidth{\bleedwidth+\flapwidth+\coverwidth}
-    \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{\coverwidth+\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{\coverwidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
 
 \newbookcoverpart{bg back and spine}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
         \bookcover at partwidth{\coverwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
     \else
@@ -991,7 +1122,7 @@
 \newbookcoverpart{bg front and spine}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
     \ifdim\flapwidth>0mm
         \bookcover at partwidth{\coverwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
@@ -999,11 +1130,72 @@
         \bookcover at partwidth{\coverwidth+\spinewidth+\bleedwidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
 
+\newbookcoverpart{bg front and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at partwidth{\coverwidth+\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at partwidth{\coverwidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg front flap and wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength}
+        \bookcover at partheight{\coverheight+2\bleedwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth}
+        \bookcover at partwidth{\flapwidth+\wrapwidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg back and flap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \bookcover at xpos{\marklength}
+    \bookcover at partwidth{\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}}
+
+\newbookcoverpart{bg back and spine and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{\wrapwidth+\coverwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{\wrapwidth+\coverwidth+\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg back and spine and front}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+        \bookcover at partwidth{2\coverwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg front and spine and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at partwidth{\coverwidth+\spinewidth+\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at partwidth{\coverwidth+\spinewidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg front and flap}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
-    \bookcover at partwidth{\coverwidth+\flapwidth+\bleedwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\coverwidth+\flapwidth+\wrapwidth+\bleedwidth}
     \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}}
 
 \newbookcoverpart{bg back and flap and spine}{
@@ -1010,15 +1202,15 @@
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \bookcover at xpos{\marklength}
-    \bookcover at partwidth{\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
     \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}}
 
-\newbookcoverpart{bg whole without flaps}{
+\newbookcoverpart{bg back and spine and front and back wrap}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \ifdim\flapwidth>0mm
         \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
-        \bookcover at partwidth{2\coverwidth+\spinewidth}
+        \bookcover at partwidth{2\coverwidth+\spinewidth+\wrapwidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
     \else
         \bookcover at xpos{\marklength}
@@ -1025,19 +1217,66 @@
         \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
 
+\newbookcoverpart{bg back and spine and front and front wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+        \bookcover at partwidth{2\coverwidth+\spinewidth+\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg front and flap and spine}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
-    \bookcover at partwidth{\coverwidth+\flapwidth+\bleedwidth+\spinewidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at partwidth{\coverwidth+\flapwidth+\bleedwidth+\wrapwidth+\spinewidth}
     \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}}
 
+\newbookcoverpart{bg whole without front flap and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \bookcover at xpos{\marklength}
+    \ifdim\flapwidth>0mm
+        \bookcover at partwidth{2\coverwidth+\flapwidth+\wrapwidth+\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}
+    \else
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg whole without flaps}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{2\coverwidth+\spinewidth+2\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg whole without back flap and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+        \bookcover at partwidth{2\coverwidth+\flapwidth+\wrapwidth+\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0mm}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg whole without front flap}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \bookcover at xpos{\marklength}
     \ifdim\flapwidth>0mm
-        \bookcover at partwidth{2\coverwidth+\flapwidth+\bleedwidth+\spinewidth}
+        \bookcover at partwidth{2\coverwidth+\flapwidth+2\wrapwidth+\bleedwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}
     \else
         \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
@@ -1048,7 +1287,7 @@
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \ifdim\flapwidth>0mm
         \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
-        \bookcover at partwidth{2\coverwidth+\flapwidth+\bleedwidth+\spinewidth}
+        \bookcover at partwidth{2\coverwidth+\flapwidth+2\wrapwidth+\bleedwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0mm}{\bleedwidth}
     \else
         \bookcover at xpos{\marklength}
@@ -1059,7 +1298,7 @@
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \bookcover at xpos{\marklength}
-    \bookcover at partwidth{2\coverwidth+2\bleedwidth+2\flapwidth+\spinewidth}
+    \bookcover at partwidth{2\coverwidth+2\bleedwidth+2\flapwidth+2\wrapwidth+\spinewidth}
     \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}}
 
 \newbookcoverpart{whole page}{
@@ -1066,6 +1305,8 @@
     \bookcover at partheight{\paperheight}
     \bookcover at partwidth{\paperwidth}}
 
+\letnamebookcoverpart{bookcoverpart at wholepage}{whole page} % bookcoverpart at wholepage is protected part
+
 \newbookcoverpart{back flap}{
     \ifdim\flapwidth>0mm
         \bookcover at ypos{\marklength+\bleedwidth}
@@ -1073,34 +1314,47 @@
         \bookcover at xpos{\marklength+\bleedwidth}
         \bookcover at partwidth{\flapwidth}\fi}
 
+\newbookcoverpart{back wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength+\bleedwidth}
+        \bookcover at partheight{\coverheight}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{\wrapwidth}\fi}
+
 \newbookcoverpart{back}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
     \bookcover at partwidth{\coverwidth}}
 
 \newbookcoverpart{spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
     \bookcover at partwidth{\spinewidth}}
 
 \newbookcoverpart{front}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
     \bookcover at partwidth{\coverwidth}}
 
+\newbookcoverpart{front wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth}
+    \bookcover at partwidth{\wrapwidth}}
+
 \newbookcoverpart{front flap}{
     \ifdim\flapwidth>0mm
         \bookcover at ypos{\marklength+\bleedwidth}
         \bookcover at partheight{\coverheight}
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\wrapwidth+2\coverwidth+\spinewidth}
         \bookcover at partwidth{\flapwidth}\fi}
 
 \newbookcoverpart{above front}{
     \ifdim\marklength>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
         \bookcover at ypos{0mm}
         \bookcover at partwidth{\coverwidth}
         \bookcover at partheight{\marklength}\fi}
@@ -1107,7 +1361,7 @@
 
 \newbookcoverpart{below front}{
     \ifdim\marklength>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
         \bookcover at ypos{\marklength+2\bleedwidth+\coverheight}
         \bookcover at partwidth{\coverwidth}
         \bookcover at partheight{\marklength}\fi}
@@ -1114,7 +1368,7 @@
 
 \newbookcoverpart{above back}{
     \ifdim\marklength>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
         \bookcover at ypos{0mm}
         \bookcover at partwidth{\coverwidth}
         \bookcover at partheight{\marklength}\fi}
@@ -1121,71 +1375,176 @@
 
 \newbookcoverpart{below back}{
     \ifdim\marklength>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
         \bookcover at ypos{\marklength+2\bleedwidth+\coverheight}
         \bookcover at partwidth{\coverwidth}
         \bookcover at partheight{\marklength}\fi}
 
-\newbookcoverpart{back and flap}{
+\newbookcoverpart{back flap and wrap}{
     \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth}
-    \bookcover at partwidth{\flapwidth+\coverwidth}
-    \bookcover at partheight{\coverheight}}
+    \bookcover at partwidth{\flapwidth+\wrapwidth}}
 
+\newbookcoverpart{back and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at partwidth{\coverwidth+\wrapwidth}}
+
 \newbookcoverpart{back and spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
     \bookcover at partwidth{\coverwidth+\spinewidth}}
 
 \newbookcoverpart{front and spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
     \bookcover at partwidth{\coverwidth+\spinewidth}}
 
+\newbookcoverpart{front and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\coverwidth+\wrapwidth}}
+
+\newbookcoverpart{front flap and wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength+\bleedwidth}
+        \bookcover at partheight{\coverheight}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth}
+        \bookcover at partwidth{\flapwidth+\wrapwidth}\fi}
+
+\newbookcoverpart{back and flap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at xpos{\marklength+\bleedwidth}
+    \bookcover at partwidth{\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at partheight{\coverheight}}
+
+\newbookcoverpart{back and spine and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at partwidth{\coverwidth+\spinewidth+\wrapwidth}}
+
+\newbookcoverpart{back and spine and front}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+    \bookcover at partwidth{2\coverwidth+\spinewidth}}
+
+\newbookcoverpart{front and spine and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at partwidth{\coverwidth+\spinewidth+\wrapwidth}}
+
 \newbookcoverpart{front and flap}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
-    \bookcover at partwidth{\coverwidth+\flapwidth}}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\coverwidth+\flapwidth+\wrapwidth}}
 
 \newbookcoverpart{back and flap and spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at xpos{\marklength+\bleedwidth}
-    \bookcover at partwidth{\flapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
     \bookcover at partheight{\coverheight}}
 
-\newbookcoverpart{whole without flaps}{
+\newbookcoverpart{back and spine and front and back wrap}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
-    \bookcover at partwidth{2\coverwidth+\spinewidth}}
+    \bookcover at partwidth{2\coverwidth+\spinewidth+\wrapwidth}}
 
+\newbookcoverpart{back and spine and front and front wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+    \bookcover at partwidth{2\coverwidth+\spinewidth+\wrapwidth}}
+
 \newbookcoverpart{front and flap and spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
-    \bookcover at partwidth{\coverwidth+\flapwidth+\spinewidth}}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at partwidth{\coverwidth+\flapwidth+\wrapwidth+\spinewidth}}
 
+\newbookcoverpart{whole without front flap and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth}
+    \bookcover at partwidth{2\coverwidth+\flapwidth+\wrapwidth+\spinewidth}}
+
+\newbookcoverpart{whole without flaps}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at partwidth{2\coverwidth+\spinewidth+2\wrapwidth}}
+
+\newbookcoverpart{whole without back flap and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+    \bookcover at partwidth{2\coverwidth+\flapwidth+\wrapwidth+\spinewidth}}
+
 \newbookcoverpart{whole without front flap}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth}
-    \bookcover at partwidth{2\coverwidth+\flapwidth+\spinewidth}}
+    \bookcover at partwidth{2\coverwidth+\flapwidth+2\wrapwidth+\spinewidth}}
 
 \newbookcoverpart{whole without back flap}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
-    \bookcover at partwidth{2\coverwidth+\flapwidth+\spinewidth}}
+    \bookcover at partwidth{2\coverwidth+\flapwidth+2\wrapwidth+\spinewidth}}
 
 \newbookcoverpart{whole}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth}
-    \bookcover at partwidth{2\coverwidth+2\flapwidth+\spinewidth}}
+    \bookcover at partwidth{2\coverwidth+2\flapwidth+2\wrapwidth+\spinewidth}}
 
+\letnamebookcoverpart{bookcoverpart at whole}{whole} % bookcoverpart at whole is protected part
+
+%% SYNONYMOUS PART NAMES FOR INSIDE COVER ('INSIDE FRONT' = 'BACK', 'INSIDE BACK' = 'FRONT')
+
+\@for\bookcover at partname@:={%
+bg back flap,bg back wrap,bg back,bg front,bg front wrap,bg front flap,%
+bg back flap and wrap,bg back and wrap,bg back and spine,bg front and spine,bg front and wrap,bg front flap and wrap,%
+bg back and flap,bg back and spine and wrap,bg back and spine and front,bg front and spine and wrap,bg front and flap,%
+bg back and flap and spine,bg back and spine and front and back wrap,bg back and spine and front and front wrap,bg front and flap and spine,%
+bg whole without front flap and wrap,bg whole without back flap and wrap,%
+bg whole without front flap,bg whole without back flap,%
+back flap,back wrap,back,front,front wrap,front flap,above back,above front,below back,below front,%
+back flap and wrap,back and wrap,back and spine,front and spine,front and wrap,front flap and wrap,%
+back and flap,back and spine and wrap,back and spine and front,front and spine and wrap,front and flap,%
+back and flap and spine,back and spine and front and back wrap,back and spine and front and front wrap,front and flap and spine,%
+whole without front flap and wrap,whole without back flap and wrap,%
+whole without front flap,whole without back flap}%
+\do{%
+\let\bookcover at partname@original@\bookcover at partname@%
+\patchcmd{\bookcover at partname@}{back}{b at ck}{}{}%
+\patchcmd{\bookcover at partname@}{front}{fr at nt}{}{}%
+\patchcmd{\bookcover at partname@}{b at ck}{inside front}{}{}%
+\patchcmd{\bookcover at partname@}{fr at nt}{inside back}{}{}%
+\letnamebookcoverpart{\bookcover at partname@}{\bookcover at partname@original@}}
+
+%% SHORT PART NAMES
+
+\def\bookcover at shortpartname@#1=#2.{\letnamebookcoverpart{#1}{#2}\letnamebookcoverpart{bg #1}{bg #2}}
+\@for\bookcover at partname@:={%
+lF=back flap.,lW=back wrap.,lC=back.,S=spine.,rC=front.,rW=front wrap.,rF=front flap.,%
+lF-lW=back flap and wrap.,lW-lC=back and wrap.,lC-S=back and spine.,S-rC=front and spine.,rC-rW=front and wrap.,rW-rF=front flap and wrap.,%
+lF-lC=back and flap.,lW-S=back and spine and wrap.,lC-rC=back and spine and front.,S-rW=front and spine and wrap.,rC-rF=front and flap.,%
+lF-S=back and flap and spine.,lW-rC=back and spine and front and back wrap.,lC-rW=back and spine and front and front wrap.,S-rF=front and flap and spine.,%
+lF-rC=whole without front flap and wrap.,lW-rW=whole without flaps.,lC-rF=whole without back flap and wrap.,%
+lF-rW=whole without front flap.,lW-rF=whole without back flap.,%
+lF-rF=whole.}%
+\do{\expandafter\bookcover at shortpartname@\bookcover at partname@}
+
 %    \end{macrocode}
 % \Finale
 \endinput
\ No newline at end of file

Modified: trunk/Master/texmf-dist/tex/latex/bookcover/bookcover.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bookcover/bookcover.cls	2020-12-06 22:14:43 UTC (rev 57078)
+++ trunk/Master/texmf-dist/tex/latex/bookcover/bookcover.cls	2020-12-06 22:15:49 UTC (rev 57079)
@@ -19,7 +19,7 @@
 %% 
 
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesClass{bookcover}[2020/11/16 v2.5 class for book covers and dust jackets]
+\ProvidesClass{bookcover}[2020/12/06 v3.0 class for book covers and dust jackets]
 
 %% OPTIONS
 
@@ -32,10 +32,13 @@
 \DeclareStringOption[240mm]{coverheight}
 \DeclareStringOption[5mm]{spinewidth}
 \DeclareStringOption[0mm]{flapwidth}
+\DeclareStringOption[0mm]{wrapwidth}
 \DeclareStringOption[10mm]{marklength}
 \DeclareStringOption[.4pt]{markthick}
 \DeclareStringOption[5mm]{bleedwidth}
 \DeclareStringOption[red]{markcolor}
+\DeclareStringOption[white]{pagecolor}
+\DeclareStringOption[white]{trimmingcolor}
 \DeclareBoolOption[false]{trimmed}
 \ProcessKeyvalOptions{bookcover}
 
@@ -42,7 +45,7 @@
 %% CLASS AND PACKAGES
 
 \LoadClass{article}
-\RequirePackage{geometry,graphicx,calc,ifthen,tikz,environ}
+\RequirePackage{geometry,graphicx,calc,tikz,xparse,etoolbox}
 \RequirePackage[nonefgrulers]{fgruler}
 
 %% PAGE STYLE
@@ -60,6 +63,7 @@
 \newlength{\coverheight}
 \newlength{\spinewidth}
 \newlength{\flapwidth}
+\newlength{\wrapwidth}
 \newlength{\marklength}
 \newlength{\markthick}
 \newlength{\bleedwidth}
@@ -75,8 +79,6 @@
 \newlength{\bookcover at tikz@trimmed at part@height at minus}
 \newlength{\bookcover at tikz@trimmed at part@push at right}
 \newlength{\bookcover at tikz@trimmed at part@push at up}
-\newlength{\bookcover at rulerwidth@}
-\newlength{\bookcover at rulerheight@}
 \let\partheight\bookcover at partheight@
 \let\partwidth\bookcover at partwidth@
 
@@ -86,6 +88,8 @@
 \setlength{\coverheight}{\bookcover at coverheight}
 \setlength{\spinewidth}{\bookcover at spinewidth}
 \setlength{\flapwidth}{\bookcover at flapwidth}
+\setlength{\wrapwidth}{\bookcover at wrapwidth}
+\ifdim\flapwidth=0pt\setlength{\wrapwidth}{0pt}\fi
 \setlength{\marklength}{\bookcover at marklength}
 \setlength{\markthick}{\bookcover at markthick}
 \setlength{\bleedwidth}{\bookcover at bleedwidth}
@@ -94,7 +98,7 @@
 
 \geometry{%
     margin=0pt,
-    paperwidth=2\marklength+2\bleedwidth+2\coverwidth+2\flapwidth+\spinewidth,
+    paperwidth=2\marklength+2\bleedwidth+2\coverwidth+2\flapwidth+2\wrapwidth+\spinewidth,
     paperheight=2\marklength+2\bleedwidth+\coverheight}
 
 %% INTERNAL LENGTHS SETTING
@@ -114,6 +118,12 @@
 \let\setpartheight\bookcover at partheight
 \let\settrimmedpart\bookcover at tikz@trimmed at part@param
 
+%% SETBOOKCOVER
+
+\def\setbookcover#1{%
+    \setkeys{bookcover}{#1}%
+    \setlength{\markthick}{\bookcover at markthick}}
+
 %% BOOKCOVERDESCGEOMETRY
 
 \def\bookcoverdescgeometry#1{\def\bookcover at descgeometry{#1}}
@@ -128,209 +138,180 @@
 
 %% POSBOX
 
-\newcommand{\bookcover at posbox}[4]{%
-    \setlength{\bookcover at templength@}{#3}%
-    \put(#2,-\bookcover at templength@){\parbox[b][0pt][t]{#1}{#4}}}
+\newcommand{\bookcover at posbox}[5]{%
+    \setlength{\bookcover at templength@}{#4}%
+    \put(#3,-\bookcover at templength@){%
+        \parbox[b][0pt][t]{#1}{%
+            \parbox[t][#2][t]{#1}{#5}}}}
 
 %% MARKS
 
-\def\bookcover at vmark{%
-    \bookcover at posbox{\bookcover at partwidth@}{\bookcover at xpos@}{\bookcover at ypos@}{%
-        {\color{\bookcover at markcolor}\rule[0pt]{\markthick}{\marklength}}}}
+\def\bookcover at marks{\bookcovercomponent{bookcovertype at tikz}{bookcoverpart at wholepage}{
+    \begin{scope}[line width=\markthick,\bookcover at markcolor]
+        \draw (\marklength+\bleedwidth,0mm) -- +(0mm,\marklength);
+        \ifdim\flapwidth>0mm\draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth,0) -- +(0,\marklength);\fi
+        \draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth,0) -- +(0,\marklength);
+        \draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth,0) -- +(0,\marklength);
+        \ifdim\flapwidth>0mm\draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth,0) -- +(0,\marklength);\fi
+        \draw (\marklength+\bleedwidth+2\flapwidth+2\wrapwidth+2\coverwidth+\spinewidth,0) -- +(0,\marklength);
+        \draw (\marklength+\bleedwidth,\paperheight) -- +(0,-\marklength);
+        \ifdim\flapwidth>0mm\draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth,\paperheight) -- +(0,-\marklength);\fi%
+        \draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth,\paperheight) -- +(0,-\marklength);
+        \draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth,\paperheight) -- +(0,-\marklength);
+        \ifdim\flapwidth>0mm\draw (\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth,\paperheight) -- +(0,-\marklength);\fi
+        \draw (\marklength+\bleedwidth+2\flapwidth+2\wrapwidth+2\coverwidth+\spinewidth,\paperheight) -- +(0,-\marklength);
+        \draw (0,\paperheight-\marklength-\bleedwidth) -- +(\marklength,0);
+        \draw (0,\marklength+\bleedwidth) -- +(\marklength,0);
+        \draw (\paperwidth,\paperheight-\marklength-\bleedwidth) -- +(-\marklength,0);
+        \draw (\paperwidth,\marklength+\bleedwidth) -- +(-\marklength,0);
+    \end{scope}}}
 
-\def\bookcover at hmark{%
-    \bookcover at posbox{\bookcover at partwidth@}{\bookcover at xpos@}{\bookcover at ypos@}{%
-        {\color{\bookcover at markcolor}\rule[0pt]{\marklength}{\markthick}}}}
+%% TRIMMING
 
-\def\bookcover at marks{
-    \bookcover at ypos{0mm}
-    \bookcover at partwidth{\markthick}
-    \bookcover at xpos{\marklength+\bleedwidth-.5\markthick}
-    \bookcover at vmark
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+2\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at ypos{\paperheight-\marklength}
-    \bookcover at partwidth{\markthick}
-    \bookcover at xpos{\marklength+\bleedwidth-.5\markthick}
-    \bookcover at vmark
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+2\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{0mm}
-    \bookcover at partwidth{\marklength}
-    \bookcover at ypos{\marklength+\bleedwidth-.5\markthick}
-    \bookcover at hmark
-    \bookcover at ypos{\marklength+\bleedwidth+\coverheight-.5\markthick}
-    \bookcover at hmark
-    \bookcover at xpos{\paperwidth-\marklength}
-    \bookcover at partwidth{\marklength}
-    \bookcover at ypos{\marklength+\bleedwidth-.5\markthick}
-    \bookcover at hmark
-    \bookcover at ypos{\marklength+\bleedwidth+\coverheight-.5\markthick}
-    \bookcover at hmark}
+\def\bookcover at trimming@part{%
+    \expandafter\ifblank\expandafter{\bookcover at trimmedpart}{\def\bookcover at trimmedpart{bookcoverpart at whole}}{}%
+    \@ifundefined{bookcover at part@param@\bookcover at trimmedpart}{\@latexerr{Part '\bookcover at trimmedpart' is undefined.}{}}{%
+        \begingroup%
+        \csname bookcover at part@param@\bookcover at trimmedpart\endcsname%
+        \expandafter\bookcover at setpartmargin\expandafter(\bookcover at trimmedmargin)%
+        \ifdim\bookcover at partwidth@>0mm
+            \ifdim\bookcover at partheight@>0mm
+                \bookcover at posbox{\paperwidth}{\paperheight}{0mm}{0mm}{%
+                    \begin{tikzpicture}
+                        \begin{scope}[\bookcover at trimmingcolor]
+                        \fill (0,0) rectangle (\paperwidth,\paperheight-\bookcover at ypos@-\bookcover at partheight@);
+                        \fill (0,\paperheight) rectangle (\paperwidth,\paperheight-\bookcover at ypos@);
+                        \fill (0,0) rectangle (\bookcover at xpos@,\paperheight);
+                        \fill (\bookcover at xpos@+\bookcover at partwidth@,0) rectangle (\paperwidth,\paperheight);
+                        \end{scope}
+                    \end{tikzpicture}}\fi\fi
+        \endgroup}}
 
-%% TRIMMING
+\NewDocumentCommand{\bookcovertrimmedpart}{ m O{,,,} }{\def\bookcover at trimmedpart{#1}\def\bookcover at trimmedmargin{#2}}
+\def\bookcover at trimmedpart{bookcoverpart at whole}
+\def\bookcover at trimmedmargin{,,,}
 
-\def\bookcover at trimming{%
-    \bookcover at posbox{\paperwidth}{0mm}{0mm}{%
-        \begin{tikzpicture}
-            \begin{scope}[color=white]
-                \fill(0,0)--
-                     (\paperwidth,0)--
-                     (\paperwidth,\marklength+\bleedwidth)--
-                     (0,\marklength+\bleedwidth)--cycle;
-                \fill(0,\paperheight)--
-                     (\paperwidth,\paperheight)--
-                     (\paperwidth,\paperheight-\marklength-\bleedwidth)--
-                     (0,\paperheight-\marklength-\bleedwidth)--cycle;
-                \fill(0,0)--
-                     (\marklength+\bleedwidth,0)--
-                     (\marklength+\bleedwidth,\paperheight)--
-                     (0,\paperheight)--cycle;
-                \fill(\paperwidth-\marklength-\bleedwidth,0)--
-                     (\paperwidth,0)--
-                     (\paperwidth,\paperheight)--
-                     (\paperwidth-\marklength-\bleedwidth,\paperheight)--cycle;
-            \end{scope}
-            \draw[color=\bookcover at markcolor,line width=\markthick]
-                 (\marklength+\bleedwidth,\marklength+\bleedwidth)--
-                 (\paperwidth-\marklength-\bleedwidth,\marklength+\bleedwidth)--
-                 (\paperwidth-\marklength-\bleedwidth,\paperheight-\marklength-\bleedwidth)--
-                 (\marklength+\bleedwidth,\paperheight-\marklength-\bleedwidth)--cycle;
-        \end{tikzpicture}}
-    \bookcover at ypos{\bleedwidth}
-    \bookcover at partwidth{\markthick}
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
-        \bookcover at vmark
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at ypos{\paperheight-\marklength-\bleedwidth}
-    \bookcover at partwidth{\markthick}
-    \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth-.5\markthick}
-        \bookcover at vmark
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth-.5\markthick}
-        \bookcover at vmark\fi
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth-.5\markthick}
-    \bookcover at vmark
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth-.5\markthick}
-    \bookcover at vmark}
-
 %% BOOKCOVER ENVIRONMENT
 
 \def\bookcover{%
     \@inbookcoverenvtrue%
     \newpage%
+    \pagecolor{\bookcover at pagecolor}
     \noindent%
     \begin{picture}(\paperwidth,\paperheight)(0,-\paperheight)}
 
 \def\endbookcover{%
+    \ifbookcover at trimmed\bookcover at trimming@part\fi%
     \bookcover at marks%
-    \ifbookcover at trimmed\bookcover at trimming\fi%
     \end{picture}%
-    \@inbookcoverenvfalse}
+    \par\@inbookcoverenvfalse}
 
 %% BOOKCOVER COMPONENT
 
-\long\def\bookcovercomponent#1#2#3{
-    \if at inbookcoverenv\else
-        \@latexerr{\string\bookcovercomponent\space is not in 'bookcover' environment.}{}\fi
-    \bookcover at xpos{0pt}
-    \bookcover at ypos{0pt}
-    \bookcover at partwidth{0pt}
-    \bookcover at partheight{0pt}
-    \bookcover at tikz@trimmed at part@param{0pt}{0pt}{0pt}{0pt}
-    \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' undefined.}{}}{
-        \@ifundefined{bookcover at componenttype@#1}{\@latexerr{Component type '#1' undefined.}{}}{
-            \ifx\@empty#3\else
-                \csname bookcover at part@param@#2\endcsname
-                \ifdim\bookcover at partwidth@>0mm
-                    \ifdim\bookcover at partheight@>0mm
-                        \csname bookcover at componenttype@#1\endcsname{#3}\fi\fi\fi}}}
+\def\bookcover at setpartmargin(#1,#2,#3,#4){%
+    \ifblank{#1}{}{%
+        \addtolength{\bookcover at xpos@}{#1}%
+        \addtolength{\bookcover at partwidth@}{-#1}}%
+    \ifblank{#2}{}{%
+        \addtolength{\bookcover at partheight@}{-#2}}%
+    \ifblank{#3}{}{%
+        \addtolength{\bookcover at partwidth@}{-#3}}%
+    \ifblank{#4}{}{%
+        \addtolength{\bookcover at ypos@}{#4}%
+        \addtolength{\bookcover at partheight@}{-#4}}}
 
+\NewDocumentCommand{\bookcovercomponent}{ m m O{,,,} +m }{%
+    \if at inbookcoverenv\else%
+        \@latexerr{Use \string\bookcovercomponent\space or 'bookcoverelement' in 'bookcover' environment!}{}\fi%
+    \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' is undefined.}{}}{%
+        \@ifundefined{bookcover at componenttype@#1}{\@latexerr{Component type '#1' is undefined.}{}}{%
+            \ifblank{#4}{}{%
+                \begingroup%
+                \csname bookcover at part@param@#2\endcsname%
+                \bookcover at setpartmargin(#3)%
+                \ifdim\bookcover at partwidth@>0mm%
+                    \ifdim\bookcover at partheight@>0mm%
+                        \csname bookcover at componenttype@#1\endcsname{#4}\fi\fi%
+                \endgroup}}}}
+
 %% BOOKCOVERELEMENT ENVIRONMENT
 
-\NewEnviron{bookcoverelement}[2]{\bookcovercomponent{#1}{#2}{\BODY}}
+\NewDocumentEnvironment{bookcoverelement}{ m m O{,,,} +b }{\bookcovercomponent{#1}{#2}[#3]{#4}}
 
 %% NEW BOOKCOVER PART
 
-\def\newbookcoverpart#1#2{
-    \@ifundefined{bookcover at part@param@#1}{
+\def\newbookcoverpart#1#2{%
+    \@ifundefined{bookcover at part@param@#1}{%
         \expandafter\def\csname bookcover at part@param@#1\endcsname{#2}}
-    {\@latexerr{Part '#1' already defined.}{}}}
+    {\@latexerr{Part '#1' is already defined.}{}}}
 
 %% RENEW BOOKCOVER PART
 
-\def\renewbookcoverpart#1#2{
-    \@ifundefined{bookcover at part@param@#1}{\@latexerr{Part '#1' undefined.}{}}{
+\def\renewbookcoverpart#1#2{%
+    \ifstrequal{#1}{bookcoverpart at wholepage}{\@latexerr{Part '#1' is protected.}{}}%
+    \ifstrequal{#1}{bookcoverpart at whole}{\@latexerr{Part '#1' is protected.}{}}%
+    \@ifundefined{bookcover at part@param@#1}{\@latexerr{Part '#1' is undefined.}{}}{%
         \expandafter\def\csname bookcover at part@param@#1\endcsname{#2}}}
 
 %% NEW NAME BOOKCOVER PART
 
-\def\newnamebookcoverpart#1#2{
-    \@ifundefined{bookcover at part@param@#1}{
-        \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' undefined.}{}}{
+\def\newnamebookcoverpart#1#2{%
+    \@ifundefined{bookcover at part@param@#1}{%
+        \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' is undefined.}{}}{%
             \expandafter\def\csname bookcover at part@param@#1\endcsname{%
                 \csname bookcover at part@param@#2\endcsname}}}
-    {\@latexerr{Part '#1' already defined.}{}}}
+    {\@latexerr{Part '#1' is already defined.}{}}}
 
+%% LET NAME BOOKCOVER PART
+
+\def\letnamebookcoverpart#1#2{%
+    \@ifundefined{bookcover at part@param@#1}{%
+        \@ifundefined{bookcover at part@param@#2}{\@latexerr{Part '#2' is undefined.}{}}{%
+            \csletcs{bookcover at part@param@#1}{bookcover at part@param@#2}}}
+    {\@latexerr{Part '#1' is already defined.}{}}}
+
 %% NEW BOOKCOVER COMPONENT TYPE
 
 \def\newbookcovercomponenttype#1#2{%
     \@ifundefined{bookcover at componenttype@#1}{%
         \long\expandafter\def\csname bookcover at componenttype@#1\endcsname##1{%
-        \bookcover at posbox{\bookcover at partwidth@}{\bookcover at xpos@}{\bookcover at ypos@}{#2}}}
-    {\@latexerr{Component type '#1' already defined.}{}}}
+        \bookcover at posbox{\bookcover at partwidth@}{\bookcover at partheight@}{\bookcover at xpos@}{\bookcover at ypos@}{#2}}}
+    {\@latexerr{Component type '#1' is already defined.}{}}}
 
 %% RENEW BOOKCOVER COMPONENT TYPE
 
 \def\renewbookcovercomponenttype#1#2{%
-    \@ifundefined{bookcover at componenttype@#1}{\@latex at error{Component type '#1' undefined.}{}}{%
+    \ifstrequal{#1}{bookcovertype at tikz}{\@latexerr{Component type '#1' is protected.}{}}%
+    \@ifundefined{bookcover at componenttype@#1}{\@latexerr{Component type '#1' is undefined.}{}}{%
         \long\expandafter\def\csname bookcover at componenttype@#1\endcsname##1{%
-        \bookcover at posbox{\bookcover at partwidth@}{\bookcover at xpos@}{\bookcover at ypos@}{#2}}}}
+        \bookcover at posbox{\bookcover at partwidth@}{\bookcover at partheight@}{\bookcover at xpos@}{\bookcover at ypos@}{#2}}}}
 
 %% NEW NAME BOOKCOVER COMPONENT TYPE
 
-\def\newnamebookcovercomponenttype#1#2{
-    \@ifundefined{bookcover at componenttype@#1}{
-        \@ifundefined{bookcover at componenttype@#2}{\@latexerr{Component type '#2' undefined.}{}}{
+\def\newnamebookcovercomponenttype#1#2{%
+    \@ifundefined{bookcover at componenttype@#1}{%
+        \@ifundefined{bookcover at componenttype@#2}{\@latexerr{Component type '#2' is undefined.}{}}{%
             \expandafter\def\csname bookcover at componenttype@#1\endcsname{%
                 \csname bookcover at componenttype@#2\endcsname}}}
-    {\@latexerr{Component type '#1' already defined.}{}}}
+    {\@latexerr{Component type '#1' is already defined.}{}}}
 
+%% LET NAME BOOKCOVER COMPONENT TYPE
+
+\def\letnamebookcovercomponenttype#1#2{%
+    \@ifundefined{bookcover at componenttype@#1}{%
+        \@ifundefined{bookcover at componenttype@#2}{\@latexerr{Component type '#2' is undefined.}{}}{%
+            \csletcs{bookcover at componenttype@#1}{bookcover at componenttype@#2}}}
+    {\@latexerr{Component type '#1' is already defined.}{}}}
+
 %% COMPONENT TYPES
 
-\newbookcovercomponenttype{color}{
+\newbookcovercomponenttype{color}{%
     \tikz\fill\expandafter[#1] (0,0) rectangle (\bookcover at partwidth@,\bookcover at partheight@);}
 
-\newbookcovercomponenttype{picture}{
+\newbookcovercomponenttype{picture}{%
     \includegraphics[width=\bookcover at partwidth@,height=\bookcover at partheight@]{#1}}
 
-\newbookcovercomponenttype{tikz}{
+\newbookcovercomponenttype{tikz}{%
     \begin{tikzpicture}[overlay,yshift=-\bookcover at partheight@]
     \begin{scope}[transparent,line width=0pt]
         \pgfset{minimum width=\bookcover at partwidth@,minimum height=\bookcover at partheight@}
@@ -344,7 +325,9 @@
     #1
     \end{tikzpicture}}
 
-\newbookcovercomponenttype{tikz clip}{
+\letnamebookcovercomponenttype{bookcovertype at tikz}{tikz} % bookcovertype at tikz is protected type
+
+\newbookcovercomponenttype{tikz clip}{%
     \begin{tikzpicture}[overlay,yshift=-\bookcover at partheight@]
     \begin{scope}[transparent,line width=0pt]
         \pgfset{minimum width=\bookcover at partwidth@,minimum height=\bookcover at partheight@}
@@ -359,31 +342,22 @@
     #1
     \end{tikzpicture}}
 
-\newbookcovercomponenttype{normal}{
-    \parbox[t][\bookcover at partheight@][t]{\bookcover at partwidth@}{#1}}
+\newbookcovercomponenttype{normal}{#1}
 
-\newbookcovercomponenttype{center}{
-    \parbox[t][\bookcover at partheight@][c]{\bookcover at partwidth@}{\begin{center}#1\end{center}}}
+\newbookcovercomponenttype{center}{\vfill\begin{center}#1\end{center}\vfill}
 
-\newbookcovercomponenttype{ruler}{
-    \parbox[t][\bookcover at partheight@][t]{\bookcover at partwidth@}{#1}}
-\newcommand{\setruler}[5][cm]{%
+\newbookcovercomponenttype{ruler}{\expandafter\bookcover at setruler\expandafter(#1)}
+
+\def\bookcover at setruler(#1,#2,#3){%
     \rulernorotatenum%
-    \rulerparams{}{}{#5}{}{}%
-    \setlength{\bookcover at rulerwidth@}{\bookcover at partwidth@-#3}%
-    \setlength{\bookcover at rulerheight@}{\bookcover at partheight@-#4}%
-    \ifthenelse{\equal{#2}{upper left}}{%
-        \vspace{#4}%
-        \hspace{#3}%
-        \squareruler[#1]{upperleft}{\bookcover at rulerwidth@}{\bookcover at rulerheight@}}{}%
-    \ifthenelse{\equal{#2}{upper right}}{%
-        \vspace{#4}%
-        \squareruler[#1]{upperright}{\bookcover at rulerwidth@}{\bookcover at rulerheight@}}{}%
-    \ifthenelse{\equal{#2}{lower left}}{%
-        \hspace{#3}%
-        \squareruler[#1]{lowerleft}{\bookcover at rulerwidth@}{\bookcover at rulerheight@}}{}%
-    \ifthenelse{\equal{#2}{lower right}}{%
-        \squareruler[#1]{lowerright}{\bookcover at rulerwidth@}{\bookcover at rulerheight@}}{}}
+    \ifblank{#3}{\rulerparams{}{}{\bookcover at markcolor}{}{}}{\rulerparams{}{}{#3}{}{}}%
+    \ifblank{#2}%
+        {\ifblank{#1}%
+            {\squareruler{upperleft}{\bookcover at partwidth@}{\bookcover at partheight@}}%
+            {\squareruler[#1]{upperleft}{\bookcover at partwidth@}{\bookcover at partheight@}}}%
+        {\ifblank{#1}%
+            {\squareruler{#2}{\bookcover at partwidth@}{\bookcover at partheight@}}%
+            {\squareruler[#1]{#2}{\bookcover at partwidth@}{\bookcover at partheight@}}}}
 
 %% BOOKCOVER PARTS
 
@@ -395,11 +369,19 @@
         \bookcover at partwidth{\flapwidth+\bleedwidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
 
+\newbookcoverpart{bg back wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength}
+        \bookcover at partheight{\coverheight+2\bleedwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg back}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
         \bookcover at partwidth{\coverwidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
     \else
@@ -410,7 +392,7 @@
 \newbookcoverpart{bg spine}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
     \bookcover at partwidth{\spinewidth}
     \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}}
 
@@ -417,7 +399,7 @@
 \newbookcoverpart{bg front}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
     \ifdim\flapwidth>0mm
         \bookcover at partwidth{\coverwidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
@@ -425,26 +407,47 @@
         \bookcover at partwidth{\coverwidth+\bleedwidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
 
+\newbookcoverpart{bg front wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength}
+        \bookcover at partheight{\coverheight+2\bleedwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth}
+        \bookcover at partwidth{\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg front flap}{
     \ifdim\flapwidth>0mm
         \bookcover at ypos{\marklength}
         \bookcover at partheight{\coverheight+2\bleedwidth}
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\wrapwidth+2\coverwidth+\spinewidth}
         \bookcover at partwidth{\flapwidth+\bleedwidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
 
-\newbookcoverpart{bg back and flap}{
+\newbookcoverpart{bg back flap and wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength}
+        \bookcover at partheight{\coverheight+2\bleedwidth}
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{\flapwidth+\wrapwidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg back and wrap}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength}
-    \bookcover at partwidth{\bleedwidth+\flapwidth+\coverwidth}
-    \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{\coverwidth+\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{\coverwidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
 
 \newbookcoverpart{bg back and spine}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \ifdim\flapwidth>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
         \bookcover at partwidth{\coverwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
     \else
@@ -455,7 +458,7 @@
 \newbookcoverpart{bg front and spine}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
     \ifdim\flapwidth>0mm
         \bookcover at partwidth{\coverwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
@@ -463,11 +466,72 @@
         \bookcover at partwidth{\coverwidth+\spinewidth+\bleedwidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
 
+\newbookcoverpart{bg front and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at partwidth{\coverwidth+\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at partwidth{\coverwidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg front flap and wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength}
+        \bookcover at partheight{\coverheight+2\bleedwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth}
+        \bookcover at partwidth{\flapwidth+\wrapwidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg back and flap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \bookcover at xpos{\marklength}
+    \bookcover at partwidth{\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}}
+
+\newbookcoverpart{bg back and spine and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{\wrapwidth+\coverwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{\wrapwidth+\coverwidth+\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg back and spine and front}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+        \bookcover at partwidth{2\coverwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg front and spine and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at partwidth{\coverwidth+\spinewidth+\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at partwidth{\coverwidth+\spinewidth+\bleedwidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg front and flap}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
-    \bookcover at partwidth{\coverwidth+\flapwidth+\bleedwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\coverwidth+\flapwidth+\wrapwidth+\bleedwidth}
     \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}}
 
 \newbookcoverpart{bg back and flap and spine}{
@@ -474,15 +538,15 @@
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \bookcover at xpos{\marklength}
-    \bookcover at partwidth{\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
     \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}}
 
-\newbookcoverpart{bg whole without flaps}{
+\newbookcoverpart{bg back and spine and front and back wrap}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \ifdim\flapwidth>0mm
         \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
-        \bookcover at partwidth{2\coverwidth+\spinewidth}
+        \bookcover at partwidth{2\coverwidth+\spinewidth+\wrapwidth}
         \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
     \else
         \bookcover at xpos{\marklength}
@@ -489,19 +553,66 @@
         \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
 
+\newbookcoverpart{bg back and spine and front and front wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+        \bookcover at partwidth{2\coverwidth+\spinewidth+\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg front and flap and spine}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
-    \bookcover at partwidth{\coverwidth+\flapwidth+\bleedwidth+\spinewidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at partwidth{\coverwidth+\flapwidth+\bleedwidth+\wrapwidth+\spinewidth}
     \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0pt}{\bleedwidth}}
 
+\newbookcoverpart{bg whole without front flap and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \bookcover at xpos{\marklength}
+    \ifdim\flapwidth>0mm
+        \bookcover at partwidth{2\coverwidth+\flapwidth+\wrapwidth+\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}
+    \else
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg whole without flaps}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{2\coverwidth+\spinewidth+2\wrapwidth}
+        \bookcover at tikz@trimmed at part@param{0pt}{2\bleedwidth}{0pt}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
+\newbookcoverpart{bg whole without back flap and wrap}{
+    \bookcover at ypos{\marklength}
+    \bookcover at partheight{\coverheight+2\bleedwidth}
+    \ifdim\flapwidth>0mm
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+        \bookcover at partwidth{2\coverwidth+\flapwidth+\wrapwidth+\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0mm}{\bleedwidth}
+    \else
+        \bookcover at xpos{\marklength}
+        \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
+        \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}\fi}
+
 \newbookcoverpart{bg whole without front flap}{
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \bookcover at xpos{\marklength}
     \ifdim\flapwidth>0mm
-        \bookcover at partwidth{2\coverwidth+\flapwidth+\bleedwidth+\spinewidth}
+        \bookcover at partwidth{2\coverwidth+\flapwidth+2\wrapwidth+\bleedwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}
     \else
         \bookcover at partwidth{2\coverwidth+2\bleedwidth+\spinewidth}
@@ -512,7 +623,7 @@
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \ifdim\flapwidth>0mm
         \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
-        \bookcover at partwidth{2\coverwidth+\flapwidth+\bleedwidth+\spinewidth}
+        \bookcover at partwidth{2\coverwidth+\flapwidth+2\wrapwidth+\bleedwidth+\spinewidth}
         \bookcover at tikz@trimmed at part@param{\bleedwidth}{2\bleedwidth}{0mm}{\bleedwidth}
     \else
         \bookcover at xpos{\marklength}
@@ -523,7 +634,7 @@
     \bookcover at ypos{\marklength}
     \bookcover at partheight{\coverheight+2\bleedwidth}
     \bookcover at xpos{\marklength}
-    \bookcover at partwidth{2\coverwidth+2\bleedwidth+2\flapwidth+\spinewidth}
+    \bookcover at partwidth{2\coverwidth+2\bleedwidth+2\flapwidth+2\wrapwidth+\spinewidth}
     \bookcover at tikz@trimmed at part@param{2\bleedwidth}{2\bleedwidth}{\bleedwidth}{\bleedwidth}}
 
 \newbookcoverpart{whole page}{
@@ -530,6 +641,8 @@
     \bookcover at partheight{\paperheight}
     \bookcover at partwidth{\paperwidth}}
 
+\letnamebookcoverpart{bookcoverpart at wholepage}{whole page} % bookcoverpart at wholepage is protected part
+
 \newbookcoverpart{back flap}{
     \ifdim\flapwidth>0mm
         \bookcover at ypos{\marklength+\bleedwidth}
@@ -537,34 +650,47 @@
         \bookcover at xpos{\marklength+\bleedwidth}
         \bookcover at partwidth{\flapwidth}\fi}
 
+\newbookcoverpart{back wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength+\bleedwidth}
+        \bookcover at partheight{\coverheight}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at partwidth{\wrapwidth}\fi}
+
 \newbookcoverpart{back}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
     \bookcover at partwidth{\coverwidth}}
 
 \newbookcoverpart{spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
     \bookcover at partwidth{\spinewidth}}
 
 \newbookcoverpart{front}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
     \bookcover at partwidth{\coverwidth}}
 
+\newbookcoverpart{front wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth}
+    \bookcover at partwidth{\wrapwidth}}
+
 \newbookcoverpart{front flap}{
     \ifdim\flapwidth>0mm
         \bookcover at ypos{\marklength+\bleedwidth}
         \bookcover at partheight{\coverheight}
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\coverwidth+\spinewidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+2\wrapwidth+2\coverwidth+\spinewidth}
         \bookcover at partwidth{\flapwidth}\fi}
 
 \newbookcoverpart{above front}{
     \ifdim\marklength>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
         \bookcover at ypos{0mm}
         \bookcover at partwidth{\coverwidth}
         \bookcover at partheight{\marklength}\fi}
@@ -571,7 +697,7 @@
 
 \newbookcoverpart{below front}{
     \ifdim\marklength>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
         \bookcover at ypos{\marklength+2\bleedwidth+\coverheight}
         \bookcover at partwidth{\coverwidth}
         \bookcover at partheight{\marklength}\fi}
@@ -578,7 +704,7 @@
 
 \newbookcoverpart{above back}{
     \ifdim\marklength>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
         \bookcover at ypos{0mm}
         \bookcover at partwidth{\coverwidth}
         \bookcover at partheight{\marklength}\fi}
@@ -585,71 +711,176 @@
 
 \newbookcoverpart{below back}{
     \ifdim\marklength>0mm
-        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
         \bookcover at ypos{\marklength+2\bleedwidth+\coverheight}
         \bookcover at partwidth{\coverwidth}
         \bookcover at partheight{\marklength}\fi}
 
-\newbookcoverpart{back and flap}{
+\newbookcoverpart{back flap and wrap}{
     \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth}
-    \bookcover at partwidth{\flapwidth+\coverwidth}
-    \bookcover at partheight{\coverheight}}
+    \bookcover at partwidth{\flapwidth+\wrapwidth}}
 
+\newbookcoverpart{back and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at partwidth{\coverwidth+\wrapwidth}}
+
 \newbookcoverpart{back and spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
     \bookcover at partwidth{\coverwidth+\spinewidth}}
 
 \newbookcoverpart{front and spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
     \bookcover at partwidth{\coverwidth+\spinewidth}}
 
+\newbookcoverpart{front and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\coverwidth+\wrapwidth}}
+
+\newbookcoverpart{front flap and wrap}{
+    \ifdim\flapwidth>0mm
+        \bookcover at ypos{\marklength+\bleedwidth}
+        \bookcover at partheight{\coverheight}
+        \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+2\coverwidth+\spinewidth}
+        \bookcover at partwidth{\flapwidth+\wrapwidth}\fi}
+
+\newbookcoverpart{back and flap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at xpos{\marklength+\bleedwidth}
+    \bookcover at partwidth{\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at partheight{\coverheight}}
+
+\newbookcoverpart{back and spine and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at partwidth{\coverwidth+\spinewidth+\wrapwidth}}
+
+\newbookcoverpart{back and spine and front}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+    \bookcover at partwidth{2\coverwidth+\spinewidth}}
+
+\newbookcoverpart{front and spine and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at partwidth{\coverwidth+\spinewidth+\wrapwidth}}
+
 \newbookcoverpart{front and flap}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth+\spinewidth}
-    \bookcover at partwidth{\coverwidth+\flapwidth}}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\coverwidth+\flapwidth+\wrapwidth}}
 
 \newbookcoverpart{back and flap and spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at xpos{\marklength+\bleedwidth}
-    \bookcover at partwidth{\flapwidth+\coverwidth+\spinewidth}
+    \bookcover at partwidth{\flapwidth+\wrapwidth+\coverwidth+\spinewidth}
     \bookcover at partheight{\coverheight}}
 
-\newbookcoverpart{whole without flaps}{
+\newbookcoverpart{back and spine and front and back wrap}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
-    \bookcover at partwidth{2\coverwidth+\spinewidth}}
+    \bookcover at partwidth{2\coverwidth+\spinewidth+\wrapwidth}}
 
+\newbookcoverpart{back and spine and front and front wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+    \bookcover at partwidth{2\coverwidth+\spinewidth+\wrapwidth}}
+
 \newbookcoverpart{front and flap and spine}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
-    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\coverwidth}
-    \bookcover at partwidth{\coverwidth+\flapwidth+\spinewidth}}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth+\coverwidth}
+    \bookcover at partwidth{\coverwidth+\flapwidth+\wrapwidth+\spinewidth}}
 
+\newbookcoverpart{whole without front flap and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth}
+    \bookcover at partwidth{2\coverwidth+\flapwidth+\wrapwidth+\spinewidth}}
+
+\newbookcoverpart{whole without flaps}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
+    \bookcover at partwidth{2\coverwidth+\spinewidth+2\wrapwidth}}
+
+\newbookcoverpart{whole without back flap and wrap}{
+    \bookcover at ypos{\marklength+\bleedwidth}
+    \bookcover at partheight{\coverheight}
+    \bookcover at xpos{\marklength+\bleedwidth+\flapwidth+\wrapwidth}
+    \bookcover at partwidth{2\coverwidth+\flapwidth+\wrapwidth+\spinewidth}}
+
 \newbookcoverpart{whole without front flap}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth}
-    \bookcover at partwidth{2\coverwidth+\flapwidth+\spinewidth}}
+    \bookcover at partwidth{2\coverwidth+\flapwidth+2\wrapwidth+\spinewidth}}
 
 \newbookcoverpart{whole without back flap}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth+\flapwidth}
-    \bookcover at partwidth{2\coverwidth+\flapwidth+\spinewidth}}
+    \bookcover at partwidth{2\coverwidth+\flapwidth+2\wrapwidth+\spinewidth}}
 
 \newbookcoverpart{whole}{
     \bookcover at ypos{\marklength+\bleedwidth}
     \bookcover at partheight{\coverheight}
     \bookcover at xpos{\marklength+\bleedwidth}
-    \bookcover at partwidth{2\coverwidth+2\flapwidth+\spinewidth}}
+    \bookcover at partwidth{2\coverwidth+2\flapwidth+2\wrapwidth+\spinewidth}}
 
+\letnamebookcoverpart{bookcoverpart at whole}{whole} % bookcoverpart at whole is protected part
+
+%% SYNONYMOUS PART NAMES FOR INSIDE COVER ('INSIDE FRONT' = 'BACK', 'INSIDE BACK' = 'FRONT')
+
+\@for\bookcover at partname@:={%
+bg back flap,bg back wrap,bg back,bg front,bg front wrap,bg front flap,%
+bg back flap and wrap,bg back and wrap,bg back and spine,bg front and spine,bg front and wrap,bg front flap and wrap,%
+bg back and flap,bg back and spine and wrap,bg back and spine and front,bg front and spine and wrap,bg front and flap,%
+bg back and flap and spine,bg back and spine and front and back wrap,bg back and spine and front and front wrap,bg front and flap and spine,%
+bg whole without front flap and wrap,bg whole without back flap and wrap,%
+bg whole without front flap,bg whole without back flap,%
+back flap,back wrap,back,front,front wrap,front flap,above back,above front,below back,below front,%
+back flap and wrap,back and wrap,back and spine,front and spine,front and wrap,front flap and wrap,%
+back and flap,back and spine and wrap,back and spine and front,front and spine and wrap,front and flap,%
+back and flap and spine,back and spine and front and back wrap,back and spine and front and front wrap,front and flap and spine,%
+whole without front flap and wrap,whole without back flap and wrap,%
+whole without front flap,whole without back flap}%
+\do{%
+\let\bookcover at partname@original@\bookcover at partname@%
+\patchcmd{\bookcover at partname@}{back}{b at ck}{}{}%
+\patchcmd{\bookcover at partname@}{front}{fr at nt}{}{}%
+\patchcmd{\bookcover at partname@}{b at ck}{inside front}{}{}%
+\patchcmd{\bookcover at partname@}{fr at nt}{inside back}{}{}%
+\letnamebookcoverpart{\bookcover at partname@}{\bookcover at partname@original@}}
+
+%% SHORT PART NAMES
+
+\def\bookcover at shortpartname@#1=#2.{\letnamebookcoverpart{#1}{#2}\letnamebookcoverpart{bg #1}{bg #2}}
+\@for\bookcover at partname@:={%
+lF=back flap.,lW=back wrap.,lC=back.,S=spine.,rC=front.,rW=front wrap.,rF=front flap.,%
+lF-lW=back flap and wrap.,lW-lC=back and wrap.,lC-S=back and spine.,S-rC=front and spine.,rC-rW=front and wrap.,rW-rF=front flap and wrap.,%
+lF-lC=back and flap.,lW-S=back and spine and wrap.,lC-rC=back and spine and front.,S-rW=front and spine and wrap.,rC-rF=front and flap.,%
+lF-S=back and flap and spine.,lW-rC=back and spine and front and back wrap.,lC-rW=back and spine and front and front wrap.,S-rF=front and flap and spine.,%
+lF-rC=whole without front flap and wrap.,lW-rW=whole without flaps.,lC-rF=whole without back flap and wrap.,%
+lF-rW=whole without front flap.,lW-rF=whole without back flap.,%
+lF-rF=whole.}%
+\do{\expandafter\bookcover at shortpartname@\bookcover at partname@}
+
 \endinput
 %%
 %% End of file `bookcover.cls'.



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