summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bookcover
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-01-09 22:33:16 +0000
committerKarl Berry <karl@freefriends.org>2018-01-09 22:33:16 +0000
commit88c9b92f240d620d1e1ddda468a6f39e1db563a6 (patch)
tree5ae81b3e6b5fcb39b7014c48d5c35c870131a87a /Master/texmf-dist/tex/latex/bookcover
parentca4fc9144d8162c60671c9d1c4e38ac5d90f78ca (diff)
bookcover (9jan18)
git-svn-id: svn://tug.org/texlive/trunk@46261 c570f23f-e606-0410-a88d-b1316a301751
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