Utilice el estilo de página dentro de la definición del encabezado bib en biblatex

Utilice el estilo de página dentro de la definición del encabezado bib en biblatex

El siguiente MWE imprime una bibliografía acumulativa, subdividida por capítulo, utilizando biblatex. Me gustaría usar el estilo de página llamado specialdentro de la definición del encabezado bib en lugar de invocarlo explícitamente al final de mi documento. También me gustaría que una vez impresa la bibliografía se restablezca el estilo de página 'principal'. Entonces, ¿es posible utilizar un estilo de página (definido contitlesec) dentro de una definición de bibheading en biblatex? ¿Y se puede limitar el alcance del estilo de página solo a la bibliografía?

\documentclass{book}
\usepackage[english]{babel}

\usepackage[pagestyles,outermarks]{titlesec}

\newpagestyle{main}[\scshape]{%
  \headrule
  \sethead
  [\thepage][][\chaptertitlename\space\thechapter. \chaptertitle]
  {\ifthesection{\thesection\space\,\sectiontitle}   
    {\chaptertitlename\space\thechapter. \chaptertitle}}{}{\thepage}
}
\newpagestyle{special}[\scshape]{%
  \headrule
  \sethead
  [\thepage][][\chaptertitle]
  {\sectiontitle}{}{\thepage}
}
\pagestyle{main}

\usepackage[style=american]{csquotes}
\usepackage[style=authoryear-comp,refsegment=chapter,backend=bibtex]{biblatex}

% Bibliography at the end:
\defbibheading{bibbook}[\bibname]{%
  \chapter*{#1}%
  \chaptermark{#1}%
}
\defbibheading{subbib}{%
  \section*{\refname\addspace\chaptername\addspace%
  \ref{refsegment:\therefsection\therefsegment}}
  \sectionmark{\refname\addspace\chaptername\addspace\therefsegment}
  % \thispagestyle{plain}
  % \pagestyle{special} % I WANT TO PLACE IT HERE
}

\addbibresource{bar.bib}

\usepackage{lipsum}

\begin{document}

\chapter{First}
\lipsum
\section{First Section}
\lipsum[1-5]
\nocite{*}

\chapter{Second}
\nocite{*}

\printbibheading[heading=bibbook]
\pagestyle{special}  % I DON"T WANT TO PLACE IT HERE
\bibbysegment[heading=subbib]

 \end{document}

Dónde bar.bibes

@Book{Jac08,
 author={M. O. Jackson},
 title={Social and Economic Networks},
 publisher={Princeton University Press},
 edition={2},
 address={Princeton, NJ}, 
 year={2008}}

@InBook{NeuNas54,
 author={Von Neumann, John and John Nash},
 title={Game Theory},
 booktitle={Microeconomic Theory},
 bookauthor={Andreu Mas Collel},
 publisher={Mit Press},
 address={Cambridge},
 year={1954}}

@InCollection{Sha53,
 author={Lloyd Shapley},
 title={A value for n-person games},
 booktitle={Contributions to the Theory of Games},
 editor={Harold Kuhn and Albert Tucker},
 volume={2},
 translator={Jurgen Pollock},
 origlanguage={german},
 publisher={Princeton Press},
 address={Princeton, NJ},
 year={1953}}

@Book{Dur05,
 author={Rick Durret},
 title={Probability Theory},
 edition={3},
 publisher={Duxburry Press},
 address={Belmont, Ca},
 year={2005}}

@InCollection{Tho95,
 author={Walter Thomson},
 title={Cooperative models of bargaining},
 booktitle={Handbook of Game Theory},
 volume={2},
 editor={Robert Aumman and I. Hart},
 publisher={North Holland},
 address={Amsterdam},
 year={1995}}

@Report{Car10,
 author={Xavier Carvalho},
 title={The Great Diversification},
 type={Working Paper 1624},
 institution={National Bureau of Economic Research},
 year={2010}}

@InCollection{LopInd83,
 author    = {Juan Lopez and Ignacio Indigo},
 title     = {Checking whether smartand work},
 booktitle = {Stack Exchange answers},
 editor    = {Domingo Peron},
 publisher = {Latex},
 address   = {Knuth Place},
 year      = {1983}
}

Respuesta1

Puede utilizar el siguiente código mediante el cual \AfterRefsegmentsse define el nuevo gancho:

\makeatletter
\newrobustcmd\AfterRefsegments[1]{\def\@AfterRefsegments{#1}}
\def\blx@bibbysegment[#1]{%
  \def\blx@theheading{bibliography}%
  \def\blx@theenv{bibliography}%
  \let\blx@theprenote\@empty
  \let\blx@thepostnote\@empty
  \let\blx@thetitle\@empty
  \c@refsegment\@ne
  \blx@safe@actives
  \setkeys{blx@bbg}{#1}%
  \blx@rest@actives
  \togglefalse{blx@tempa}%
  \blx@refsegments\@AfterRefsegments}
\makeatother
\addbibresource{\jobname.bib}
\preto{\bibbysegment}{\pagestyle{special}}
\AfterRefsegments{\clearpage\pagestyle{main}}

información relacionada