From 88c9b92f240d620d1e1ddda468a6f39e1db563a6 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 9 Jan 2018 22:33:16 +0000 Subject: bookcover (9jan18) git-svn-id: svn://tug.org/texlive/trunk@46261 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bookcover/README | 10 +- .../texmf-dist/doc/latex/bookcover/bookcover.pdf | Bin 1623198 -> 1527538 bytes .../doc/latex/bookcover/example-oldmethod.tex | 80 +++++++++ .../doc/latex/bookcover/example1-oldmethod.tex | 80 --------- Master/texmf-dist/doc/latex/bookcover/example1.pdf | Bin 287308 -> 275533 bytes .../doc/latex/bookcover/example2-oldmethod.tex | 95 ----------- Master/texmf-dist/doc/latex/bookcover/example2.pdf | Bin 240988 -> 170221 bytes Master/texmf-dist/doc/latex/bookcover/example2.tex | 31 +--- .../doc/latex/bookcover/figures/logo.pdf | Bin 70874 -> 0 bytes .../source/latex/bookcover/bookcover.dtx | 180 +++++---------------- .../texmf-dist/tex/latex/bookcover/bookcover.cls | 23 ++- 11 files changed, 151 insertions(+), 348 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/bookcover/example-oldmethod.tex delete mode 100644 Master/texmf-dist/doc/latex/bookcover/example1-oldmethod.tex delete mode 100644 Master/texmf-dist/doc/latex/bookcover/example2-oldmethod.tex delete mode 100644 Master/texmf-dist/doc/latex/bookcover/figures/logo.pdf diff --git a/Master/texmf-dist/doc/latex/bookcover/README b/Master/texmf-dist/doc/latex/bookcover/README index 2eb597e3dde..8afea1de9fb 100644 --- a/Master/texmf-dist/doc/latex/bookcover/README +++ b/Master/texmf-dist/doc/latex/bookcover/README @@ -1,6 +1,6 @@ bookcover class, 2015- by Tibor Tomacs -Class for book covers and dust jackets +This class helps typesetting book covers and dust jackets. This file may be distributed and/or modified under the conditions of the LaTeX Project Public License, either @@ -13,9 +13,9 @@ and version 1.2 or later is part of all distributions of LaTeX version 1999/12/01 or later. Install: - - Run 'latex bookcover.ins' for the bookcover.cls file. - - Run 'pdflatex example1.tex' for the example1.pdf - - Run 'pdflatex example2.tex' for the example2.pdf - - Run three times 'pdflatex bookcover.dtx' to get the documentation (bookcover.pdf). + - Run 'latex bookcover.ins' for bookcover.cls + - Run 'pdflatex example1.tex' for example1.pdf + - Run 'pdflatex example2.tex' for example2.pdf + - Run three times 'pdflatex bookcover.dtx' for bookcover.pdf diff --git a/Master/texmf-dist/doc/latex/bookcover/bookcover.pdf b/Master/texmf-dist/doc/latex/bookcover/bookcover.pdf index 6a6ece38f1e..62e4021917c 100644 Binary files a/Master/texmf-dist/doc/latex/bookcover/bookcover.pdf and b/Master/texmf-dist/doc/latex/bookcover/bookcover.pdf differ diff --git a/Master/texmf-dist/doc/latex/bookcover/example-oldmethod.tex b/Master/texmf-dist/doc/latex/bookcover/example-oldmethod.tex new file mode 100644 index 00000000000..35659072758 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookcover/example-oldmethod.tex @@ -0,0 +1,80 @@ +\documentclass[12pt,spinewidth=25mm,coverwidth=15cm,coverheight=20cm,flapwidth=6cm]{bookcover} +\usepackage{contour,lipsum} +\contourlength{1pt} +\definecolor{lightbrown}{RGB}{176,88,0} +\colorlet{title}{yellow!60!black} +\begin{document} + +% Black background color on the whole cover +\setbookcover{bgcolor}{whole}{color=black} + +% Brown background picture on the whole cover, without the flaps +\setbookcover{bgpic}{whole without flaps}{./figures/bg.jpg} + +% Vertical light brown transparent trails on the back cover by a tikz code +\setbookcover{bgtikz}{back}{ + \fill[opacity=0.3,color=lightbrown] + (0mm,0mm) rectangle (20mm,210mm) (100mm,0mm) rectangle (150mm,210mm);} + +% Vertical light brown transparent trails on the front cover by a tikz code +\setbookcover{bgtikz}{front}{ + \fill[opacity=0.3,color=lightbrown] + (0mm,0mm) rectangle (50mm,210mm) (130mm,0mm) rectangle (150mm,210mm);} + +% Remark +\setbookcover{fgfirst}{above front}{ + \color{blue}A DUST JACKET} + +% Text on the front cover +\setbookcover{fgfirst}{front}{ + \centering + \vspace{60mm} + \color{title}\sffamily\bfseries + \resizebox*{50mm}{8mm}{\contour[120]{black}{Rose Taylor}} + \par + \vspace{20mm} + \resizebox*{90mm}{40mm}{\parbox{35mm}{ + \centering + \contour[120]{black}{PROBABILITY}\\ + \contour[120]{black}{THEORY}\\}}} + +% Picture (cards.png) on the front, behind the title +\setbookcover{fgsecond}{front}{ + \vspace{70mm} + \centering + \includegraphics[width=8cm]{./figures/cards.png}} + +% Text on the spine +\setbookcover{fgfirst}{spine}{ + \vfill + \centering + \rotatebox[origin=c]{90}{\contour[120]{black}{ + \color{title}\huge\sffamily\bfseries + Rose Taylor -- Probability Theory}} + \vfill} + +% Text on the back cover +\setbookcover{fgfirst}{back}{ + \centering + \vspace{20mm} + \parbox{110mm}{\color{white}\lipsum[1]}} + +% Text and picture (dice.png) on the front flap +\setbookcover{fgfirst}{front flap}{ + \centering + \vspace{20mm} + \parbox{40mm}{\color{white}\lipsum[2]} + \vfill + \includegraphics[width=30mm]{./figures/dice.png} + \vspace{10mm}} + +% Text on the back flap +\setbookcover{fgfirst}{back flap}{ + \centering + \vspace{20mm} + \parbox{40mm}{\color{white}\lipsum[2]}} + +% Making the dust jucket +\makebookcover + +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/bookcover/example1-oldmethod.tex b/Master/texmf-dist/doc/latex/bookcover/example1-oldmethod.tex deleted file mode 100644 index 35659072758..00000000000 --- a/Master/texmf-dist/doc/latex/bookcover/example1-oldmethod.tex +++ /dev/null @@ -1,80 +0,0 @@ -\documentclass[12pt,spinewidth=25mm,coverwidth=15cm,coverheight=20cm,flapwidth=6cm]{bookcover} -\usepackage{contour,lipsum} -\contourlength{1pt} -\definecolor{lightbrown}{RGB}{176,88,0} -\colorlet{title}{yellow!60!black} -\begin{document} - -% Black background color on the whole cover -\setbookcover{bgcolor}{whole}{color=black} - -% Brown background picture on the whole cover, without the flaps -\setbookcover{bgpic}{whole without flaps}{./figures/bg.jpg} - -% Vertical light brown transparent trails on the back cover by a tikz code -\setbookcover{bgtikz}{back}{ - \fill[opacity=0.3,color=lightbrown] - (0mm,0mm) rectangle (20mm,210mm) (100mm,0mm) rectangle (150mm,210mm);} - -% Vertical light brown transparent trails on the front cover by a tikz code -\setbookcover{bgtikz}{front}{ - \fill[opacity=0.3,color=lightbrown] - (0mm,0mm) rectangle (50mm,210mm) (130mm,0mm) rectangle (150mm,210mm);} - -% Remark -\setbookcover{fgfirst}{above front}{ - \color{blue}A DUST JACKET} - -% Text on the front cover -\setbookcover{fgfirst}{front}{ - \centering - \vspace{60mm} - \color{title}\sffamily\bfseries - \resizebox*{50mm}{8mm}{\contour[120]{black}{Rose Taylor}} - \par - \vspace{20mm} - \resizebox*{90mm}{40mm}{\parbox{35mm}{ - \centering - \contour[120]{black}{PROBABILITY}\\ - \contour[120]{black}{THEORY}\\}}} - -% Picture (cards.png) on the front, behind the title -\setbookcover{fgsecond}{front}{ - \vspace{70mm} - \centering - \includegraphics[width=8cm]{./figures/cards.png}} - -% Text on the spine -\setbookcover{fgfirst}{spine}{ - \vfill - \centering - \rotatebox[origin=c]{90}{\contour[120]{black}{ - \color{title}\huge\sffamily\bfseries - Rose Taylor -- Probability Theory}} - \vfill} - -% Text on the back cover -\setbookcover{fgfirst}{back}{ - \centering - \vspace{20mm} - \parbox{110mm}{\color{white}\lipsum[1]}} - -% Text and picture (dice.png) on the front flap -\setbookcover{fgfirst}{front flap}{ - \centering - \vspace{20mm} - \parbox{40mm}{\color{white}\lipsum[2]} - \vfill - \includegraphics[width=30mm]{./figures/dice.png} - \vspace{10mm}} - -% Text on the back flap -\setbookcover{fgfirst}{back flap}{ - \centering - \vspace{20mm} - \parbox{40mm}{\color{white}\lipsum[2]}} - -% Making the dust jucket -\makebookcover - -\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/bookcover/example1.pdf b/Master/texmf-dist/doc/latex/bookcover/example1.pdf index 98e72340172..0f6cea1d750 100644 Binary files a/Master/texmf-dist/doc/latex/bookcover/example1.pdf and b/Master/texmf-dist/doc/latex/bookcover/example1.pdf differ diff --git a/Master/texmf-dist/doc/latex/bookcover/example2-oldmethod.tex b/Master/texmf-dist/doc/latex/bookcover/example2-oldmethod.tex deleted file mode 100644 index c08de67b702..00000000000 --- a/Master/texmf-dist/doc/latex/bookcover/example2-oldmethod.tex +++ /dev/null @@ -1,95 +0,0 @@ -\documentclass[markcolor=black,spinewidth=15mm,bgtikznodes]{bookcover} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage[english]{babel} -\usepackage{url} -\definecolor{amiyellow}{cmyk}{0,0,.5,0} -\begin{document} - -% The outside of the book cover - -% Yellow triangle on the back cover by tikz code -\setbookcover{bgtikz}{back}{ - \fill[color=amiyellow](.5,.5)--(17.5,24.5)--(17.5,0)--(.5,0)--cycle;} - -% Yellow triangle on the front cover by tikz code -\setbookcover{bgtikz}{front}{ - \fill[color=amiyellow](0,0)--(0,24.5)--(17,.5)--(17,0)--cycle;} - -% Yellow background color on the spine -\setbookcover{bgcolor}{spine}{color=amiyellow} - -% Remark -\setbookcover{fgfirst}{above front}{ - \color{red}\textsc{Annales Mathematicae et Informaticae} book cover -- outside} - -% Text on the spine -\setbookcover{fgfirst}{spine}{ - \vfill - \centering - \rotatebox[origin=c]{90}{ - \footnotesize\bfseries - ANNALES MATHEMATICAE ET INFORMATICAE 43.\ (2014)} - \vfill} - -% Text and pictures (summa.pdf, ekflogo.pdf) on the front cover -\setbookcover{fgfirst}{front}{ - \vspace{30.5mm} - \centering - {\huge\bfseries ANNALES\\ MATHEMATICAE ET\\ INFORMATICAE\\[13mm]} - {\large\bfseries TOMUS 43.\ (2014)}\\[10mm] - \includegraphics{./figures/summa.pdf}\\[5mm] - {\large COMMISSIO REDACTORIUM}\\[3mm] - \parbox{123mm}{ - \centering - Sándor Bácsó (Debrecen), Sonja Gorjanc (Zagreb), Tibor Gyimóthy (Szeged),\\ - Miklós Hoffmann (Eger), József Holovács (Eger), László Kovács (Miskolc),\\ - László Kozma (Budapest), Kálmán Liptai (Eger), Florian Luca (Mexico),\\ - Giuseppe Mastroianni (Potenza), Ferenc Mátyás (Eger),\\ - Ákos Pintér (Debrecen), Miklós Rontó (Miskolc), László Szalay (Sopron),\\ - János Sztrik (Debrecen), Gary Walsh (Ottawa)\par} - \vfill - \includegraphics[height=20mm]{./figures/logo.pdf} - \vfill - {\large\bfseries HUNGARIA, EGER} - \vfill} - -% Making the outside book cover -\makebookcover - -% The inside of the book cover - -% Remark -\setbookcover{fgfirst}{above front}{ - \color{red}\textsc{Annales Mathematicae et Informaticae} book cover -- inside} - -% Text on the front cover (it is back of the inside book cover!) -\setbookcover{fgfirst}{front}{ - \vspace{27mm} - \begin{center} - \bfseries - ANNALES MATHEMATICAE ET INFORMATICAE\\[3mm] - International journal for mathematics and computer science\\[3mm] - Referred by\\ - Zentralblatt für Mathematik\\ - and\\ - Mathematical Reviews\\ - \end{center} - \bigskip - \begin{center} - \parbox{126mm}{ - The journal of the Institute of Mathematics and Informatics of - Eszterházy Károly University is open for scientific publications - in mathematics and computer science, where the field of number - theory, group theory, constructive and computer aided geometry - as well as theoretical and practical aspects of programming - languages receive particular emphasis. Methodological papers - are also welcome. Papers submitted to the journal should be - written in English. Only new and unpublished material can be - accepted.} - \end{center}} - -% Making the inside book cover -\makebookcover - -\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/bookcover/example2.pdf b/Master/texmf-dist/doc/latex/bookcover/example2.pdf index 5eca3352ec5..8cff522178b 100644 Binary files a/Master/texmf-dist/doc/latex/bookcover/example2.pdf and b/Master/texmf-dist/doc/latex/bookcover/example2.pdf differ diff --git a/Master/texmf-dist/doc/latex/bookcover/example2.tex b/Master/texmf-dist/doc/latex/bookcover/example2.tex index f4e55237cd2..9444376f895 100644 --- a/Master/texmf-dist/doc/latex/bookcover/example2.tex +++ b/Master/texmf-dist/doc/latex/bookcover/example2.tex @@ -2,7 +2,7 @@ \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} -\usepackage{url} +\usepackage{url,lipsum} \definecolor{amiyellow}{cmyk}{0,0,.5,0} \begin{document} @@ -35,21 +35,13 @@ \centering {\huge\bfseries ANNALES\\ MATHEMATICAE ET\\ INFORMATICAE\\[13mm]} {\large\bfseries TOMUS 43.\ (2014)}\\[10mm] - \includegraphics{./figures/summa.pdf}\\[5mm] - {\large COMMISSIO REDACTORIUM}\\[3mm] - \parbox{123mm}{ - \centering - Sándor Bácsó (Debrecen), Sonja Gorjanc (Zagreb), Tibor Gyimóthy (Szeged),\\ - Miklós Hoffmann (Eger), József Holovács (Eger), László Kovács (Miskolc),\\ - László Kozma (Budapest), Kálmán Liptai (Eger), Florian Luca (Mexico),\\ - Giuseppe Mastroianni (Potenza), Ferenc Mátyás (Eger),\\ - Ákos Pintér (Debrecen), Miklós Rontó (Miskolc), László Szalay (Sopron),\\ - János Sztrik (Debrecen), Gary Walsh (Ottawa)\par} + \includegraphics{./figures/summa.pdf} \vfill - \includegraphics[height=20mm]{./figures/logo.pdf} + {\large COMMISSIO REDACTORIUM}\\[3mm] + \parbox{123mm}{\centering\lipsum[2]\par} \vfill - {\large\bfseries HUNGARIA, EGER} - \vfill} + {\large\bfseries HUNGARIA} + \vspace{10mm}} \end{bookcover} @@ -74,16 +66,7 @@ \end{center} \bigskip \begin{center} - \parbox{126mm}{ - The journal of the Institute of Mathematics and Informatics of - Eszterházy Károly University is open for scientific publications - in mathematics and computer science, where the field of number - theory, group theory, constructive and computer aided geometry - as well as theoretical and practical aspects of programming - languages receive particular emphasis. Methodological papers - are also welcome. Papers submitted to the journal should be - written in English. Only new and unpublished material can be - accepted.} + \parbox{126mm}{\lipsum[1]} \end{center}} \end{bookcover} diff --git a/Master/texmf-dist/doc/latex/bookcover/figures/logo.pdf b/Master/texmf-dist/doc/latex/bookcover/figures/logo.pdf deleted file mode 100644 index 15d444ff75d..00000000000 Binary files a/Master/texmf-dist/doc/latex/bookcover/figures/logo.pdf and /dev/null differ diff --git a/Master/texmf-dist/source/latex/bookcover/bookcover.dtx b/Master/texmf-dist/source/latex/bookcover/bookcover.dtx index bb80b817c1e..5750432322a 100644 --- a/Master/texmf-dist/source/latex/bookcover/bookcover.dtx +++ b/Master/texmf-dist/source/latex/bookcover/bookcover.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2015-2016 by Tibor Tomacs +% Copyright (C) 2015- by Tibor Tomacs % % This file may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.2 @@ -17,11 +17,11 @@ % \iffalse %<*driver> \ProvidesFile{bookcover.dtx} -\newcommand{\eifiledate}{2017/04/13} -\newcommand{\eifilever}{v2.1} +\newcommand{\eifiledate}{2018/01/09} +\newcommand{\eifilever}{v2.2} % %\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] % %<*driver> \documentclass{ltxdoc} @@ -157,7 +157,7 @@ % % \subsection{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{xcolor}, \texttt{ifthen}, \texttt{tikz}, \texttt{eso-pic}, \texttt{textpos}. +% \texttt{kvoptions}, \texttt{ifxetex}, \texttt{textpos}, \texttt{geometry}, \texttt{graphicx}, \texttt{calc}, \texttt{ifthen}, \texttt{tikz}, \texttt{eso-pic}. % % \medskip\noindent % Load the class as usual, with @@ -523,28 +523,18 @@ % \lstinputlisting[style=examplefile]{example1.tex} % % \subsubsection{A two-sided book cover} -% \begin{figure}[H] -% \centering -% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} -% \fcolorbox{black!50}{white}{\includegraphics[page=1,width=\textwidth-15mm]{example2}} -% \caption{Outside}\label{fig:twosidedbookcover-outside} -% -% \end{figure} -% \begin{figure}[H] -% \centering -% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} +% \begin{center} +% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt}% +% \fcolorbox{black!50}{white}{\includegraphics[page=1,width=\textwidth-15mm]{example2}}\\[2mm] % \fcolorbox{black!50}{white}{\includegraphics[page=2,width=\textwidth-15mm]{example2}} -% \caption{Inside}\label{fig:twosidedbookcover-inside} -% \end{figure} +% \end{center} % \lstinputlisting[style=examplefile]{example2.tex} % % \subsubsection{Drawing bar code by pst-barcode package} -% \begin{figure}[H] -% \centering +% \begin{center} % \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} % \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-15mm]{figures/barcode}} -% \caption{}\label{fig:barcode} -% \end{figure} +% \end{center} % % \begin{examplelst} % \documentclass{bookcover} @@ -554,7 +544,7 @@ % \bookcovercomponent{normal}{back}{ % \vfill % \centering -% \begin{pspicture}(1in,1.5in) +% \begin{pspicture}(1.5in,1in) % \psbarcode{1787-6117}{includetext height=1 width=1.5}{issn} % \end{pspicture} % \vspace{5mm}} @@ -562,7 +552,7 @@ % \end{document} % \end{examplelst} % -% \noindent We can compile this file by \texttt{latex.exe} only. If you want to use another compiler, then choose the following way: +% \noindent We can compile this file with \texttt{latex.exe} or \texttt{xelatex.exe}. If you want to use another compiler, then choose the following way: % % \begin{examplelst} % \documentclass{bookcover} @@ -573,7 +563,7 @@ % \usepackage{pst-barcode} % \pagestyle{empty} % \begin{document} -% \begin{pspicture}(1in,1.5in) +% \begin{pspicture}(1.5in,1in) % \psbarcode{1787-6117}{includetext height=1 width=1.5}{issn} % \end{pspicture} % \end{document} @@ -602,39 +592,19 @@ % \end{commandlinelst} % or % \begin{commandlinelst} -% xelatex -shell-escape filename -% \end{commandlinelst} -% or -% \begin{commandlinelst} % lualatex -shell-escape filename % \end{commandlinelst} % -% \noindent where the \texttt{filename} is not \texttt{bar.tex} or \texttt{barcode.tex}. The following code works by \texttt{xelatex.exe} without option \texttt{-shell-escape}: -% -% \begin{examplelst} -% \documentclass{bookcover} -% \usepackage{pst-barcode} -% \begin{document} -% \makeatletter\TP@absposfalse\makeatother -% \newgeometry{left=0em,top=-1em} -% \begin{bookcover} -% \bookcovercomponent{normal}{back}{ -% \vfill -% \centering -% \begin{pspicture}(1in,1.5in) -% \psbarcode{1787-6117}{includetext height=1 width=1.5}{issn} -% \end{pspicture} -% \vspace{5mm}} -% \end{bookcover} -% \end{document} -% \end{examplelst} +% \medskip\noindent where the \texttt{filename} is not \texttt{bar.tex} or \texttt{barcode.tex}. % % \section{Old method} +% % \begin{info} -% \color{red}\large\faWarning\ \textbf{Attention!} The goal of the \emph{old method} is to be compatible with the earlier versions of the \texttt{bookcover} class. It is recommended to use the \hyperref[sec:mainmethod]{\em main method} in the future, because it is much more flexible than the old one! +% \color{red}\large\faWarning\ The goal of the \emph{old method} is to be compatible with the earlier versions of the \texttt{bookcover} class. It is recommended to use the \hyperref[sec:mainmethod]{\em main method} in the future, because it is much more flexible than the old one! % \end{info} % % \subsection{Commands} +% % \begin{commandlst} % \setbookcover{!
!}{!!}{!!} % \end{commandlst} @@ -836,98 +806,9 @@ % \end{examplelst} % \noindent the \texttt{TEXT} is above the \texttt{fig3.jpg}, the \texttt{fig3.jpg} is above the \texttt{fig2.jpg} and the \texttt{fig2.jpg} is above the \texttt{fig1.jpg}. % -% \subsection{Full examples} -% \subsubsection{A dust jacket} +% \subsection{Full example} % See Figure \ref{fig:dustjacket}. -% \lstinputlisting[style=examplefile]{example1-oldmethod.tex} -% -% \subsubsection{A two-sided book cover} -% See Figure \ref{fig:twosidedbookcover-outside} and \ref{fig:twosidedbookcover-inside}. -% \lstinputlisting[style=examplefile]{example2-oldmethod.tex} -% -% \subsubsection{Drawing bar code by pst-barcode package} -% -% See Figure \ref{fig:barcode}. -% -% \begin{examplelst} -% \documentclass{bookcover} -% \usepackage{pst-barcode} -% \begin{document} -% \setbookcover{fgfirst}{back}{ -% \vfill -% \centering -% \begin{pspicture}(1in,1.5in) -% \psbarcode{1787-6117}{includetext height=1 width=1.5}{issn} -% \end{pspicture} -% \vspace{5mm}} -% \makebookcover -% \end{document} -% \end{examplelst} -% -% \noindent We can compile this file by \texttt{latex.exe} only. If you want to use another compiler, then choose the following way: -% -% \begin{examplelst} -% \documentclass{bookcover} -% -% \usepackage{shellesc,filecontents} -% \begin{filecontents*}{bar.tex} -% \documentclass{article} -% \usepackage{pst-barcode} -% \pagestyle{empty} -% \begin{document} -% \begin{pspicture}(1in,1.5in) -% \psbarcode{1787-6117}{includetext height=1 width=1.5}{issn} -% \end{pspicture} -% \end{document} -% \end{filecontents*} -% -% \ShellEscape{ -% latex bar.tex && -% dvips bar.dvi && -% ps2pdf bar.ps && -% pdfcrop -hires bar.pdf barcode.pdf} -% -% \begin{document} -% \setbookcover{fgfirst}{back}{ -% \vfill -% \centering -% \includegraphics{barcode} -% \vspace{5mm}} -% \makebookcover -% \end{document} -% \end{examplelst} -% -% \noindent The command to compile this file is the following: -% \begin{commandlinelst} -% pdflatex -shell-escape filename -% \end{commandlinelst} -% or -% \begin{commandlinelst} -% xelatex -shell-escape filename -% \end{commandlinelst} -% or -% \begin{commandlinelst} -% lualatex -shell-escape filename -% \end{commandlinelst} -% -% \noindent where the \texttt{filename} is not \texttt{bar.tex} or \texttt{barcode.tex}. The following code works by \texttt{xelatex.exe} without option \texttt{-shell-escape}: -% -% \begin{examplelst} -% \documentclass{bookcover} -% \usepackage{pst-barcode} -% \begin{document} -% \makeatletter\TP@absposfalse\makeatother -% \newgeometry{left=0em,top=-1em} -% \setbookcover{fgfirst}{back}{ -% \vfill -% \centering -% \begin{pspicture}(1in,1.5in) -% \psbarcode{1787-6117}{includetext height=1 width=1.5}{issn} -% \end{pspicture} -% \vspace{5mm}} -% \makebookcover -% \end{document} -% \end{examplelst} +% \lstinputlisting[style=examplefile]{example-oldmethod.tex} % % \newpage % \thispagestyle{empty} @@ -970,8 +851,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} @@ -1012,6 +898,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 @@ -1157,7 +1055,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 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 -- cgit v1.2.3