每章有多個參考書目文件,末尾有一個參考書目

每章有多個參考書目文件,末尾有一個參考書目

我正在使用該包撰寫論文手稿classicthesis。我有四個參考書目檔案(.bib 檔案),每個章節一個,位於名為「bibliographies」的資料夾中。當我運行主文件時,它可以正確編譯,但引文和參考書目不會出現,並且我沒有收到任何錯誤訊息。所以,我不確定問題是什麼。我得到的是粗體引用鍵,而不是文字引用,也沒有參考書目。我使用 PdfLaTeX + Bib(la)tex + PdfLaTeX (x2) + View Pdf 使用 TexMaker 進行編譯。

我不需要為每一章提供單獨的參考書目,而是為整篇論文提供一個參考書目。

我將感謝您的幫助。以下是有關代碼的資訊。

我在主文件中有以下程式碼:

\addbibresource{bibliographies/chap1.bib}
\addbibresource{bibliographies/chap2.bib}
\addbibresource{bibliographies/chap3.bib}
\addbibresource{bibliographies/chap4.bib}
.
.
.
.
.
.
.
.
\cleardoublepage\include{FrontBackmatter/Bibliography}

在 中bibliography.tex,我有以下程式碼:

\defbibheading{bibintoc}[\bibname]{%
  \phantomsection
  \manualmark
  \markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}}%
  \addtocontents{toc}{\protect\vspace{\beforebibskip}}%
  \addcontentsline{toc}{chapter}{\tocEntry{#1}}%
  \chapter*{#1}%
}
\printbibliography[heading=bibintoc]

在 中classicthesis-config.tex,我有以下程式碼:

\PassOptionsToPackage{
        natbib=true,
        style=authoryear-comp,
        dashed=false,
        hyperref=true,
        backend=biber,
        %bibencoding=ascii,
        maxbibnames=10,
        giveninits=true,
        uniquename=false,%init,
        maxcitenames=2,
        parentracker=true,
        url=true,
        doi=true,
        isbn=true,
        eprint=false,
        backref=true,
        sorting=nyt,
        sortcites=true,
    }   {biblatex}
    \usepackage{biblatex}
  \DeclareNameAlias{sortname}{family-given} 
  
    % report either doi (preffered) or url (if no doi)
    \renewbibmacro*{doi+eprint+url}{% 
    \iftoggle{bbx:url} 
    {\iffieldundef{doi}{\usebibmacro{url+urldate}}{}} 
    {}% 
    \newunit\newblock 
    \iftoggle{bbx:eprint} 
    {\usebibmacro{eprint}} 
    {}% 
    \newunit\newblock 
    \iftoggle{bbx:doi}
    {\printfield{doi}}
    {}}
  
   % remove "in:" from articles. Thanks to Herbert.
    \renewbibmacro{in:}{%
        \ifentrytype{article}{}{%
            \printtext{\bibstring{in}\intitlepunct}}}
    
    % omit "month" and "language" from Bibliography
    \AtEveryBibitem{%
        \clearfield{month}{}%
        \clearlist{language}{}%
    }
    
    % omit from all types from Bibliography
   % \AtEveryBibitem{\clearfield{doi}\clearfield{issn}\clearfield{isbn}}
    %\AtEveryCitekey{\clearfield{doi}\clearfield{issn}\clearfield{isbn}}
    
    % omit from type "articles" from Bibliography
    \AtEveryBibitem{\ifentrytype{article}{\clearfield{issn}\clearfield{isbn}}{}}
    
        % omit from type "articles" from Bibliography
%    \AtEveryCitekey{\ifentrytype{article}{\clearfield{issn}}{}}
    
    % some natbib backwards compatibility 
    \let\citealp\cite
    \let\cite\textcite
    
    % increase vertical space between bibliography items.
    \setlength\bibitemsep{0.5ex}
    \setlength\bibnamesep{1.2ex}
    
    % Comma before and after journal volume. Thanks to lockstep.
    \renewbibmacro*{volume+number+eid}{%
        \setunit*{\addcomma\space}% NEW
        \printfield{volume}%
        \printfield{number}%
        \printfield{eid}}
    \DeclareFieldFormat[article]{number}{(#1)}% number of a journal
    
    % Citation Hyperlinks (not just years), thanks to Audrey.
    \makeatletter
    \renewbibmacro*{cite}{% Based on cite bib macro from authoryear-comp.cbx
        \iffieldundef{shorthand}
        {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
            {\printtext[bibhyperref]{% Include labelname in hyperlink
                    \DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
                    \usebibmacro{cite:label}%
                    \setunit{\addspace}%
                    \usebibmacro{cite:labeldate+extradate}}%
                \usebibmacro{cite:reinit}}
            {\iffieldequals{namehash}{\cbx@lasthash}
                {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
                        \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
                    {\setunit{\addcomma}%
                        \usebibmacro{cite:extradate}}
                    {\setunit{\compcitedelim}%
                        \usebibmacro{cite:labeldate+extradate}%
                        \savefield{labelyear}{\cbx@lastyear}}}
                {\printtext[bibhyperref]{% Include labelname in hyperlink
                        \DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
                        \printnames{labelname}%
                        \setunit{\nameyeardelim}%
                        \usebibmacro{cite:labeldate+extradate}}%
                    \savefield{namehash}{\cbx@lasthash}%
                    \savefield{labelyear}{\cbx@lastyear}}}}
        {\usebibmacro{cite:shorthand}%
            \usebibmacro{cite:reinit}}%
        \setunit{\multicitedelim}}
    
    \renewbibmacro*{textcite}{% Based on textcite bib macro from authoryear-comp.cbx
        \iffieldequals{namehash}{\cbx@lasthash}
        {\iffieldundef{shorthand}
            {\ifthenelse{\iffieldequals{labelyear}{\cbx@lastyear}\AND
                    \(\value{multicitecount}=0\OR\iffieldundef{postnote}\)}
                {\setunit{\addcomma}%
                    \usebibmacro{cite:extradate}}
                {\setunit{\compcitedelim}%
                    \usebibmacro{cite:labeldate+extradate}%
                    \savefield{labelyear}{\cbx@lastyear}}}
            {\setunit{\compcitedelim}%
                \usebibmacro{cite:shorthand}%
                \global\undef\cbx@lastyear}}
        {\ifnameundef{labelname}
            {\printtext[bibhyperref]{% Include labelname in hyperlink
                    \DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
                    \iffieldundef{shorthand}
                    {\usebibmacro{cite:label}%
                        \setunit{%
                            \global\booltrue{cbx:parens}%
                            \addspace\bibopenparen}%
                        \ifnumequal{\value{citecount}}{1}
                        {\usebibmacro{prenote}}
                        {}%
                        \usebibmacro{cite:labeldate+extradate}}
                    {\usebibmacro{cite:shorthand}}%
                    \ifthenelse{\iffieldundef{postnote}\AND
                        \(\value{multicitetotal}=0\AND\value{citetotal}=1\)}
                    {\bibcloseparen% Include closing parenthesis in hyperlink
                        \global\boolfalse{cbx:parens}}
                    {}}}
            {\printtext[bibhyperref]{% Include labelname in hyperlink
                    \DeclareFieldAlias{bibhyperref}{default}% Prevent nested hyperlinks
                    \printnames{labelname}%
                    \setunit{%
                        \global\booltrue{cbx:parens}%
                        \addspace\bibopenparen}%
                    \ifnumequal{\value{citecount}}{1}
                    {\usebibmacro{prenote}}
                    {}%
                    \iffieldundef{shorthand}
                    {\iffieldundef{labelyear}
                        {\usebibmacro{cite:label}}
                        {\usebibmacro{cite:labeldate+extradate}}%
                        \savefield{labelyear}{\cbx@lastyear}}
                    {\usebibmacro{cite:shorthand}%
                        \global\undef\cbx@lastyear}%
                    \ifthenelse{\iffieldundef{postnote}\AND
                        \(\value{multicitetotal}=0\AND\value{citetotal}=1\)}
                    {\bibcloseparen% Include closing parenthesis in hyperlink
                        \global\boolfalse{cbx:parens}}
                    {}}%
                \savefield{namehash}{\cbx@lasthash}}}%
        \setunit{%
            \ifbool{cbx:parens}
            {\bibcloseparen\global\boolfalse{cbx:parens}}
            {}%
            \multicitedelim}}
    
    \makeatother
    
    % Backrefs "cited" instead of "cit"
    \DefineBibliographyStrings{english}{%
        backrefpage={cited on p\adddot},
        backrefpages={cited on pp\adddot}
    }

相關內容