0

I have used Adobe Illustrator to draw some covers for my part title page. Despite such dedication, I would appreciate if the bookmark points into the "cover" page. The original part title page may retain, however, it is preferred to include the homemade cover as the first page of the part.

MWE

\documentclass[12pt,a4paper,headinclude,openright]{scrbook}
\usepackage[usenames,dvipsnames,svgnames,x11names,table]{xcolor}
\usepackage{afterpage}
\usepackage{pagecolor}
\usepackage[ilines]{scrlayer-scrpage}
\usepackage[top=3cm, bottom=4cm, outer=4cm, inner=3cm, heightrounded, marginparwidth=3cm, marginparsep=0.5cm, voffset=0cm]{geometry}
\usepackage{pdfpages}
\begin{document}
\frontmatter

\let\LaTeXStandardMaketitle\maketitle


\renewcommand{\maketitle}{%
\includepdf[openright=false]{Cover.pdf}
}%
\includepdf[openright=false]{CoverVol1.pdf} % this is where the cover should be
\thispagestyle{empty}
\part{Part ONE} % I would like to retain the text title as the same format as well
\end{document}

The cover page(s) is A4 sized and available on request.

  • Please make your code into a minimal working example (MWE). – cfr Mar 30 '15 at 12:00
  • so, the partpage should stay as it is (on odd pages), and the even page partpage-1 should contain the pdf. Did i get this right? – Johannes_B Mar 30 '15 at 12:23
  • @Johannes_B They both are in the odd number page, so that I can read the cover and the "wordy" cover on the right. – SHY.John Mar 30 '15 at 12:30
  • But why are you setting openright to false? – Johannes_B Mar 30 '15 at 12:36
  • @Johannes_B Okay, this is due to the odd page is at left when the cover page is at left as well. I am viewing with the cover page at right so that is why. – SHY.John Mar 30 '15 at 12:44
1

I am not sure if I understand what you want:

\documentclass[12pt,a4paper,headinclude,openright]{scrbook}
\usepackage[usenames,dvipsnames,svgnames,x11names,table]{xcolor}
\usepackage{afterpage}
\usepackage{pagecolor}
\usepackage[ilines]{scrlayer-scrpage}
\usepackage[top=3cm, bottom=4cm, outer=4cm, inner=3cm, heightrounded, marginparwidth=3cm, marginparsep=0.5cm, voffset=0cm]{geometry}
\usepackage{pdfpages}

\newcommand*\pdfpart[2]{%
  \cleardoublepage%
  \includepdf[pagecommand=\thispagestyle{empty}%
      \stepcounter{part}\addparttocentry{\thepart}{#2}%
      \addtocounter{part}{-1}%
    ]{#1.pdf}%
  \cleardoublepage%
  \part[]{#2}%
}

\usepackage{mwe}% dummy text and example pdf
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\pdfpart{example-image-A}{Part ONE}
\blinddocument
\blinddocument
\part{Part TWO}
\blinddocument
\blinddocument
\pdfpart{example-image-B}{Part THREE}
\blinddocument
\blinddocument
\pdfpart{example-image-C}{Part FOUR}
\blinddocument
\blinddocument
\end{document}

Note: You have to load hyperref (this package is missing in your MWE) and you have to add a \phantomsection before \addparttocentry if you want to use bookmarks.


Update

If image should be in the background of the normal part page you can define and use a new pagestyle.

\documentclass[12pt]{scrbook}
\usepackage{xcolor}
\usepackage{scrlayer-scrpage}

%%%

\usepackage{etoolbox}

\newcommand*\partpagecolor[1][]{}
\newkomafont{partpage}{\normalcolor}
\addtokomafont{part}{\usekomafont{partpage}}
\addtokomafont{partnumber}{\usekomafont{partpage}}

\newpairofpagestyles{partpageimage}{
  \clearpairofpagestyles
  \ofoot{\pagemark}
  \addtokomafont{pagenumber}{\usekomafont{partpage}}
}
\makeatletter
\newcommand*\@partpageimage{}
\newcommand*\partpageimage[2][]{%
  \ifstr{#2}{}{%
      \setkomafont{partpage}{\normalcolor}%
      \def\@partpageimage{}%
    }{%
      \setkomafont{partpage}{\partpagecolor[#1]}%
      \gdef\@partpageimage{\includegraphics[width=\paperwidth]{#2}}%
}}

\appto\partheademptypage{\partpageimage{}}

\DeclareNewLayer[background,area={.5\paperwidth}{.5\paperheight}{0pt}{0pt},
  contents={\makebox[0pt]{\raisebox{0pt}[.5\height][.5\height]{\@partpageimage}}}
]{partpageimage.bg}
\makeatother

\AddLayersAtBeginOfPageStyle{partpageimage}{partpageimage.bg}
\colorlet{defaultpartpagecolor}{white}

% comment the following two lines to get normal part pages
\renewcommand*{\partpagestyle}{partpageimage}
\renewcommand*{\partpagecolor}[1][]{\ifstr{#1}{}{\color{defaultpartpagecolor}}{\color{#1}}}

%%%

\usepackage{hyperref}

\usepackage{mwe}% dummy text and example pdf
\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\partpageimage{example-image-golden-upright}
\part{Part ONE}
\blinddocument
\part{Part TWO}
\blinddocument
\partpageimage[yellow]{example-grid-100x100bp}
\part{Part THREE}
\blinddocument
\partpageimage{example-image-A}
\part{Part FOUR}
\blinddocument
\end{document}
| improve this answer | |
  • I like your idea, although I used mine for implementation. I assume yours are valid so check for the tick on the left hand side. – SHY.John Apr 1 '15 at 7:09
0

Inspired from esdd's answer, with trials and errors. I sought out what I need.

\documentclass[12pt,a4paper,headinclude,openright]{scrbook}
\usepackage[usenames,dvipsnames,svgnames,x11names,table]{xcolor}
\usepackage{afterpage}
\usepackage{pagecolor}
\usepackage[ilines]{scrlayer-scrpage}
\usepackage[top=3cm, bottom=4cm, outer=4cm, inner=3cm, heightrounded, marginparwidth=3cm, marginparsep=0.5cm, voffset=0cm]{geometry}
\usepackage{pdfpages}
\begin{document}
\frontmatter

\let\LaTeXStandardMaketitle\maketitle


\renewcommand{\maketitle}{%
\includepdf[openright=false]{Cover.pdf}
}%
% ================================= part and chapter style ==================================

\newcommand*\pdfpart[2]{%
  \cleardoublepage%
  \phantomsection%
  \stepcounter{part}%
  \includepdf{#1.pdf}%
  \addparttocentry{\thepart}{#2}%
  \cleardoubleemptypage%
  \part*{#2}%
}
\pdfpart{}{}
\end{document}

I understand you may not know what I am doing. I will explain here.

  1. \phantonsection makes a hidden section to redirect the bookmark to the cover page.
  2. then step up the counter by 1
  3. Cover page included and add the entry to the toc
  4. End the page with \cleardoublepage
  5. The \part* is used for as a "phantom" part
  6. The \pdfpart has argument ONE for the cover and TWO for the part name.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.