summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bookcover
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/bookcover')
-rw-r--r--Master/texmf-dist/tex/latex/bookcover/bookcover.cls23
1 files changed, 20 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/bookcover/bookcover.cls b/Master/texmf-dist/tex/latex/bookcover/bookcover.cls
index 0c651d09130..a66e512eee5 100644
--- a/Master/texmf-dist/tex/latex/bookcover/bookcover.cls
+++ b/Master/texmf-dist/tex/latex/bookcover/bookcover.cls
@@ -18,7 +18,7 @@
%% LaTeX version 1999/12/01 or later.
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
-\ProvidesClass{bookcover}[2017/04/13 v2.1 class for book covers and dust jackets]
+\ProvidesClass{bookcover}[2018/01/09 v2.2 class for book covers and dust jackets]
%%
%% OPTIONS
\RequirePackage{kvoptions}
@@ -43,8 +43,13 @@
%% CLASS AND PACKAGES
\LoadClass{article}
-\RequirePackage{geometry,graphicx,calc,xcolor,ifthen,tikz,eso-pic}
+\RequirePackage{ifxetex}
+\ifxetex
+\RequirePackage{textpos} % 'absolute' option with xelatex.exe is not compatible with pst-barcode package (see an example in the document).
+\else
\RequirePackage[absolute]{textpos}
+\fi
+\RequirePackage{geometry,graphicx,calc,ifthen,tikz,eso-pic}
%% PAGE STYLE
\pagestyle{empty}
@@ -85,6 +90,18 @@
\setlength{\bleedwidth}{\bookcover@bleedwidth}
\setlength{\paperwidth}{2\marklength+2\bleedwidth+2\coverwidth+2\flapwidth+\spinewidth}
\setlength{\paperheight}{2\marklength+2\bleedwidth+\coverheight}
+
+%% IN CASE XELATEX, MOVE THE POSITION TO THE UPPER LEFT CORNER OF THE PAGE (because of we don't use the 'absolute' option of textpos package)
+\ifxetex
+\setlength{\hoffset}{-1in}
+\setlength{\voffset}{-1in-1em}
+\setlength{\oddsidemargin}{0pt}
+\setlength{\topmargin}{0pt}
+\setlength{\headheight}{0pt}
+\setlength{\headsep}{0pt}
+\fi
+
+%% NO PARAGRAPH INDENTATION
\setlength{\parindent}{0pt}
%% INTERNAL LENGTHS SETTING
@@ -230,7 +247,7 @@
\bookcover@tikz@trimmed@part@param{0pt}{0pt}{0pt}{0pt}
\@ifundefined{bookcover@part@param@#2}{\@latexerr{Part '#2' undefined.}{}}{
\@ifundefined{bookcover@componenttype@#1}{\@latexerr{Component type '#1' undefined.}{}}{
- \ifx#3\@empty\else
+ \ifx\@empty#3\else
\csname bookcover@part@param@#2\endcsname
\ifdim\bookcover@partwidth@>0mm
\ifdim\bookcover@partheight@>0mm