biblatex의 bibheading 정의 내에서 페이지 스타일 사용

biblatex의 bibheading 정의 내에서 페이지 스타일 사용

다음 MWE는 를 사용하여 장별로 세분화된 누적 참고문헌을 인쇄합니다 biblatex. special내 문서 끝에서 명시적으로 호출하는 대신 bibheading 정의 내에서 호출된 페이지 스타일을 사용하고 싶습니다 . 또한 참고문헌이 인쇄되면 '기본' 페이지 스타일이 다시 설정되기를 바랍니다. 그렇다면 페이지 스타일(다음으로 정의됨)을 사용하는 것이 가능합니까?titlesec)의 bibheading 정의 내에서 biblatex? 그리고 해당 페이지 스타일 범위를 참고문헌만으로 제한할 수 있나요?

\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}

어디에bar.bib

@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}
}

답변1

\AfterRefsegments새 후크를 정의 하는 다음 코드를 사용할 수 있습니다 .

\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}}

관련 정보