Chapterbib 錯誤

Chapterbib 錯誤

我正在嘗試逐章製作參考書目。我使用chapterbib包,使用rsc參考書目風格。問題是最後無法編譯。這是我使用的序言的一部分

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[greek,francais]{babel}
\usepackage[T1]{fontenc}
\usepackage[left=2cm,right=2cm,top=3cm,bottom=3cm]{geometry}
\usepackage{chapterbib}
\usepackage{rsc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage[numbers]{natbib}
\usepackage{hyperref}
\hypersetup{colorlinks=true, linkcolor=blue,citecolor=blue}

\begin{document}

\include{partie_1}
\include{annexe_1}

\end{document}

每個部分的末尾都包含:

\blibliographystyle{angew}
\bibliography{biblio.bib}

我只有這個錯誤訊息:

This is BibTeX, Version 0.99d (TeX Live 2012) The top-level auxiliary file:
maitre.aux A level-1 auxiliary file: partie_1.aux The style file: angew.bst
A level-1 auxiliary file: annexe_1.aux Illegal, another \bibstyle
command---line 5 of file annexe_1.aux : \bibstyle : {angew} I'm skipping
whatever remains of this command Illegal, another \bibdata command---line 6 
of file annexe_1.aux : \bibdata : {rsc-maitre,biblio} I'm skipping whatever
remains of this command Database file #1: rsc-maitre.bib Database file #2:
biblio.bib (There were 2 error messages)

不使用chapterbib,它工作得很好。

編輯:查看其他帖子後,我只想準確地說,在啟動原始檔案之前,我在每個文件上午餐了 bibteX -> bibtex -> pdflatex (x2) -> 查看 pdf

答案1

您可以建立一個Makefile或一個腳本來執行此操作。可以從 TexMaker 或其他編輯器呼叫該腳本。

在 Linux 中,我使用 aMakefile來達到這個目的。我只需要運行make,一切就都編譯好了! :)

或腳本Makefile很有用,因為您不需要「堅持」編輯器配置。您也可以從終端運行它,從而允許您使用任何您喜歡的編輯器。

這是一個Makefile例子:

# Main project filename (without .tex extention)
FILE=main

all:
    $(MAKE) latex
    $(MAKE) bibperchapter
    $(MAKE) latex
    $(MAKE) latex
    dvipdf \
        -dPDFSETTINGS=/prepress \
        -dGrayImageResolution=600 \
        -dColorImageResolution=600 \
        -dMonoImageResolution=600 \
        -dSubsetFonts=true \
        -dEmbedAllFonts=true \
        -dMaxSubsetPct=100 \
        -dCompatibilityLevel=1.5 \
        -sPAPERSIZE=a4 $(FILE).dvi

bibperchapter:
    for auxfile in text/ch*.aux ; do \
        bibtex $(basename $$auxfile .aux) ; \
    done

latex:
    latex -interaction batchmode $(FILE)

它為每一章Makefile運行latex(pdftex)bibtex並將 dvi 檔案轉換為 pdf(我使用 dvips 驅動程式)。注意目標bibperchapter。您需要根據章節的位置對其進行編輯。在本例中,章節位於文字/資料夾和所有檔案名稱開頭ch-

您可以根據您的需求進行修改。它可以輕鬆適應您使用的平台(windows、linux、macos)。

答案2

好吧,看起來我所要做的就是用 pdflatex 手動編譯我的主文件,然後為每個包含的部分編譯一次 bibtex,然後在主文件上編譯兩次 pdflatex ...

是否有可能透過 TexMaker 快速編譯實現這一點? ...

相關內容