From 362e328e33bb4ae48fbc7be834631952ed6028f8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 22 Jan 2018 22:48:08 +0000 Subject: bookcover (22jan18) git-svn-id: svn://tug.org/texlive/trunk@46410 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bookcover/README | 4 +- .../bookcover/bookcover-example-obsoletemethod.tex | 82 +++ .../doc/latex/bookcover/bookcover-example1.pdf | Bin 0 -> 276015 bytes .../doc/latex/bookcover/bookcover-example1.tex | 83 +++ .../doc/latex/bookcover/bookcover-example2.pdf | Bin 0 -> 170223 bytes .../doc/latex/bookcover/bookcover-example2.tex | 74 +++ .../texmf-dist/doc/latex/bookcover/bookcover.pdf | Bin 1527538 -> 1452803 bytes .../doc/latex/bookcover/example-oldmethod.tex | 80 --- Master/texmf-dist/doc/latex/bookcover/example1.pdf | Bin 275533 -> 0 bytes Master/texmf-dist/doc/latex/bookcover/example1.tex | 82 --- Master/texmf-dist/doc/latex/bookcover/example2.pdf | Bin 170221 -> 0 bytes Master/texmf-dist/doc/latex/bookcover/example2.tex | 74 --- .../doc/latex/bookcover/figures/barcode.pdf | Bin 2645 -> 4978 bytes .../doc/latex/bookcover/figures/ruler.pdf | Bin 14502 -> 11976 bytes .../source/latex/bookcover/bookcover.dtx | 624 ++++++--------------- .../texmf-dist/tex/latex/bookcover/bookcover.cls | 179 ++---- 16 files changed, 449 insertions(+), 833 deletions(-) create mode 100644 Master/texmf-dist/doc/latex/bookcover/bookcover-example-obsoletemethod.tex create mode 100644 Master/texmf-dist/doc/latex/bookcover/bookcover-example1.pdf create mode 100644 Master/texmf-dist/doc/latex/bookcover/bookcover-example1.tex create mode 100644 Master/texmf-dist/doc/latex/bookcover/bookcover-example2.pdf create mode 100644 Master/texmf-dist/doc/latex/bookcover/bookcover-example2.tex delete mode 100644 Master/texmf-dist/doc/latex/bookcover/example-oldmethod.tex delete mode 100644 Master/texmf-dist/doc/latex/bookcover/example1.pdf delete mode 100644 Master/texmf-dist/doc/latex/bookcover/example1.tex delete mode 100644 Master/texmf-dist/doc/latex/bookcover/example2.pdf delete mode 100644 Master/texmf-dist/doc/latex/bookcover/example2.tex (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/bookcover/README b/Master/texmf-dist/doc/latex/bookcover/README index 8afea1de9fb..b34e7927c86 100644 --- a/Master/texmf-dist/doc/latex/bookcover/README +++ b/Master/texmf-dist/doc/latex/bookcover/README @@ -14,8 +14,8 @@ LaTeX version 1999/12/01 or later. Install: - Run 'latex bookcover.ins' for bookcover.cls - - Run 'pdflatex example1.tex' for example1.pdf - - Run 'pdflatex example2.tex' for example2.pdf + - Run 'pdflatex bookcover-example1.tex' for bookcover-example1.pdf + - Run 'pdflatex bookcover-example2.tex' for bookcover-example2.pdf - Run three times 'pdflatex bookcover.dtx' for bookcover.pdf diff --git a/Master/texmf-dist/doc/latex/bookcover/bookcover-example-obsoletemethod.tex b/Master/texmf-dist/doc/latex/bookcover/bookcover-example-obsoletemethod.tex new file mode 100644 index 00000000000..4d12768ccb0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookcover/bookcover-example-obsoletemethod.tex @@ -0,0 +1,82 @@ +\documentclass[spinewidth=25mm,coverwidth=15cm,coverheight=20cm,flapwidth=6cm]{bookcover} +\usepackage[outline]{contour} +\usepackage{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{black}{Rose Taylor}} + \par + \vspace{20mm} + \resizebox*{90mm}{40mm}{\parbox{35mm}{ + \centering + \contour{black}{PROBABILITY}\\ + \contour{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{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/bookcover-example1.pdf b/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.pdf new file mode 100644 index 00000000000..f3d0f46efda Binary files /dev/null and b/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.pdf differ diff --git a/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.tex b/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.tex new file mode 100644 index 00000000000..446263394c8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookcover/bookcover-example1.tex @@ -0,0 +1,83 @@ +\documentclass[spinewidth=25mm,coverwidth=15cm,coverheight=20cm,flapwidth=6cm]{bookcover} +\newbookcovercomponenttype{center rotate}{ + \parbox[t][\partheight][c]{\partwidth}{ + \begin{center} + \rotatebox[origin=c]{90}{#1} + \end{center}}} +\usepackage[outline]{contour} +\usepackage{lipsum} +\contourlength{1pt} +\definecolor{lightbrown}{RGB}{176,88,0} +\colorlet{title}{yellow!60!black} +\begin{document} + +\begin{bookcover} + +% Black background color on the whole cover +\bookcovercomponent{color}{bg whole}{color=black} + +% Brown background picture on the whole cover, without the flaps +\bookcovercomponent{picture}{bg whole without flaps}{./figures/bg.jpg} + +% Vertical light brown transparent trails on the back cover by a tikz code +\bookcovercomponent{tikz}{bg 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 +\bookcovercomponent{tikz}{bg front}{ + \fill[opacity=0.3,color=lightbrown] + (0mm,0mm) rectangle (50mm,210mm) (130mm,0mm) rectangle (150mm,210mm);} + +% Remark +\bookcovercomponent{center}{above front}{ + \color{blue}A DUST JACKET} + +% Picture (cards.png) on the front, behind the title +\bookcovercomponent{normal}{front}{ + \vspace{70mm} + \centering + \includegraphics[width=8cm]{./figures/cards.png}} + +% Text on the front cover +\bookcovercomponent{normal}{front}{ + \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}\\}}} + +% Text on the spine +\bookcovercomponent{center rotate}{spine}{% + \contour{black}{% + \color{title}\huge\sffamily\bfseries% + Rose Taylor -- Probability Theory}} + +% Text on the back cover +\bookcovercomponent{normal}{back}{ + \centering + \vspace{20mm} + \parbox{110mm}{\color{white}\lipsum[1]}} + +% Text and picture (dice.png) on the front flap +\bookcovercomponent{normal}{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 +\bookcovercomponent{normal}{back flap}{ + \centering + \vspace{20mm} + \parbox{40mm}{\color{white}\lipsum[2]}} + +\end{bookcover} + +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.pdf b/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.pdf new file mode 100644 index 00000000000..06c4eb6fc6b Binary files /dev/null and b/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.pdf differ diff --git a/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.tex b/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.tex new file mode 100644 index 00000000000..9444376f895 --- /dev/null +++ b/Master/texmf-dist/doc/latex/bookcover/bookcover-example2.tex @@ -0,0 +1,74 @@ +\documentclass[markcolor=black,spinewidth=15mm]{bookcover} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english]{babel} +\usepackage{url,lipsum} +\definecolor{amiyellow}{cmyk}{0,0,.5,0} +\begin{document} + +% The outside of the book cover +\begin{bookcover} + +% Yellow triangle on the back cover by tikz code +\bookcovercomponent{tikz}{bg 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 +\bookcovercomponent{tikz}{bg front}{ + \fill[color=amiyellow](0,0)--(0,24.5)--(17,.5)--(17,0)--cycle;} + +% Yellow background color on the spine +\bookcovercomponent{color}{bg spine}{color=amiyellow} + +% Remark +\bookcovercomponent{center}{above front}{ + \color{red}\textsc{Annales Mathematicae et Informaticae} book cover -- outside} + +% Text on the spine +\bookcovercomponent{center}{spine}{ + \rotatebox[origin=c]{90}{\footnotesize\bfseries + ANNALES MATHEMATICAE ET INFORMATICAE 43.\ (2014)}} + +% Text and pictures (summa.pdf, ekflogo.pdf) on the front cover +\bookcovercomponent{normal}{front}{ + \vspace{30.5mm} + \centering + {\huge\bfseries ANNALES\\ MATHEMATICAE ET\\ INFORMATICAE\\[13mm]} + {\large\bfseries TOMUS 43.\ (2014)}\\[10mm] + \includegraphics{./figures/summa.pdf} + \vfill + {\large COMMISSIO REDACTORIUM}\\[3mm] + \parbox{123mm}{\centering\lipsum[2]\par} + \vfill + {\large\bfseries HUNGARIA} + \vspace{10mm}} + +\end{bookcover} + +% The inside of the book cover +\begin{bookcover} + +% Remark +\bookcovercomponent{center}{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!) +\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ür Mathematik\\ + and\\ + Mathematical Reviews\\ + \end{center} + \bigskip + \begin{center} + \parbox{126mm}{\lipsum[1]} + \end{center}} + +\end{bookcover} + +\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/bookcover/bookcover.pdf b/Master/texmf-dist/doc/latex/bookcover/bookcover.pdf index 62e4021917c..204238ba833 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 deleted file mode 100644 index 35659072758..00000000000 --- a/Master/texmf-dist/doc/latex/bookcover/example-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 deleted file mode 100644 index 0f6cea1d750..00000000000 Binary files a/Master/texmf-dist/doc/latex/bookcover/example1.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/bookcover/example1.tex b/Master/texmf-dist/doc/latex/bookcover/example1.tex deleted file mode 100644 index 6f44f29be0a..00000000000 --- a/Master/texmf-dist/doc/latex/bookcover/example1.tex +++ /dev/null @@ -1,82 +0,0 @@ -\documentclass[12pt,spinewidth=25mm,coverwidth=15cm,coverheight=20cm,flapwidth=6cm]{bookcover} -\newbookcovercomponenttype{center rotate}{ - \parbox[t][\partheight][c]{\partwidth}{ - \begin{center} - \rotatebox[origin=c]{90}{#1} - \end{center}}} -\usepackage{contour,lipsum} -\contourlength{1pt} -\definecolor{lightbrown}{RGB}{176,88,0} -\colorlet{title}{yellow!60!black} -\begin{document} - -\begin{bookcover} - -% Black background color on the whole cover -\bookcovercomponent{color}{bg whole}{color=black} - -% Brown background picture on the whole cover, without the flaps -\bookcovercomponent{picture}{bg whole without flaps}{./figures/bg.jpg} - -% Vertical light brown transparent trails on the back cover by a tikz code -\bookcovercomponent{tikz}{bg 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 -\bookcovercomponent{tikz}{bg front}{ - \fill[opacity=0.3,color=lightbrown] - (0mm,0mm) rectangle (50mm,210mm) (130mm,0mm) rectangle (150mm,210mm);} - -% Remark -\bookcovercomponent{center}{above front}{ - \color{blue}A DUST JACKET} - -% Picture (cards.png) on the front, behind the title -\bookcovercomponent{normal}{front}{ - \vspace{70mm} - \centering - \includegraphics[width=8cm]{./figures/cards.png}} - -% Text on the front cover -\bookcovercomponent{normal}{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}\\}}} - -% Text on the spine -\bookcovercomponent{center rotate}{spine}{ - \contour[120]{black}{ - \color{title}\huge\sffamily\bfseries - Rose Taylor -- Probability Theory}} - -% Text on the back cover -\bookcovercomponent{normal}{back}{ - \centering - \vspace{20mm} - \parbox{110mm}{\color{white}\lipsum[1]}} - -% Text and picture (dice.png) on the front flap -\bookcovercomponent{normal}{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 -\bookcovercomponent{normal}{back flap}{ - \centering - \vspace{20mm} - \parbox{40mm}{\color{white}\lipsum[2]}} - -\end{bookcover} - -\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 deleted file mode 100644 index 8cff522178b..00000000000 Binary files a/Master/texmf-dist/doc/latex/bookcover/example2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/bookcover/example2.tex b/Master/texmf-dist/doc/latex/bookcover/example2.tex deleted file mode 100644 index 9444376f895..00000000000 --- a/Master/texmf-dist/doc/latex/bookcover/example2.tex +++ /dev/null @@ -1,74 +0,0 @@ -\documentclass[markcolor=black,spinewidth=15mm]{bookcover} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage[english]{babel} -\usepackage{url,lipsum} -\definecolor{amiyellow}{cmyk}{0,0,.5,0} -\begin{document} - -% The outside of the book cover -\begin{bookcover} - -% Yellow triangle on the back cover by tikz code -\bookcovercomponent{tikz}{bg 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 -\bookcovercomponent{tikz}{bg front}{ - \fill[color=amiyellow](0,0)--(0,24.5)--(17,.5)--(17,0)--cycle;} - -% Yellow background color on the spine -\bookcovercomponent{color}{bg spine}{color=amiyellow} - -% Remark -\bookcovercomponent{center}{above front}{ - \color{red}\textsc{Annales Mathematicae et Informaticae} book cover -- outside} - -% Text on the spine -\bookcovercomponent{center}{spine}{ - \rotatebox[origin=c]{90}{\footnotesize\bfseries - ANNALES MATHEMATICAE ET INFORMATICAE 43.\ (2014)}} - -% Text and pictures (summa.pdf, ekflogo.pdf) on the front cover -\bookcovercomponent{normal}{front}{ - \vspace{30.5mm} - \centering - {\huge\bfseries ANNALES\\ MATHEMATICAE ET\\ INFORMATICAE\\[13mm]} - {\large\bfseries TOMUS 43.\ (2014)}\\[10mm] - \includegraphics{./figures/summa.pdf} - \vfill - {\large COMMISSIO REDACTORIUM}\\[3mm] - \parbox{123mm}{\centering\lipsum[2]\par} - \vfill - {\large\bfseries HUNGARIA} - \vspace{10mm}} - -\end{bookcover} - -% The inside of the book cover -\begin{bookcover} - -% Remark -\bookcovercomponent{center}{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!) -\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ür Mathematik\\ - and\\ - Mathematical Reviews\\ - \end{center} - \bigskip - \begin{center} - \parbox{126mm}{\lipsum[1]} - \end{center}} - -\end{bookcover} - -\end{document} \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/bookcover/figures/barcode.pdf b/Master/texmf-dist/doc/latex/bookcover/figures/barcode.pdf index 367629c03e0..8ebc815498b 100644 Binary files a/Master/texmf-dist/doc/latex/bookcover/figures/barcode.pdf and b/Master/texmf-dist/doc/latex/bookcover/figures/barcode.pdf differ diff --git a/Master/texmf-dist/doc/latex/bookcover/figures/ruler.pdf b/Master/texmf-dist/doc/latex/bookcover/figures/ruler.pdf index fcb1c4b20a4..73ec878781a 100644 Binary files a/Master/texmf-dist/doc/latex/bookcover/figures/ruler.pdf and b/Master/texmf-dist/doc/latex/bookcover/figures/ruler.pdf differ diff --git a/Master/texmf-dist/source/latex/bookcover/bookcover.dtx b/Master/texmf-dist/source/latex/bookcover/bookcover.dtx index 5750432322a..304ad059fe5 100644 --- a/Master/texmf-dist/source/latex/bookcover/bookcover.dtx +++ b/Master/texmf-dist/source/latex/bookcover/bookcover.dtx @@ -17,11 +17,11 @@ % \iffalse %<*driver> \ProvidesFile{bookcover.dtx} -\newcommand{\eifiledate}{2018/01/09} -\newcommand{\eifilever}{v2.2} +\newcommand{\eifiledate}{2018/01/21} +\newcommand{\eifilever}{v2.3} % %\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%\ProvidesClass{bookcover}[2018/01/09 v2.2 class for book covers and dust jackets] +%\ProvidesClass{bookcover}[2018/01/21 v2.3 class for book covers and dust jackets] % %<*driver> \documentclass{ltxdoc} @@ -29,9 +29,9 @@ \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,pdfborder={0 0 0},colorlinks,linktocpage,allcolors=teal]{hyperref} +\usepackage[unicode,pdfstartview=FitH,bookmarksnumbered,colorlinks,allcolors=teal]{hyperref} \usepackage[english]{babel} -\usepackage{xcolor,graphicx,listings,calc,multirow,caption,float,array,pdfpages,fontawesome,tcolorbox,tikz} +\usepackage{xcolor,graphicx,listings,calc,multirow,array,pdfpages} \colorlet{command}{blue!80!black} \colorlet{example}{black} @@ -40,20 +40,12 @@ \lstnewenvironment{examplelst}{\lstset{ gobble=2, - belowskip=\bigskipamount, + belowskip=5mm, basicstyle=\color{example}\small\ttfamily, backgroundcolor=\color{black!10}, columns=fullflexible, keepspaces}}{} -\lstnewenvironment{commandlinelst}{\lstset{ - gobble=2, - basicstyle=\small\ttfamily, - belowskip=\medskipamount, - backgroundcolor=\color{white}, - columns=fullflexible, - keepspaces}}{} - \lstnewenvironment{commandlst}{\lstset{ literate={<}{{$\langle$}}1{>}{{$\rangle$}}1, delim=[is][\color{param}\normalfont\itshape\small]{!}{!}, @@ -65,7 +57,7 @@ \lstdefinestyle{examplefile}{ literate={ü}{{\"u}}1{ó}{{\'o}}1{é}{{\'e}}1{á}{{\'a}}1{Á}{{\'A}}1, - belowskip=\bigskipamount, + belowskip=5mm, basicstyle=\color{example}\small\ttfamily, backgroundcolor=\color{black!10}, columns=fullflexible, @@ -83,11 +75,7 @@ \def\meta#1{{\color{param}\normalfont\itshape\small$\langle$#1$\rangle$}} -\usetikzlibrary{shapes} -\def\example{\tikz\draw node[signal,signal from=west,signal to=east,inner sep=2.7pt,left color=command,right color=black,text=white]{\footnotesize\sffamily EXAMPLE};} - -\tcbuselibrary{skins} -\newtcolorbox{info}{enhanced jigsaw,frame style={left color=red,right color=black},colback=white,lifted shadow={1mm}{-2mm}{3mm}{0.1mm}{fill=black!50!white,opacity=0.5}} +\def\example{\colorbox{command}{\footnotesize\sffamily\bfseries\color{white}EXAMPLE}} \def\BookCover{{\def\sfdefault{ugq}\sffamily\bfseries \color{gray}\mbox{}\lower.15ex\hbox{[B}ook% @@ -118,22 +106,15 @@ % \GetFileInfo{bookcover.cls} % % \title{{\Huge\BookCover\\[5mm]} -% Class for book covers and dust jackets\\ +% Class for book covers and dust jackets\\[2mm] % \textsf{bookcover.cls}\\ % {\large\eifilever\ (\eifiledate)}} % \author{Tibor Tómács\\{\normalsize\href{mailto:tomacs.tibor@uni-eszterhazy.hu}{\texttt{tomacs.tibor@uni-eszterhazy.hu}}}} % \date{} % \maketitle % -% \begin{abstract} -% The \texttt{bookcover} document class is provided to assist generating book covers and dust jackets. Using this class, there are two ways you can create the output, namely the \emph{main} and the \emph{old method}. The goal of the \emph{old method} is to be compatible with the earlier versions of the \texttt{bookcover} document class. It is recommended to use the \emph{main method} in the future, because it is much more flexible than the old one. -% \end{abstract} -% -% \tableofcontents -% % \section{Introduction} -% \subsection{Book cover parts} -% In the following picture we can see a typical dust jacket. Its main parts are back flap, back, spine, front and front flap. +% 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. % \begin{center} % \includegraphics{figures/cover} @@ -143,21 +124,13 @@ % \includegraphics{figures/coverscheme} % \end{center} % We get the following result after trimming: -% \begin{figure}[H] -% \centering -% \includegraphics{figures/result} -% \caption{}\label{fig:trimmed} -% \end{figure} -% -% \subsection{Book cover sizes}\label{subsec:sizes} -% We have to give the following sizes to prepare a cover (see the next figure): \texttt{coverwidth}, \texttt{coverheight}, \texttt{spinewidth}, \texttt{flapwidth}, \texttt{marklength}, \texttt{bleedwidth}. % \begin{center} -% \includegraphics{figures/sizes} +% \includegraphics{figures/result} % \end{center} % -% \subsection{Loading class} +% \section{Loading class} % The class \texttt{bookcover} requires the services of the class \texttt{article} and the following packages: -% \texttt{kvoptions}, \texttt{ifxetex}, \texttt{textpos}, \texttt{geometry}, \texttt{graphicx}, \texttt{calc}, \texttt{ifthen}, \texttt{tikz}, \texttt{eso-pic}. +% \texttt{kvoptions}, \texttt{textpos}, \texttt{geometry}, \texttt{graphicx}, \texttt{calc}, \texttt{ifthen}, \texttt{tikz}, \texttt{fgruler}. % % \medskip\noindent % Load the class as usual, with @@ -166,34 +139,34 @@ % \end{commandlst} % % \begin{center} -% \begin{tabular}{@{}llr@{}} +% \begin{tabular}{@{}l@{}l@{\hspace{-13mm}}r@{}} % \textbf{option} & \textbf{description} & \textbf{default value}\\ % \hline -% \commandinline|coverwidth=!!| & See Subsection \ref{subsec:sizes}. & \texttt{170mm}\\ -% \commandinline|coverheight=!!| & See Subsection \ref{subsec:sizes}. & \texttt{240mm}\\ -% \commandinline|spinewidth=!!| & See Subsection \ref{subsec:sizes}. & \texttt{5mm}\\ -% \commandinline|flapwidth=!!| & See Subsection \ref{subsec:sizes}. & \texttt{0mm}\\ -% \commandinline|marklength=!!| & See Subsection \ref{subsec:sizes}. & \texttt{10mm}\\ -% \commandinline|bleedwidth=!!| & See Subsection \ref{subsec:sizes}. & \texttt{5mm}\\ -% \commandinline|markthick=!!| & Thickness of marks. & \texttt{0.4pt}\\ -% \commandinline|markcolor=!!| & Color of marks. & \texttt{red}\\ -% \commandinline|10pt| & Normal font size is 10\,pt (default option).&\\ -% \commandinline|11pt| & Normal font size is 11\,pt.&\\ -% \commandinline|12pt| & Normal font size is 12\,pt.&\\ -% \commandinline|grid| & Grid for checking sizes.&\\ -% \commandinline|trimmed| & It shows trimmed version (see Figure~\ref{fig:trimmed}).&\\ -% \commandinline|bgtikznodes| & For old method (see Subsubsection \ref{subsubsec:bgtikz}).&\\ -% \commandinline|bgtikzclip| & For old method (see Subsubsection \ref{subsubsec:bgtikz}).&\\ +% \commandinline|coverwidth=!!| & \multirow{6}*{\hspace{-1mm}$\left.\hbox{\rule[-11mm]{0pt}{22mm}}\right\}$ See the next figure}& \texttt{170mm}\\ +% \commandinline|coverheight=!!| & & \texttt{240mm}\\ +% \commandinline|spinewidth=!!| & & \texttt{5mm}\\ +% \commandinline|flapwidth=!!| & & \texttt{0mm}\\ +% \commandinline|marklength=!!| & & \texttt{10mm}\\ +% \commandinline|bleedwidth=!!| & & \texttt{5mm}\\ +% \commandinline|markthick=!!| & Thickness of marks & \texttt{0.4pt}\\ +% \commandinline|markcolor=!!| & 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} % \end{center} +% \begin{center} +% \includegraphics{figures/sizes} +% \end{center} % -% \bigskip\noindent\example +% \noindent\example % \begin{examplelst} % \documentclass[flapwidth=50mm,spinewidth=15mm]{bookcover} % \end{examplelst} % -% \section{Main method}\label{sec:mainmethod} +% \section{Creating book cover}\label{sec:mainmethod} % \subsection{Commands} % Use \commandinline{bookcover} environment to make a new book cover. In this environment, you can create a component of the book cover by the following command: % \begin{commandlst} @@ -202,10 +175,10 @@ % \meta{component type} See Subsection \ref{subsec:componenttypes}. % % \medskip\noindent -% \meta{part} See Subsection \ref{subsec:parts-main-method} or \hyperref[appendix]{Appendix}. +% \meta{part} See Subsection \ref{subsec:parts-main-method} or Section~\ref{sec:illustration-parts}. % % \medskip\noindent -% \meta{content} It depends on the \meta{component type} (see Subsection \ref{subsec:componenttypes}). +% \meta{content} It depends on the \meta{component type}. See Subsection \ref{subsec:componenttypes}. % % \medskip\noindent % Every |\bookcovercomponent| generates a layer on the sheet. The first one generates the bottom layer and the last one generates the top layer. @@ -222,41 +195,38 @@ % \end{bookcover} % \end{examplelst} % -% \subsection{Parts in the main method}\label{subsec:parts-main-method} -% \subsubsection{Base background parts} +% \subsection{Parts}\label{subsec:parts-main-method} +% Important: 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} % -%\medskip\noindent -% {\color{red}\faWarning} \emph{The background parts include the bleed!} -% -% \paragraph{With flaps} % \begin{center} +% \textbf{With flaps}\\*[0pt] % \includegraphics{figures/bg1} % \end{center} -% \paragraph{Without flaps} % \begin{center} +% \textbf{Without flaps}\\*[0pt] % \includegraphics{figures/bg4} % \end{center} % -% \subsubsection{Base foreground parts} +% \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} % -%\medskip\noindent -% {\color{red}\faWarning} \emph{The foreground parts don't include the bleed!} -% -% \paragraph{With flaps} % \begin{center} +% \textbf{With flaps}\\*[0pt] % \includegraphics{figures/foreground1} % \end{center} -% \paragraph{Without flaps} % \begin{center} +% \textbf{Without flaps}\\*[0pt] % \includegraphics{figures/foreground2} % \end{center} % % \subsubsection{Combined parts} -% The following combined parts are defined. You can see them in figures in the \hyperref[appendix]{Appendix}. +% 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{20mm}}>{\color{command}\ttfamily}l} +% \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\\ @@ -277,7 +247,10 @@ % \begin{commandlst} % \bookcovercomponent{color}{!!}{!!} % \end{commandlst} -% \meta{colors} The options of the |\fill| in the \texttt{tikz} package:\\ +% It determines the color of the part. +% +% \medskip\noindent +% \meta{colors} The options of the |\fill| in the \texttt{tikz} package:\label{page:color}\\ % \indent\commandinline{color=!!} See \meta{color name} in the \texttt{xcolor} package.\\ % \indent\commandinline{top color=!!}\\ % \indent\commandinline{bottom color=!!}\\ @@ -287,7 +260,7 @@ % \indent\commandinline{ball color=!!}\\ % \indent\commandinline{shading angle=!!} It rotates the shading by the given angle. % -% \bigskip\noindent\example +% \pagebreak\bigskip\noindent\example % \begin{examplelst} % \begin{bookcover} % \bookcovercomponent{color}{bg whole without flaps}{ @@ -308,7 +281,7 @@ % \end{bookcover} % \end{examplelst} % -% \subsubsection[tikz]{Component type: \texttt{tikz}}\label{subsubsec:tikz} +% \subsubsection[tikz]{Component type: \texttt{tikz}} % \begin{commandlst} % \bookcovercomponent{tikz}{!!}{!!} % \end{commandlst} @@ -325,14 +298,12 @@ % \fill[orange] (part.center) circle [radius=8mm];} % \end{bookcover} % \end{examplelst} -% \begin{figure}[H] -% \centering +% \begin{center} % \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} % \fcolorbox{black!50}{white}{\includegraphics{figures/tikz}} -% \caption{}\label{fig:tikz} -% \end{figure} +% \end{center} % -% \subsubsection[tikz clip]{Component type: \texttt{tikz clip}}\label{subsubsec:tikz} +% \subsubsection[tikz clip]{Component type: \texttt{tikz clip}} % \begin{commandlst} % \bookcovercomponent{tikz clip}{!!}{!!} % \end{commandlst} @@ -349,12 +320,10 @@ % \fill[orange] (part.center) circle [radius=8mm];} % \end{bookcover} % \end{examplelst} -% \begin{figure}[H] -% \centering +% \begin{center} % \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} % \fcolorbox{black!50}{white}{\includegraphics{figures/tikzclip}} -% \caption{}\label{fig:tikzclip} -% \end{figure} +% \end{center} % % \subsubsection[normal]{Component type: \texttt{normal}} % \begin{commandlst} @@ -393,8 +362,13 @@ % \subsubsection[ruler]{Component type: \texttt{ruler}} % Use the \texttt{ruler} component type to check the sizes of the part. % \begin{commandlst} -% \bookcovercomponent{ruler}{!!}{\setruler{!!}{!!}{!!}{!!}} +% \bookcovercomponent{ruler}{!!}{\setruler[!!]{!!}{!!}{!!}{!!}} % \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.\\ @@ -407,7 +381,7 @@ % \medskip\noindent % \meta{color} The color of the ruler. % -% \bigskip\noindent\example +% \pagebreak\bigskip\noindent\example % \begin{examplelst} % \begin{bookcover} % \bookcovercomponent{ruler}{back}{\setruler{upper left}{0cm}{0cm}{blue}} @@ -416,23 +390,16 @@ % \bookcovercomponent{ruler}{front}{\setruler{lower right}{2cm}{1cm}{gray}} % \end{bookcover} % \end{examplelst} -% \begin{figure}[H] -% \centering +% \begin{center} % \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} % \fcolorbox{black!50}{white}{\includegraphics{figures/ruler}} -% \end{figure} +% \end{center} % % \subsection{Defining component type} -% New component types are defined using the command: +% You can define a new component type, redefine or rename a defined component type with the following commands: % \begin{commandlst} % \newbookcovercomponenttype{!!}{!!} -% \end{commandlst} -% Component types can be redefined using the command: -% \begin{commandlst} % \renewbookcovercomponenttype{!!}{!!} -% \end{commandlst} -% Component types can be renamed using the command: -% \begin{commandlst} % \newnamebookcovercomponenttype{!!}{!!} % \end{commandlst} % You can use the following length commands in \meta{formatting}: @@ -460,16 +427,10 @@ % \end{examplelst} % % \subsection{Defining part} -% New parts are defined using the command: +% You can define a new part, redefine or rename a defined part with the following commands: % \begin{commandlst} % \newbookcoverpart{!!}{!!} -% \end{commandlst} -% Parts can be redefined using the command: -% \begin{commandlst} % \renewbookcoverpart{!!}{!!} -% \end{commandlst} -% Parts can be renamed using the command: -% \begin{commandlst} % \newnamebookcoverpart{!!}{!!} % \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: @@ -487,7 +448,7 @@ % % \noindent To give the previous lengths, you can use the following length commands: % -% \bigskip\noindent +% \medskip\noindent % \commandinline{\marklength \bleedwidth \flapwidth \coverwidth \spinewidth \coverheight} % % \bigskip\noindent\example @@ -512,30 +473,31 @@ % \end{document} % \end{examplelst} % -% \subsection{Full examples} -% \subsubsection{A dust jacket} -% \begin{figure}[H] -% \centering -% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} -% \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-.8pt]{example1}} -% \caption{}\label{fig:dustjacket} -% \end{figure} -% \lstinputlisting[style=examplefile]{example1.tex} -% -% \subsubsection{A two-sided book cover} +% \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{Full examples} +% \subsection{A dust jacket} +% \lstinputlisting[style=examplefile]{bookcover-example1.tex} % \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}} +% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} +% \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-.8pt]{bookcover-example1}}\label{page:example1} % \end{center} -% \lstinputlisting[style=examplefile]{example2.tex} % -% \subsubsection{Drawing bar code by pst-barcode package} +% \subsection{A two-sided book cover} +% \lstinputlisting[style=examplefile]{bookcover-example2.tex} % \begin{center} -% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} -% \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-15mm]{figures/barcode}} +% \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\subsection{Barcode} % \begin{examplelst} % \documentclass{bookcover} % \usepackage{pst-barcode} @@ -552,233 +514,104 @@ % \end{document} % \end{examplelst} % -% \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: -% +% \noindent You can compile this file with \texttt{latex.exe} or \texttt{xelatex.exe}. Using \texttt{pdflatex.exe} or \texttt{lualatex.exe}, write the following code into the preamble: % \begin{examplelst} -% \documentclass{bookcover} -% -% \usepackage{shellesc,filecontents} -% \begin{filecontents*}{bar.tex} -% \documentclass{article} -% \usepackage{pst-barcode} -% \pagestyle{empty} -% \begin{document} -% \begin{pspicture}(1.5in,1in) -% \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} -% \begin{bookcover} -% \bookcovercomponent{normal}{back}{ -% \vfill -% \centering -% \includegraphics{barcode} -% \vspace{5mm}} -% \end{bookcover} -% \end{document} +% \usepackage[pdfcrop={-hires}]{auto-pst-pdf} % \end{examplelst} +% In this case, the command to compile this file is the following: % -% \noindent The command to compile this file is the following: -% \begin{commandlinelst} -% pdflatex -shell-escape filename -% \end{commandlinelst} +% \medskip\texttt{pdflatex -shell-escape filename}\\ % or -% \begin{commandlinelst} -% lualatex -shell-escape filename -% \end{commandlinelst} -% -% \medskip\noindent where the \texttt{filename} is not \texttt{bar.tex} or \texttt{barcode.tex}. % -% \section{Old method} +% \texttt{lualatex -shell-escape filename} % -% \begin{info} -% \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} +% \bigskip +% \begin{center} +% \setlength{\fboxsep}{0pt}\setlength{\fboxrule}{.4pt} +% \fcolorbox{black!50}{white}{\includegraphics[width=\textwidth-.8pt]{figures/barcode}} +% \end{center} % -% \begin{commandlst} -% \setbookcover{!
!}{!!}{!!} -% \end{commandlst} -% \meta{main layer} See the following subsubsections.\\ -% \indent\commandinline{bgcolor}, \commandinline{bgpic}, \commandinline{bgtikz}, \commandinline{fgfirst}, \commandinline{fgsecond} +% \newpage\section{Obsolete method} % -% \medskip\noindent The \meta{part} and the \meta{content} depend on the \meta{main layer} (see the following subsubsections). +% {\large\bfseries\color{red}The goal of the \emph{obsolete method} is to be compatible with the early versions of the \texttt{bookcover}. It is not recommended to use it in the future, because the method described in the Section~\begin{NoHyper}\ref{sec:mainmethod}\end{NoHyper} is much more flexible!\par} % -% \begin{commandlst} -% \makebookcover -% \end{commandlst} +% \subsection{Commands} % -% \subsubsection{Background colors} +% \textbf{Background colors} % \begin{commandlst} % \setbookcover{bgcolor}{!!}{!!} % \end{commandlst} -% \meta{background part} See Subsubsection \ref{subsubsec:background}:\\ -% \indent\commandinline{back}, \commandinline{front}, \commandinline{spine}, \commandinline{front flap}, \commandinline{back flap}, \commandinline{whole without flaps}, \commandinline{whole} -% -% \medskip\noindent -% \meta{colors} The options of the |\fill| in the \texttt{tikz} package:\\ -% \indent\commandinline{color=!!} See \meta{color name} in the \texttt{xcolor} package.\\ -% \indent\commandinline{top color=!!}\\ -% \indent\commandinline{bottom color=!!}\\ -% \indent\commandinline{middle color=!!}\\ -% \indent\commandinline{inner color=!!}\\ -% \indent\commandinline{outer color=!!}\\ -% \indent\commandinline{ball color=!!}\\ -% \indent\commandinline{shading angle=!!} It rotates the shading by the given angle. +% See the \meta{background part} in Subsubsection \ref{subsubsec:background} and the \meta{colors} in the page \pageref{page:color}. % -% \bigskip\noindent\example -% \begin{examplelst} -% \setbookcover{bgcolor}{whole without flaps}{ -% top color=white, bottom color=blue!50!black, shading angle=60} -% \end{examplelst} -% -% \subsubsection{Background pictures} +% \bigskip\noindent\textbf{Background pictures} % \begin{commandlst} % \setbookcover{bgpic}{!!}{!!} % \end{commandlst} -% \meta{background part} See Subsubsection \ref{subsubsec:background}:\\ -% \indent\commandinline{back}, \commandinline{front}, \commandinline{spine}, \commandinline{front flap}, \commandinline{back flap}, \commandinline{whole without flaps}, \commandinline{whole} +% See the \meta{background part} in Subsubsection \ref{subsubsec:background}. The picture will be rescaled according to the sizes of the current background part. % -% \medskip\noindent The picture will be rescaled according to the sizes of the current background part. -% -% \bigskip\noindent\example -% \begin{examplelst} -% \setbookcover{bgpic}{front flap}{fig.png} -% \end{examplelst} -% -% \subsubsection{Background Ti\emph{k}Z figures}\label{subsubsec:bgtikz} +% \bigskip\noindent\textbf{Background Ti\emph{k}Z figures} % \begin{commandlst} % \setbookcover{bgtikz}{!!}{!!} % \end{commandlst} -% \meta{background part} See Subsubsection \ref{subsubsec:background}:\\ -% \indent\commandinline{back}, \commandinline{front}, \commandinline{spine}, \commandinline{front flap}, \commandinline{back flap}, \commandinline{whole without flaps}, \commandinline{whole} -% -% \medskip\noindent -% The Ti\emph{k}Z figure will be placed to the upper left corner of the current background part, without resizing. -% -% \bigskip\noindent\example -% \begin{examplelst} -% \setbookcover{bgtikz}{back}{ -% \fill[blue] (0mm,250mm)--(100mm,250mm)--(100mm,245mm)--(0mm,110mm)--cycle; -% \fill[yellow] (5mm,5mm)--(175mm,245mm)--(175mm,0mm)--(5mm,0mm)--cycle;} -% \end{examplelst} -% -% \medskip\noindent +% See the \meta{background part} in Subsubsection \ref{subsubsec:background}. The Ti\emph{k}Z figure will be placed to the upper left corner of the current background part, without resizing. % Using the option \texttt{bgtikznodes} of the document class: % -% \medskip\noindent % \begin{itemize} % \item the origin moves to the lower left corner of the current background part; % \item two rectangle nodes come into being: \commandinline{part} and \commandinline{trimmed part}. % \end{itemize} % -% \bigskip\noindent\example -% \begin{examplelst} -% \setbookcover{bgtikz}{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];} -% \setbookcover{bgtikz}{spine}{ -% \fill[orange] (part.center) circle [radius=8mm];} -% \end{examplelst} -% \noindent See Figure~\ref{fig:tikz}. The option \texttt{bgtikzclip} of the document class works the same as \texttt{bgtikznodes}, but it clips the current part. For example, you can see the output of the previous code with option \texttt{bgtikzclip} in Figure~\ref{fig:tikzclip}. +% \noindent The option \texttt{bgtikzclip} of the document class works the same as \texttt{bgtikznodes}, but it clips the current part. % -% \subsubsection{First foreground} +% \bigskip\noindent\textbf{First foreground} % \begin{commandlst} % \setbookcover{fgfirst}{!!}{!!} % \end{commandlst} -% \meta{foreground part} See Subsubsection \ref{subsubsec:foreground}:\\ -% \indent\commandinline{back}, \commandinline{front}, \commandinline{spine}, \commandinline{front flap}, \commandinline{back flap}, \commandinline{above front}, \commandinline{below front}, \commandinline{above back}, \commandinline{below back} -% -% \medskip\noindent The first foreground is the top layer of the book cover (see Subsection \ref{subsec:layers}). +% See the \meta{foreground part} in Subsubsection \ref{subsubsec:foreground}. The first foreground is the top layer of the book cover (see Subsection \ref{subsec:layers}). % -% \bigskip\noindent\example -% \begin{examplelst} -% \setbookcover{fgfirst}{spine}{ -% \vfill -% \begin{center} -% \rotatebox[origin=c]{90}{\bfseries Book title} -% \end{center} -% \vfill} -% \end{examplelst} -% -% \subsubsection{Second foreground} +% \bigskip\noindent\textbf{Second foreground} % \begin{commandlst} % \setbookcover{fgsecond}{!!}{!!} % \end{commandlst} -% \meta{foreground part} See Subsubsection \ref{subsubsec:foreground}:\\ -% \indent\commandinline{back}, \commandinline{front}, \commandinline{spine}, \commandinline{front flap}, \commandinline{back flap} -% -% \medskip\noindent The second foreground is under the first foreground (see Subsection \ref{subsec:layers}). +% See the \meta{foreground part} in Subsubsection \ref{subsubsec:foreground}. The second foreground is under the first foreground (see Subsection \ref{subsec:layers}). % -% \bigskip\noindent\example -% \begin{examplelst} -% \setbookcover{fgsecond}{front}{ -% \vfill -% \begin{center} -% \includegraphics[width=80mm]{pic.png} -% \end{center} -% \vfill} -% \setbookcover{fgfirst}{front}{ -% \vfill -% \begin{center} -% TEXT -% \end{center} -% \vfill} -% \end{examplelst} -% -% \subsubsection{Making book cover} -% \commandinline{\makebookcover} -% -% \medskip\noindent +% \bigskip\noindent\textbf{Making book cover} +% \begin{commandlst} +% \makebookcover +% \end{commandlst} % This command makes the book cover by using the contents of the background and foreground. % -% \subsection{Parts in the old method} -% +% \subsection{Parts in the obsolete method} % \subsubsection{Background parts}\label{subsubsec:background} -% {\color{red}\faWarning} \emph{The background parts include the bleed!} -% -% \paragraph{With flaps} % \begin{center} -% \includegraphics{figures/background1}\\[4mm] -% \includegraphics{figures/background2}\\[4mm] +% \textbf{With flaps}\\*[0pt] +% \includegraphics{figures/background1}\\[2mm] +% \includegraphics{figures/background2}\\[2mm] % \includegraphics{figures/background3} % \end{center} -% \paragraph{Without flaps} % \begin{center} -% \includegraphics{figures/background4}\\[4mm] +% \textbf{Without flaps}\\*[0pt] +% \includegraphics{figures/background4}\\[2mm] % \includegraphics{figures/background5} % \end{center} % % \subsubsection{Foreground parts}\label{subsubsec:foreground} -% {\color{red}\faWarning} \emph{The foreground parts don't include the bleed!} -% -% \paragraph{With flaps} % \begin{center} +% \textbf{With flaps}\\*[0pt] % \includegraphics{figures/foreground1} % \end{center} -% \paragraph{Without flaps} % \begin{center} +% \textbf{Without flaps}\\*[0pt] % \includegraphics{figures/foreground2} % \end{center} +% The other name of \texttt{above front} is \texttt{remark}. % % \subsection{Layers}\label{subsec:layers} % In the following table we can see the hierarchy of the layers: -% -% \bigskip % \begin{center} % \begin{tabular}{@{}ll@{}c@{}} % \cline{1-2} -% \multirow{2}*{|fgfirst|} & |above front|, |below front|, |above back|, |below back|& \color{layer}\emph{top layer}\\ +% \multirow{2}*{|fgfirst|} & |above front|, |below front|, |above back|, |below back|& \color{layer}top layer\\ % & |back|, |front|, |spine|, |front flap|, |back flap| &\color{layer}$\uparrow$\\ % \cline{1-2} % |fgsecond| & |back|, |front|, |spine|, |front flap|, |back flap|&\color{layer}$\uparrow$\\ @@ -793,36 +626,14 @@ % \cline{1-2} % & |back|, |front|, |spine|, |front flap|, |back flap| &\color{layer}$\uparrow$\\ % |bgcolor| & |whole without flaps| &\color{layer}$\uparrow$\\ -% & |whole| & \color{layer}\emph{bottom layer}\\ +% & |whole| & \color{layer}bottom layer\\ % \cline{1-2} % \end{tabular} % \end{center} -% \bigskip\noindent For example, in case -% \begin{examplelst} -% \setbookcover{bgpic}{whole}{fig1.jpg} -% \setbookcover{bgpic}{front}{fig2.jpg} -% \setbookcover{fgsecond}{front}{fig3.jpg} -% \setbookcover{fgfirst}{front}{TEXT} -% \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 example} -% See Figure \ref{fig:dustjacket}. -% \lstinputlisting[style=examplefile]{example-oldmethod.tex} -% -% \newpage -% \thispagestyle{empty} -% \vspace*{8cm} -% \section*{\centering\Huge Appendix}\label{appendix} -% \addcontentsline{toc}{section}{Appendix} % -% \includepdfset{nup=2x5,delta=4mm 4mm,noautoscale,frame} -% \includepdf[pages=1-10,pagecommand={\section*{\centering Background parts in the main method (width flaps)}\addcontentsline{toc}{subsection}{Background parts in the main method (width flaps)}}]{figures/parts.pdf} -% \includepdf[pages=11-16,pagecommand={\section*{\centering Background parts in the main method (width flaps)}}]{figures/parts.pdf} -% \includepdf[pages=17-26,pagecommand={\section*{\centering Foreground parts in the main method (width flaps)}}]{figures/parts.pdf} -% \includepdf[pages=27-35,pagecommand={\section*{\centering Foreground parts in the main method (width flaps)}}]{figures/parts.pdf} -% \includepdf[pages=36-42,pagecommand={\section*{\centering Background parts in the main method (widthout flaps)}\addcontentsline{toc}{subsection}{Background parts in the main method (widthout flaps)}}]{figures/parts.pdf} -% \includepdf[pages=43-52,pagecommand={\section*{\centering Foreground parts in the main method (widthout flaps)}}]{figures/parts.pdf} +% \subsection{Example} +% See the figure in the page \pageref{page:example1}. +% \lstinputlisting[style=examplefile]{bookcover-example-obsoletemethod.tex} % % \StopEventually{} % @@ -834,7 +645,6 @@ \DeclareVoidOption{10pt}{\PassOptionsToClass{10pt}{article}} \DeclareVoidOption{11pt}{\PassOptionsToClass{11pt}{article}} \DeclareVoidOption{12pt}{\PassOptionsToClass{12pt}{article}} -\DeclareVoidOption{grid}{\PassOptionsToPackage{grid}{eso-pic}} \DeclareStringOption[170mm]{coverwidth} \DeclareStringOption[240mm]{coverheight} \DeclareStringOption[5mm]{spinewidth} @@ -844,20 +654,20 @@ \DeclareStringOption[5mm]{bleedwidth} \DeclareStringOption[red]{markcolor} \DeclareBoolOption[false]{trimmed} -\DeclareBoolOption[false]{bgtikznodes}% for old method -\DeclareBoolOption[false]{bgtikzclip}% for old method +\DeclareBoolOption[false]{bgtikznodes}% for obsolete method +\DeclareBoolOption[false]{bgtikzclip}% for obsolete method \ProcessKeyvalOptions{bookcover} -\ifbookcover@bgtikzclip\bookcover@bgtikznodestrue\fi% for old method +\ifbookcover@bgtikzclip\bookcover@bgtikznodestrue\fi% for obsolete method %% CLASS AND PACKAGES +%% +%% Don't use 'absolute' option of 'textpos'! It causes problems in some cases: +%% xelatex.exe + pst-barcode +%% pdflatex.exe or lualatex.exe + pst-barcode + auto-pst-pdf +%% \LoadClass{article} -\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} +\RequirePackage{textpos,geometry,graphicx,calc,ifthen,tikz} +\RequirePackage[nonefgrulers]{fgruler} %% PAGE STYLE \pagestyle{empty} @@ -883,8 +693,8 @@ \newlength{\bookcover@tikz@trimmed@part@height@minus} \newlength{\bookcover@tikz@trimmed@part@push@right} \newlength{\bookcover@tikz@trimmed@part@push@up} -\newlength{\bookcover@ruler@xshift} -\newlength{\bookcover@ruler@yshift} +\newlength{\bookcover@rulerwidth@} +\newlength{\bookcover@rulerheight@} \let\partheight\bookcover@partheight@ \let\partwidth\bookcover@partwidth@ @@ -896,18 +706,11 @@ \setlength{\marklength}{\bookcover@marklength} \setlength{\markthick}{\bookcover@markthick} \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 + +%% PAGE DIMENSIONS SETTING +\geometry{left=0pt,right=0pt,bottom=0pt,top=-1em, + paperwidth=2\marklength+2\bleedwidth+2\coverwidth+2\flapwidth+\spinewidth, + paperheight=2\marklength+2\bleedwidth+\coverheight} %% NO PARAGRAPH INDENTATION \setlength{\parindent}{0pt} @@ -923,18 +726,13 @@ \setlength{\bookcover@tikz@trimmed@part@push@right}{#3} \setlength{\bookcover@tikz@trimmed@part@push@up}{#4}} \def\bookcover@bgtikz@trimmed@part@param#1#2{ - \bookcover@tikz@trimmed@part@param{#1}{2\bleedwidth}{#2}{\bleedwidth}}% for old method + \bookcover@tikz@trimmed@part@param{#1}{2\bleedwidth}{#2}{\bleedwidth}}% for obsolete method \let\setpartposx\bookcover@xpos \let\setpartposy\bookcover@ypos \let\setpartwidth\bookcover@partwidth \let\setpartheight\bookcover@partheight \let\settrimmedpart\bookcover@tikz@trimmed@part@param -%% GRID -\ifESO@grid - \setlength{\markthick}{2pt} - \def\bookcover@markcolor{red}\fi - %% MARKS \def\bookcover@vmark{ \begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@) @@ -1155,110 +953,24 @@ \parbox[t][\bookcover@partheight@][c]{\bookcover@partwidth@}{\begin{center}#1\end{center}}} \newbookcovercomponenttype{ruler}{ - \begin{tikzpicture}[overlay,x=1mm,y=1mm,inner sep=0pt,outer sep=3pt,yshift=-\bookcover@partheight@] - #1 - \pgfmathsetmacro\xmax{round(.351459804*(\bookcover@partwidth@-\bookcover@ruler@xshift))} - \pgfmathsetmacro\xnummax{round(.0351459804*(\bookcover@partwidth@-\bookcover@ruler@xshift))} - \pgfmathsetmacro\ymax{round(.351459804*(\bookcover@partheight@-\bookcover@ruler@yshift))} - \pgfmathsetmacro\ynummax{round(.0351459804*(\bookcover@partheight@-\bookcover@ruler@yshift))} - \ifthenelse{\equal{\bookcover@ruler@coordsys}{lower left}}{ - \begin{scope}[xshift=\bookcover@ruler@xshift,yshift=\bookcover@ruler@yshift] - \foreach \num in {0,1,...,\xmax} - \draw (\num,0)--++(0,1); - \foreach \num in {0,5,...,\xmax} - \draw (\num,0)--++(0,1.5); - \foreach \num in {0,10,...,\xmax} - \draw (\num,0)--++(0,2); - \foreach \num in {1,2,...,\xnummax} - \node[anchor=south] at (10*\num,2) - {\sffamily\scriptsize\num}; - \foreach \num in {0,1,...,\ymax} - \draw (0,\num)--++(1,0); - \foreach \num in {0,5,...,\ymax} - \draw (0,\num)--++(1.5,0); - \foreach \num in {0,10,...,\ymax} - \draw (0,\num)--++(2,0); - \foreach \num in {1,2,...,\ynummax} - \node[anchor=west] at (2,10*\num) - {\sffamily\scriptsize\num}; - \node[anchor=south] at (5,2) - {\sffamily\scriptsize cm}; - \end{scope}}{} - \ifthenelse{\equal{\bookcover@ruler@coordsys}{lower right}}{ - \begin{scope}[xshift=-\bookcover@ruler@xshift,yshift=\bookcover@ruler@yshift] - \foreach \num in {0,1,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,0)--++(0,1); - \foreach \num in {0,5,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,0)--++(0,1.5); - \foreach \num in {0,10,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,0)--++(0,2); - \foreach \num in {1,2,...,\xnummax} - \node[anchor=south] at (\bookcover@partwidth@-10*\num mm,2) - {\sffamily\scriptsize\num}; - \foreach \num in {0,1,...,\ymax} - \draw (\bookcover@partwidth@,\num)--++(-1,0); - \foreach \num in {0,5,...,\ymax} - \draw (\bookcover@partwidth@,\num)--++(-1.5,0); - \foreach \num in {0,10,...,\ymax} - \draw (\bookcover@partwidth@,\num)--++(-2,0); - \foreach \num in {1,2,...,\ynummax} - \node[anchor=east] at (\bookcover@partwidth@-2mm,10*\num) - {\sffamily\scriptsize\num}; - \node[anchor=south] at (\bookcover@partwidth@-5mm,2) - {\sffamily\scriptsize cm}; - \end{scope}}{} - \ifthenelse{\equal{\bookcover@ruler@coordsys}{upper left}}{ - \begin{scope}[xshift=\bookcover@ruler@xshift,yshift=-\bookcover@ruler@yshift] - \foreach \num in {0,1,...,\xmax} - \draw (\num,\bookcover@partheight@)--++(0,-1); - \foreach \num in {0,5,...,\xmax} - \draw (\num,\bookcover@partheight@)--++(0,-1.5); - \foreach \num in {0,10,...,\xmax} - \draw (\num,\bookcover@partheight@)--++(0,-2); - \foreach \num in {1,2,...,\xnummax} - \node[anchor=north] at (10*\num,\bookcover@partheight@-2mm) - {\sffamily\scriptsize\num}; - \foreach \num in {0,1,...,\ymax} - \draw (0,\bookcover@partheight@-\num mm)--++(1,0); - \foreach \num in {0,5,...,\ymax} - \draw (0,\bookcover@partheight@-\num mm)--++(1.5,0); - \foreach \num in {0,10,...,\ymax} - \draw (0,\bookcover@partheight@-\num mm)--++(2,0); - \foreach \num in {1,2,...,\ynummax} - \node[anchor=west] at (2,\bookcover@partheight@-10*\num mm) - {\sffamily\scriptsize\num}; - \node[anchor=north] at (5,\bookcover@partheight@-2mm) - {\sffamily\scriptsize\vphantom{1}cm}; - \end{scope}}{} - \ifthenelse{\equal{\bookcover@ruler@coordsys}{upper right}}{ - \begin{scope}[xshift=-\bookcover@ruler@xshift,yshift=-\bookcover@ruler@yshift] - \foreach \num in {0,1,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,\bookcover@partheight@)--++(0,-1); - \foreach \num in {0,5,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,\bookcover@partheight@)--++(0,-1.5); - \foreach \num in {0,10,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,\bookcover@partheight@)--++(0,-2); - \foreach \num in {1,2,...,\xnummax} - \node[anchor=north] at (\bookcover@partwidth@-10*\num mm,\bookcover@partheight@-2mm) - {\sffamily\scriptsize\num}; - \foreach \num in {0,1,...,\ymax} - \draw (\bookcover@partwidth@,\bookcover@partheight@-\num mm)--++(-1,0); - \foreach \num in {0,5,...,\ymax} - \draw (\bookcover@partwidth@,\bookcover@partheight@-\num mm)--++(-1.5,0); - \foreach \num in {0,10,...,\ymax} - \draw (\bookcover@partwidth@,\bookcover@partheight@-\num mm)--++(-2,0); - \foreach \num in {1,2,...,\ynummax} - \node[anchor=east] at (\bookcover@partwidth@-2mm,\bookcover@partheight@-10*\num mm) - {\sffamily\scriptsize\num}; - \node[anchor=north] at (\bookcover@partwidth@-5mm,\bookcover@partheight@-2mm) - {\sffamily\scriptsize\vphantom{1}cm}; - \end{scope}}{} - \end{tikzpicture}} -\def\setruler#1#2#3#4{ - \def\bookcover@ruler@coordsys{#1} - \setlength{\bookcover@ruler@xshift}{#2} - \setlength{\bookcover@ruler@yshift}{#3} - \color{#4}} + \parbox[t][\bookcover@partheight@][t]{\bookcover@partwidth@}{#1}} +\newcommand{\setruler}[5][cm]{% + \rulernorotatenum% + \rulerparams{}{}{#5}{}{}% + \setlength{\bookcover@rulerwidth@}{\bookcover@partwidth@-#3}% + \setlength{\bookcover@rulerheight@}{\bookcover@partheight@-#4}% + \ifthenelse{\equal{#2}{upper left}}{% + \vspace{#4}% + \hspace{#3}% + \squareruler[#1]{upperleft}{\bookcover@rulerwidth@}{\bookcover@rulerheight@}}{}% + \ifthenelse{\equal{#2}{upper right}}{% + \vspace{#4}% + \squareruler[#1]{upperright}{\bookcover@rulerwidth@}{\bookcover@rulerheight@}}{}% + \ifthenelse{\equal{#2}{lower left}}{% + \hspace{#3}% + \squareruler[#1]{lowerleft}{\bookcover@rulerwidth@}{\bookcover@rulerheight@}}{}% + \ifthenelse{\equal{#2}{lower right}}{% + \squareruler[#1]{lowerright}{\bookcover@rulerwidth@}{\bookcover@rulerheight@}}{}} %% BOOKCOVER PARTS \newbookcoverpart{bg back flap}{ @@ -1524,9 +1236,9 @@ \bookcover@xpos{\marklength+\bleedwidth} \bookcover@partwidth{2\coverwidth+2\flapwidth+\spinewidth}} -%%%%%%%%%%%%%%%% -%% OLD METHOD %% -%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%% +%% OBSOLETE METHOD %% +%%%%%%%%%%%%%%%%%%%%% %% MAIN LAYERS \def\bookcover@bgcolor#1{ diff --git a/Master/texmf-dist/tex/latex/bookcover/bookcover.cls b/Master/texmf-dist/tex/latex/bookcover/bookcover.cls index a66e512eee5..9987eb0cac1 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}[2018/01/09 v2.2 class for book covers and dust jackets] +\ProvidesClass{bookcover}[2018/01/21 v2.3 class for book covers and dust jackets] %% %% OPTIONS \RequirePackage{kvoptions} @@ -26,7 +26,6 @@ \DeclareVoidOption{10pt}{\PassOptionsToClass{10pt}{article}} \DeclareVoidOption{11pt}{\PassOptionsToClass{11pt}{article}} \DeclareVoidOption{12pt}{\PassOptionsToClass{12pt}{article}} -\DeclareVoidOption{grid}{\PassOptionsToPackage{grid}{eso-pic}} \DeclareStringOption[170mm]{coverwidth} \DeclareStringOption[240mm]{coverheight} \DeclareStringOption[5mm]{spinewidth} @@ -36,20 +35,20 @@ \DeclareStringOption[5mm]{bleedwidth} \DeclareStringOption[red]{markcolor} \DeclareBoolOption[false]{trimmed} -\DeclareBoolOption[false]{bgtikznodes}% for old method -\DeclareBoolOption[false]{bgtikzclip}% for old method +\DeclareBoolOption[false]{bgtikznodes}% for obsolete method +\DeclareBoolOption[false]{bgtikzclip}% for obsolete method \ProcessKeyvalOptions{bookcover} -\ifbookcover@bgtikzclip\bookcover@bgtikznodestrue\fi% for old method +\ifbookcover@bgtikzclip\bookcover@bgtikznodestrue\fi% for obsolete method %% CLASS AND PACKAGES +%% +%% Don't use 'absolute' option of 'textpos'! It causes problems in some cases: +%% xelatex.exe + pst-barcode +%% pdflatex.exe or lualatex.exe + pst-barcode + auto-pst-pdf +%% \LoadClass{article} -\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} +\RequirePackage{textpos,geometry,graphicx,calc,ifthen,tikz} +\RequirePackage[nonefgrulers]{fgruler} %% PAGE STYLE \pagestyle{empty} @@ -75,8 +74,8 @@ \newlength{\bookcover@tikz@trimmed@part@height@minus} \newlength{\bookcover@tikz@trimmed@part@push@right} \newlength{\bookcover@tikz@trimmed@part@push@up} -\newlength{\bookcover@ruler@xshift} -\newlength{\bookcover@ruler@yshift} +\newlength{\bookcover@rulerwidth@} +\newlength{\bookcover@rulerheight@} \let\partheight\bookcover@partheight@ \let\partwidth\bookcover@partwidth@ @@ -88,18 +87,11 @@ \setlength{\marklength}{\bookcover@marklength} \setlength{\markthick}{\bookcover@markthick} \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 + +%% PAGE DIMENSIONS SETTING +\geometry{left=0pt,right=0pt,bottom=0pt,top=-1em, + paperwidth=2\marklength+2\bleedwidth+2\coverwidth+2\flapwidth+\spinewidth, + paperheight=2\marklength+2\bleedwidth+\coverheight} %% NO PARAGRAPH INDENTATION \setlength{\parindent}{0pt} @@ -115,18 +107,13 @@ \setlength{\bookcover@tikz@trimmed@part@push@right}{#3} \setlength{\bookcover@tikz@trimmed@part@push@up}{#4}} \def\bookcover@bgtikz@trimmed@part@param#1#2{ - \bookcover@tikz@trimmed@part@param{#1}{2\bleedwidth}{#2}{\bleedwidth}}% for old method + \bookcover@tikz@trimmed@part@param{#1}{2\bleedwidth}{#2}{\bleedwidth}}% for obsolete method \let\setpartposx\bookcover@xpos \let\setpartposy\bookcover@ypos \let\setpartwidth\bookcover@partwidth \let\setpartheight\bookcover@partheight \let\settrimmedpart\bookcover@tikz@trimmed@part@param -%% GRID -\ifESO@grid - \setlength{\markthick}{2pt} - \def\bookcover@markcolor{red}\fi - %% MARKS \def\bookcover@vmark{ \begin{textblock*}{\bookcover@partwidth@}(\bookcover@xpos@,\bookcover@ypos@) @@ -347,110 +334,24 @@ \parbox[t][\bookcover@partheight@][c]{\bookcover@partwidth@}{\begin{center}#1\end{center}}} \newbookcovercomponenttype{ruler}{ - \begin{tikzpicture}[overlay,x=1mm,y=1mm,inner sep=0pt,outer sep=3pt,yshift=-\bookcover@partheight@] - #1 - \pgfmathsetmacro\xmax{round(.351459804*(\bookcover@partwidth@-\bookcover@ruler@xshift))} - \pgfmathsetmacro\xnummax{round(.0351459804*(\bookcover@partwidth@-\bookcover@ruler@xshift))} - \pgfmathsetmacro\ymax{round(.351459804*(\bookcover@partheight@-\bookcover@ruler@yshift))} - \pgfmathsetmacro\ynummax{round(.0351459804*(\bookcover@partheight@-\bookcover@ruler@yshift))} - \ifthenelse{\equal{\bookcover@ruler@coordsys}{lower left}}{ - \begin{scope}[xshift=\bookcover@ruler@xshift,yshift=\bookcover@ruler@yshift] - \foreach \num in {0,1,...,\xmax} - \draw (\num,0)--++(0,1); - \foreach \num in {0,5,...,\xmax} - \draw (\num,0)--++(0,1.5); - \foreach \num in {0,10,...,\xmax} - \draw (\num,0)--++(0,2); - \foreach \num in {1,2,...,\xnummax} - \node[anchor=south] at (10*\num,2) - {\sffamily\scriptsize\num}; - \foreach \num in {0,1,...,\ymax} - \draw (0,\num)--++(1,0); - \foreach \num in {0,5,...,\ymax} - \draw (0,\num)--++(1.5,0); - \foreach \num in {0,10,...,\ymax} - \draw (0,\num)--++(2,0); - \foreach \num in {1,2,...,\ynummax} - \node[anchor=west] at (2,10*\num) - {\sffamily\scriptsize\num}; - \node[anchor=south] at (5,2) - {\sffamily\scriptsize cm}; - \end{scope}}{} - \ifthenelse{\equal{\bookcover@ruler@coordsys}{lower right}}{ - \begin{scope}[xshift=-\bookcover@ruler@xshift,yshift=\bookcover@ruler@yshift] - \foreach \num in {0,1,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,0)--++(0,1); - \foreach \num in {0,5,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,0)--++(0,1.5); - \foreach \num in {0,10,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,0)--++(0,2); - \foreach \num in {1,2,...,\xnummax} - \node[anchor=south] at (\bookcover@partwidth@-10*\num mm,2) - {\sffamily\scriptsize\num}; - \foreach \num in {0,1,...,\ymax} - \draw (\bookcover@partwidth@,\num)--++(-1,0); - \foreach \num in {0,5,...,\ymax} - \draw (\bookcover@partwidth@,\num)--++(-1.5,0); - \foreach \num in {0,10,...,\ymax} - \draw (\bookcover@partwidth@,\num)--++(-2,0); - \foreach \num in {1,2,...,\ynummax} - \node[anchor=east] at (\bookcover@partwidth@-2mm,10*\num) - {\sffamily\scriptsize\num}; - \node[anchor=south] at (\bookcover@partwidth@-5mm,2) - {\sffamily\scriptsize cm}; - \end{scope}}{} - \ifthenelse{\equal{\bookcover@ruler@coordsys}{upper left}}{ - \begin{scope}[xshift=\bookcover@ruler@xshift,yshift=-\bookcover@ruler@yshift] - \foreach \num in {0,1,...,\xmax} - \draw (\num,\bookcover@partheight@)--++(0,-1); - \foreach \num in {0,5,...,\xmax} - \draw (\num,\bookcover@partheight@)--++(0,-1.5); - \foreach \num in {0,10,...,\xmax} - \draw (\num,\bookcover@partheight@)--++(0,-2); - \foreach \num in {1,2,...,\xnummax} - \node[anchor=north] at (10*\num,\bookcover@partheight@-2mm) - {\sffamily\scriptsize\num}; - \foreach \num in {0,1,...,\ymax} - \draw (0,\bookcover@partheight@-\num mm)--++(1,0); - \foreach \num in {0,5,...,\ymax} - \draw (0,\bookcover@partheight@-\num mm)--++(1.5,0); - \foreach \num in {0,10,...,\ymax} - \draw (0,\bookcover@partheight@-\num mm)--++(2,0); - \foreach \num in {1,2,...,\ynummax} - \node[anchor=west] at (2,\bookcover@partheight@-10*\num mm) - {\sffamily\scriptsize\num}; - \node[anchor=north] at (5,\bookcover@partheight@-2mm) - {\sffamily\scriptsize\vphantom{1}cm}; - \end{scope}}{} - \ifthenelse{\equal{\bookcover@ruler@coordsys}{upper right}}{ - \begin{scope}[xshift=-\bookcover@ruler@xshift,yshift=-\bookcover@ruler@yshift] - \foreach \num in {0,1,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,\bookcover@partheight@)--++(0,-1); - \foreach \num in {0,5,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,\bookcover@partheight@)--++(0,-1.5); - \foreach \num in {0,10,...,\xmax} - \draw (\bookcover@partwidth@-\num mm,\bookcover@partheight@)--++(0,-2); - \foreach \num in {1,2,...,\xnummax} - \node[anchor=north] at (\bookcover@partwidth@-10*\num mm,\bookcover@partheight@-2mm) - {\sffamily\scriptsize\num}; - \foreach \num in {0,1,...,\ymax} - \draw (\bookcover@partwidth@,\bookcover@partheight@-\num mm)--++(-1,0); - \foreach \num in {0,5,...,\ymax} - \draw (\bookcover@partwidth@,\bookcover@partheight@-\num mm)--++(-1.5,0); - \foreach \num in {0,10,...,\ymax} - \draw (\bookcover@partwidth@,\bookcover@partheight@-\num mm)--++(-2,0); - \foreach \num in {1,2,...,\ynummax} - \node[anchor=east] at (\bookcover@partwidth@-2mm,\bookcover@partheight@-10*\num mm) - {\sffamily\scriptsize\num}; - \node[anchor=north] at (\bookcover@partwidth@-5mm,\bookcover@partheight@-2mm) - {\sffamily\scriptsize\vphantom{1}cm}; - \end{scope}}{} - \end{tikzpicture}} -\def\setruler#1#2#3#4{ - \def\bookcover@ruler@coordsys{#1} - \setlength{\bookcover@ruler@xshift}{#2} - \setlength{\bookcover@ruler@yshift}{#3} - \color{#4}} + \parbox[t][\bookcover@partheight@][t]{\bookcover@partwidth@}{#1}} +\newcommand{\setruler}[5][cm]{% + \rulernorotatenum% + \rulerparams{}{}{#5}{}{}% + \setlength{\bookcover@rulerwidth@}{\bookcover@partwidth@-#3}% + \setlength{\bookcover@rulerheight@}{\bookcover@partheight@-#4}% + \ifthenelse{\equal{#2}{upper left}}{% + \vspace{#4}% + \hspace{#3}% + \squareruler[#1]{upperleft}{\bookcover@rulerwidth@}{\bookcover@rulerheight@}}{}% + \ifthenelse{\equal{#2}{upper right}}{% + \vspace{#4}% + \squareruler[#1]{upperright}{\bookcover@rulerwidth@}{\bookcover@rulerheight@}}{}% + \ifthenelse{\equal{#2}{lower left}}{% + \hspace{#3}% + \squareruler[#1]{lowerleft}{\bookcover@rulerwidth@}{\bookcover@rulerheight@}}{}% + \ifthenelse{\equal{#2}{lower right}}{% + \squareruler[#1]{lowerright}{\bookcover@rulerwidth@}{\bookcover@rulerheight@}}{}} %% BOOKCOVER PARTS \newbookcoverpart{bg back flap}{ @@ -716,9 +617,9 @@ \bookcover@xpos{\marklength+\bleedwidth} \bookcover@partwidth{2\coverwidth+2\flapwidth+\spinewidth}} -%%%%%%%%%%%%%%%% -%% OLD METHOD %% -%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%% +%% OBSOLETE METHOD %% +%%%%%%%%%%%%%%%%%%%%% %% MAIN LAYERS \def\bookcover@bgcolor#1{ -- cgit v1.2.3