我的文档需要书籍封面。我使用bookcover
文档类独立创建了书籍封面。我想知道是否有办法将这本书封面作为文档的一部分。以下是我的文档的 MWE:
% !TeX TS-program = xelatex
\documentclass[12pt,openany,twoside]{book}
\raggedbottom
\let\cleardoublepage=\clearpage
\usepackage[
a4paper,
left=1in,
right=1in,
top=1in,
bottom=1in,
]{geometry}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\newcommand\HRule{\noindent\rule{\linewidth}{1.5pt}}
\usepackage{background}
\backgroundsetup{contents={}}
\usepackage{fancyhdr}
\usepackage{hhline}
\pagestyle{fancy}
\usepackage{etoolbox}
\usepackage{fontspec}
\begin{document}
\chapter{ABC}
Thdhss dhdhhs swhwhw ejeeeueu rjtttjt yyyiyiyir rrjrjrjrje eegeeegege qgqgqgqgqq hahahahhaah fkffkrkrkrv tottotottotot gotottotot totottototo.
\end{document}
此外,包文档第 30-31 页中的以下代码bookcover
是我文档书籍封面的 MWE:
\documentclass[
coverwidth=150mm,
coverheight=220mm,
spinewidth=25mm,
bleedwidth=20mm,
markcolor=black,
foldingmargin,
12pt,
% trimmed % Show only trimmed part!
]{bookcover}
%\bookcovertrimmedpart{front} % Trimmed part is the front cover
%\bookcovertrimmedpart{back} % Trimmed part is the back cover
%\bookcovertrimmedpart{spine} % Trimmed part is the spine
\letnamebookcoverpart{front with margin}{front}[5mm,5mm,5mm,5mm]
\letnamebookcoverpart{front upper third}{front with margin}[,2\partheight/3,,]
\letnamebookcoverpart{front lower third}{front with margin}[,,,2\partheight/3]
\letnamebookcoverpart{back with margin}{back}[5mm,5mm,5mm,5mm]
\letnamebookcoverpart{back text area}{back}[27mm,,22mm,27mm]
\letnamebookcoverpart{bg spine bottom}{bg spine}[,,,\partheight-\bleedwidth-\spinewidth]
\newbookcovercomponenttype{center rotate}{
\vfill\centering\rotatebox[origin=c]{-90}{#1}\vfill}
\usepackage[english]{babel}
\usepackage{kantlipsum,microtype}
\usepackage{transparent} % It works only with pdflatex
\begin{document}
\begin{bookcover}
\bookcovercomponent{color}{bg whole}{orange}
\bookcovercomponent{color}{front upper third}{red!60!black}
\bookcovercomponent{color}{front lower third}{red!60!black}
\bookcovercomponent{color}{back with margin}{red!60!black}
\bookcovercomponent{tikz}{front with margin}{
\draw[opacity=0.4,red,line width=10mm] (\partwidth-15mm,0) -- +(0,\partheight);}
\bookcovercomponent{tikz}{back with margin}{
\draw[opacity=0.4,red,line width=10mm] (15mm,0) -- +(0,\partheight);}
\bookcovercomponent{tikz}{whole}[5mm,,5mm,]{
\draw[opacity=0.4,red,line width=10mm] (0,\partheight-20mm) -- +(\partwidth,0);}
\bookcovercomponent{color}{bg spine bottom}{black}
\bookcovercomponent{center}{front upper third}{
\resizebox*{\partwidth-5mm}{\partheight-5mm}{%
\color{white}\transparent{0.1}\bfseries\LaTeX}}
\bookcovercomponent{center}{front lower third}{
\resizebox*{\partwidth-5mm}{\partheight-5mm}{%
\color{white}\transparent{0.1}\bfseries\LaTeX}}
\bookcovercomponent{center}{front}{
\resizebox{90mm}{!}{\bfseries\color{white}\LaTeX}}
\bookcovercomponent{normal}{back text area}{\color{white}\kant[1-2]}
\bookcovercomponent{center rotate}{spine}{
\resizebox{50mm}{!}{\bfseries\color{white}\LaTeX}}
\end{bookcover}
\end{document}