¿Cómo soluciono el uso de \ChapFrame; ¿Extracción temporal y fijación permanente de los encabezados laterales del pulgar?

¿Cómo soluciono el uso de \ChapFrame; ¿Extracción temporal y fijación permanente de los encabezados laterales del pulgar?

MWE

\documentclass[a4paper,twoside,openright,10pt]{book} 
\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage[explicit]{titlesec}
\usepackage{ifoddpage}
\usepackage{lipsum}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{captdef}
\usepackage{ifoddpage}
\usepackage{ifthen}
\usepackage{calc}
\usepackage{titlesec}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\blankpage}{%
\vspace*{\fill}
{\centering\textit{This page is left blank.}}
\vspace{\fill}}
\makeatletter
\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else
\blankpage
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\imagepage}[1]{%
\vspace*{\fill}
{\centering\includegraphics[width=10cm]{#1}}
\vspace{\fill}}
\makeatletter
\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else
\blankpage
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{eso-pic}
\usepackage[scale=1,angle=0,opacity=1,contents={}]{background}
\usetikzlibrary{calc}

% auxiliary counter
\newcounter{chapshift}
\addtocounter{chapshift}{-1}

% the list of colors to be used (add more if needed)
\newcommand\BoxColor{%
\ifcase\thechapshift orange!30 \or green!30 \or yellow!30 \or red!30\or blue!30\or olive!30\or magenta!30\or red!30\else yellow!30\fi}

% the main command; the mandatory argument sets the color of the vertical box
\newcommand\ChapFrame{%
\AddEverypageHook{%
\ifodd\value{page}
  \backgroundsetup{contents={%
    \begin{tikzpicture}[overlay,remember picture]
      \node[
        fill=\BoxColor,
        inner sep=0pt,
        rectangle,
        text width=1.2cm,
        text height=5.8cm,
        align=center,
        anchor=north east
      ] %
      at ($ (current page.north east) + (2mm,-4.7*\thechapshift cm) $) 
      {\rotatebox{90}{\hspace*{.3cm}\parbox[c][1cm][t]{5.5cm}{%
          \raggedright\textcolor{black}{\footnotesize \scshape\leftmark}}}};
    \end{tikzpicture}%
  }%
}  
\else
  \backgroundsetup{contents={%
    \begin{tikzpicture}[overlay,remember picture]
    \node[
      fill=\BoxColor,
      inner sep=0pt,
      rectangle,
      text width=1.2cm,
      text height=5.8cm,
      align=center,
      anchor=north west
    ] 
    at ($ (current page.north west) + (0mm,-4.7*\thechapshift cm) $) 
    {\rotatebox{90}{\hspace*{.3cm}\parbox[c][.8cm][t]{5.5cm}{%
        \raggedright\textcolor{black}{\footnotesize \scshape\leftmark}}}};
    \end{tikzpicture}%
  }%
}  
\fi
\BgMaterial}%
\stepcounter{chapshift}%
}

% redefinition of \chaptermark to contain only the title
\renewcommand\chaptermark[1]{\markboth{\thechapter.~#1}{}} 

\begin{document}

\tableofcontents
\chapter{Chapter One}
\ChapFrame
\lipsum[1-15]              % This page is left blank.
\chapter{Chapter Two}
\ChapFrame
\lipsum[1-15]
\imagepage{example-image-a}      % For some even pages

\chapter*{Index}
\ChapFrame % <--- 
\addcontentsline{toc}{chapter}{Index}
\end{document}

Cuando el nuevo capítulo coincida con la página par; escribe un "Esta página se deja en blanco." en esta página y asigna el capítulo a la siguiente página impar. Quiero agregar imágenes a algunas de estas páginas en lugar de escribir "Esta página se deja en blanco.". No puedo eliminar una \ChapFrameinformación y un número de página.

ingrese la descripción de la imagen aquí

Quiero asignar una \ChapFramemacro personalizada a páginas como la página de índice. Como la sección está destacada, \Chapframetoma el nombre de la sección anterior. En realidad, quiero que la sección estrella tenga ese nombre.

¿Son posibles?

ingrese la descripción de la imagen aquí

Relacionado con: 1)https://tex.stackexchange.com/a/48648/33075

Relacionado con: 2)https://tex.stackexchange.com/a/167935/33075

Respuesta1

MWE

\documentclass[a4paper,twoside,openright,10pt]{book} 
\usepackage[left=1.5cm,right=1cm,top=3cm,bottom=1.5cm,marginparwidth=5.5cm,marginparsep=1cm,outer=8cm]{geometry}

\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage[explicit]{titlesec}
\usepackage{ifoddpage}
\usepackage{lipsum}
\usepackage{caption}
\usepackage{graphicx}
\usepackage{captdef}
\usepackage{ifoddpage}
\usepackage{ifthen}
\usepackage{calc}
\usepackage{titlesec}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\blankpage}{%
\vspace*{\fill}
{\centering\textit{This page is left blank.}}
\vspace{\fill}}
\makeatletter
\renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else
\blankpage
\thispagestyle{empty}
\newpage
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{eso-pic}
\usepackage{background}
\usetikzlibrary{calc}
\pagestyle{plain}
\newif\ifFrame
\Frametrue

% background common settings
\backgroundsetup{
scale=1,
angle=0,
opacity=1,
contents={}
}

%auxiliary counter
\newcounter{chapshift}
\addtocounter{chapshift}{-1}

% the list of colors to be used (add more if needed)
\newcommand\BoxColor{%
 \ifcase\thechapshift 
pink!80   \or 
green!80    \or 
red!80      \or
magenta!30      \or 
lightgray!80          \else 
darkgray!40       \fi}

% the main command; the mandatory argument sets the color of the vertical box
\newcommand\ChapFrame{%
\Add    EverypageHook{%
 \ifFrame
  \ifthenelse{\isodd{\value{page}}}
{\backgroundsetup{contents={%
\begin{tikzpicture}[overlay,remember picture]
\node[
fill=\BoxColor,
inner sep=0pt,
rectangle,
text width=1.2cm,
text height=7cm,
align=center,
anchor=north east
  ]
  at ($ (current page.north east) + (2mm,-1.5*\thechapshift cm) $) 
{\rotatebox{90}{\hspace*{.3cm}%
  \parbox[c][1cm][t]{7.5cm}{%
    \raggedright\textcolor{black}{\scshape\leftmark}}}};
 \end{tikzpicture}}}%
}
{\backgroundsetup{contents={%
\begin{tikzpicture}[overlay,remember picture]
\node[
fill=\BoxColor,
inner sep=0pt,
rectangle,
text width=1.2cm,
text height=7cm,
align=center,
anchor=north west
] 
at ($ (current page.north west) + (0mm,-1.5*\thechapshift cm) $) 
{\rotatebox{90}{\hspace*{.3cm}%
  \parbox[c][.8cm][t]{7.5cm}{%
    \raggedright\textcolor{black}{\scshape\leftmark}}}};
\end{tikzpicture}}}
 }
 \BgMaterial%
  \fi%
}%
\stepcounter{chapshift}
}

% redefinition of \chaptermark to contain only the title
\renewcommand\chaptermark[1]{\markboth{\thechapter.~#1}{}} 

\begin{document}

\tableofcontents
\chapter{Chapter One}
\ChapFrame
\lipsum[1-15]              % This page is left blank.
\chapter{Chapter Two}
\ChapFrame
\lipsum[1-15]

\newgeometry{left=0cm,right=0cm,top=5cm,bottom=0cm,marginparwidth=0cm,marginparsep=0cm,outer=0cm}

\newpage
\thispagestyle{empty}
\Framefalse

\begin{center}
\includegraphics[scale=1,angle=0]{example-image-a}
\end{center}

\newgeometry{left=1.5cm, right=1cm, top=3cm, bottom=1.5cm, marginparwidth=5.5cm, marginparsep=1cm,outer=8cm}

\chapter*{Index}
\Frametrue
\ChapFrame
\addcontentsline{toc}{chapter}{Index}
\end{document}

información relacionada