![biblatex 및 backref=true를 사용할 때 장의 페이지 그룹화](https://rvso.com/image/298812/biblatex%20%EB%B0%8F%20backref%3Dtrue%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%A0%20%EB%95%8C%20%EC%9E%A5%EC%9D%98%20%ED%8E%98%EC%9D%B4%EC%A7%80%20%EA%B7%B8%EB%A3%B9%ED%99%94.png)
별표가 없는 각 장의 페이지 카운터를 재설정 하고 장 번호와 페이지 번호를 모두 인쇄하도록 etoolbox
변경했습니다 .\thepage
\pretocmd{\@chapter}{\setcounter{page}{1}}{}{}
\renewcommand*{\thepage}{\thechapter-\arabic{page}}
그 외에도 나는 biblatex
부분적(원한다면 한 장에서)과 전체 참고문헌( chapter*
끝 부분에)을 인쇄하는 데 사용하고 있습니다. 참고문헌이 한 장의 여러 페이지와 다른 장에서 인용되면 backref
선택한 페이지 번호 매기기 형식(MWE 참조)으로 인해 이 옵션은 상당히 보기 흉한 결과를 인쇄합니다. 나는하고 싶어요:
옵션을 사용하여 인쇄할
biblatex
때 페이지를 역참조의 장으로 그룹화 하세요 .[heading=bibliography]
biblatex
역참조에 목록 페이지(장 번호 없이)만 표시 되도록 하고 ,[heading=subbibliography]
인쇄하는 데 옵션을 사용합니다.
MWE에서 역참조는 [ODO95]
다음과 같은 역참조를 표시합니다.
안에
page I
:[cit. on chapters 1 (pp. 1, 3), 2 (p. 1)]
안에
page 1-3
:[cit. on pp. 1, 3]
;안에
page 2-1
:[cit. on p. 1]
.
어떤 장에서든 인용이 이루어지면 글로벌 참고문헌의 역참조에도 해당 페이지가 표시되어야 합니다. \begin{document}
MWE에서 세 줄의 주석 처리를 제거했다고 가정 page I
하면 역참조는 [cit. on chapters 1 (pp. 1, 3), 2 (p. 1); and page i]
.
MWE:
\documentclass[a4paper,titlepage,10pt,twoside,openright]{report}
\usepackage[backend=biber,style=ieee-alphabetic,natbib=true,backref=true]{biblatex}
\addbibresource{IEEEfull.bib}
\addbibresource{IEEEexample.bib}
\usepackage{lipsum}
\usepackage{etoolbox}
\makeatletter
\pretocmd{\@chapter}{\setcounter{page}{1}}{}{}
\makeatother
\begin{document}
%\renewcommand*{\thepage}{\roman{page}}
%\cite{IEEEexample:articledualmonths}
%\clearpage
\renewcommand*{\thepage}{\thechapter-\arabic{page}}
\chapter{Introduction}
\begin{refsegment}
\cite{IEEEexample:articledualmonths} \lipsum[1-10] \cite{IEEEexample:articledualmonths}
\printbibliography[segment=\therefsegment,heading=subbibliography]
\end{refsegment}
\chapter{Second chapter}
\begin{refsegment}
\cite{IEEEexample:articledualmonths}
\cite{IEEEexample:IEEEwebsite}
\nocite{IEEEexample:book_typical,IEEEexample:article_typical}
\printbibliography[segment=\therefsegment,heading=subbibliography]
\end{refsegment}
\cleardoublepage
\setcounter{page}{1}
\renewcommand*{\thepage}{\Roman{page}}
\printbibliography[heading=bibliography]
\end{document}
biblatex
[를 사용하여 역참조 형식을 지정하는 방법에 대한 몇 가지 질문을 읽었습니다.ㅏ,비], 그러나 목록의 "내용"을 변경하는 것이 아니라 형식만 변경하는 것을 목표로 합니다. 그러나 나는 이 형식을 달성하기 위해 해당 답변 중 하나를 참조로 사용했습니다.
\newbibmacro*{pageref}{\iflistundef{pageref}{}
{\finentrypunct\addspace\renewcommand\finentrypunct{}%
\printtext[parens]{%
\ifnumgreater{\value{pageref}}{1}%
{\bibstring{backrefpages}\ppspace}%
{\bibstring{backrefpage}\ppspace}%
\printlist[pageref][-\value{listtotal}]{pageref}}}}
나는 내용이 로 표시된다고 믿습니다 \printlist[pageref][-\value{listtotal}]{pageref}
. 나는 그것에 대해 그리고 \DeclareListFormat
의 문서에서 읽었습니다 biblatex
. 새로운 목록 형식을 선언해야 한다고 생각하지만 어떻게 해야 할지, 콘텐츠가 어떻게 입력되거나 pageref
읽혀지는지도 모르겠습니다 .
나는 다른 사람에게 물었다.질문[heading=subbibliography]
전체 문서에서 발생하는 항목을 표시하는 대신 를 사용할 때 세그먼트 내부의 역참조만 표시하는 방법을 알아보세요 .
그러나 새로운 것을 \DeclareListFormat
설명해야 하는 경우 두 답변이 병합될 수 있습니다.
답변1
최상의 형식이 아닐 가능성이 매우 높지만 이는 질문에서 제시하는 형식으로 작동합니다. 바이벤트리는제네릭.
코드는 주석입니다. 읽어주세요.
MWE:
\documentclass[a4paper,titlepage,10pt,twoside,openright]{report}
\begin{filecontents}{IEEEexample.bib}
@inBook{Wolff1962,
Title = {Philosophia prima sive Ontologia},
Author = {Wolff, Christian von},
Editor = {Jean Ecole},
Publisher = {Olms},
Address = {Hildesheim},
Year = {1962},
Part = {Abt. 2: Lateinische Schriften},
Maintitle = {Gesammelte Werke},
Volume = {3},
langid = {german}
}
@inBook{other1999,
Title = {The title in english},
Author = {Last, Name},
Editor = {Editor Name},
Publisher = {Springer},
Address = {New York},
Year = {1999},
Part = {1},
Maintitle = {The Maintitle},
Volume = {3},
}
@techreport{Natarajan2011,
author = {Natarajan, Nagarajan and Singh-Blom, Ulf Martin and Tewari, Ambuj and Woods, John O and Dhillon, Inderjit S and Marcotte, Edward M},
file = {:Users/jwoods/Downloads/Papers/Natarajan2011.pdf:pdf},
journal = {UTCS Technical Report},
title = {{Predicting gene\textendash disease associations using multiple species data.}},
volume = {TR-11-37},
year = {2011},
type = {techreport},
keywords = {Technical Report}}
@phdthesis{thesis000,
author = {Author Name},
title = {Title of the thesis},
type= {phdthesis},
year = {2011}}
\end{filecontents}
\usepackage[backend=biber,style=ieee-alphabetic,natbib=true,backref=true]{biblatex}
\addbibresource{IEEEexample.bib}
\usepackage{lipsum}
\makeatletter
\pretocmd{\@chapter}{\setcounter{page}{1}}{}{}
\makeatother
\DeclareListParser*{\forpageref}{-} %A parser for the newpage X-x X:chapter and x:the real page
\newcounter{cbcrfpg}% Counter for how many times is cited by chapter
\providetoggle{chorpg}% True: Chapter part (X). False: Page part (x) (chapter or page)
\providetoggle{ifbrefcchap}% if backref is into currentchapter
\togglefalse{ifbrefcchap}%
\newcounter{lastchap}% It is used in the whole bibliograpy. save the last chapter.
\setcounter{lastchap}{0}
\newcommand{\onlycurrentchapter}[1]{%
\iftoggle{chorpg}% %If is chapter part. (X)
{\ifnumequal{#1}{\value{chapter}} % if chapter part is equal to current chapter.
{\toggletrue{ifbrefcchap}% % True the backref into currentpage
\togglefalse{chorpg}}% % The next part will be page part (x)
{\togglefalse{ifbrefcchap}}% % else: False the backref into currentpage
}
{\iftoggle{ifbrefcchap} %If is page part and backref into currentpage
{\stepcounter{cbcrfpg}% % +1 counter of how many times is cited by chapter
\listgadd{\mylistofpages}{#1}}% % Add the page into a internal list.
{}}}
\DeclareListFormat{selectitemsforprint}{% A format for manage every element of backref list.
\toggletrue{chorpg}% This is used for select only the elements into current
\forpageref{\onlycurrentchapter}{#1}} % chapter.
\DeclareListFormat{printallitems}{% A format for manage every element of backref list.
\toggletrue{chorpg}% % This is used to classify the backref by chapters and print the
\forpageref{\printallitems}{#1}%% of the n-1 of total chapters (n).
}
\newcommand{\printallitems}[1]{%
\iftoggle{chorpg}% %If chapter part (X)
{\ifnumequal{\value{lastchap}}{#1}% %If the last chapter is equal to current chapter **
{}% %nothing
{\ifnumequal{\value{cbcrfpg}}{0} %if the last chapter is different to current chapter and
{} % if counter is zero: Nothing
{\printtext{\addspace\thelastchap\addspace}% % if different to zero: Prints!! 1. The chapter numbers
\usebibmacro{printitems}{parens}{pages}{page}% % And the items: it means page of the backref.
\setcounter{cbcrfpg}{0}\undef{\mylistofpages}}% % And restart the list of pages and counter
}%seimprimen
\setcounter{lastchap}{#1}% %Save the last chapter**
}
{\stepcounter{cbcrfpg}\listgadd{\mylistofpages}{#1}}% %If is page part: +1 counter and add to list of pages.
\togglefalse{chorpg}}%
%**(into backref list: exaple [1-1, 1-2] equals chapters)
\renewbibmacro*{pageref}{\iflistundef{pageref}{} %The new pageref bibmacro
{\setcounter{cbcrfpg}{0}\undef{\mylistofpages}\setcounter{lastchap}{0} % start list of pages, cunters and last chapter
\printunit{\adddot\space} % Print a dot
\ifnumequal{\value{refsegment}}{0} % If refsegment is zero, this means global bibliography
{\printtext[brackets]{\printtext{cite on \chaptername}% % Print the part: cite on chapter
\printlist[printallitems][-\value{listtotal}]{pageref}% % Find and Print the backref of all n-1 chapters
\printtext{\addspace\thelastchap\addspace}% % Print the backref of only n chapter***
\usebibmacro{printitems}{parens}{pages}{page}% %*** (not print fortwo below line)
}}
{\printlist[selectitemsforprint]{pageref} % If refsegment different to zero, is a internal bibliography
\usebibmacro{printitems}{brackets}{backrefpages}{backrefpage}}%
}}
\newbibmacro*{printitems}[3]{%
\printtext[#1]{% % Print into brackets
\ifnumgreater{\value{cbcrfpg}}{1}% % If counter greater to 1
{\bibstring{#2}} %Print cite #2 bibstring
{\bibstring{#3}} % else: %Print cite #2 bibstring
\forlistloop{\printtext\newunit}{\mylistofpages}}} %Print the listofpages items.using \printtext{\newunit\thepagepart}
\begin{document}
\renewcommand*{\thepage}{\thechapter-\arabic{page}}
\chapter{Introduction}
\begin{refsegment}
\cite{Wolff1962} \lipsum[1-10]
\cite{Wolff1962}
\printbibliography[segment=\therefsegment,heading=subbibliography]
\end{refsegment}
\chapter{Second chapter}
\begin{refsegment}
\cite{Wolff1962}
\cite{other1999}
\nocite{Natarajan2011,thesis000}
\printbibliography[segment=\therefsegment,heading=subbibliography]
\end{refsegment}
\cleardoublepage
\setcounter{page}{1}
\renewcommand*{\thepage}{\Roman{page}}
\printbibliography[heading=bibliography]
\end{document}
이미지
page 1-3
.
page 2-1
.
page I
.