-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathchapterbib.hva
24 lines (24 loc) · 1.01 KB
/
chapterbib.hva
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
\let\chapterbib@include\include
\newcounter{chap@included}
\newcommand{\maketocbibitem}{}
\newcommand{\@sectionbib@maketocbibitem}{\@auxdowrite{\@print{\@addcontentsline{htoc}}\{0\}\{\@print{\ahrefloc}\{bib:chap\thechap@included\}\{\refname{}\}\}\@print{
}}}
\renewcommand{\include}[1]
{\stepcounter{chap@included}%
\def\chapterbib@include@name{#1}%
\chapterbib@include{#1}}
\renewcommand{\bibliography}[1]{\maketocbibitem\input{\chapterbib@[email protected]}}
\let\chapterbib@thebibliography\thebibliography
\renewcommand{\thebibliography}[1]
{\setcounter{heveabib}{0}\chapterbib@thebibliography{#1}}
\renewcommand{\bibtaghook}[1]
{\@ifundefined{chapterbib@include@name}{#1}{#1@\thechap@included}}
\newcommand{\sectionbib}[2]
{\renewcommand{\@bibliosection}[1]{#1{\aname{bib:chap\thechap@included}{##1}}}%
\let\maketocbibitem\@sectionbib@maketocbibitem}
\DeclareOption{sectionbib}{\sectionbib{\section*}{section}}%
\DeclareOption{draft}{}%
\DeclareOption{rootbib}{}%
\DeclareOption{duplicate}{}%
\DeclareOption{gather}{}%
\ProcessOptions*