나는 두 개의 서로 다른 참고문헌을 얻기 위해 multibib
및 를 natbib
함께 사용하고 있습니다(하나는 본문용이고 다른 하나는 부록용). 다음은 예제 코드입니다.
\documentclass[12pt]{article}
\usepackage{natbib}
\usepackage{multibib}
\newcites{apndx}{References}
\begin{document}
First paper to cite: \cite{X1}
\bibliographystyle{ecca}
\bibliography{XXX}
\appendix
Cite a paper in the appendix \citeapndx{X2}
\bibliographystyleapndx{ecca}
\bibliographyapndx{XXX}
\end{document}
그런데 두 번째 참고문헌은 나오지 않고, 부록의 인용문에는 "?"만 나온다. 매뉴얼이나 다른 유사한 질문을 찾아봤지만 multibib
오류가 어디에 있는지 알 수 없습니다.
업데이트 1 bibtex 파일을 두 번 실행했는데도 이런 일이 발생합니다. 파일 은 다음과 같습니다 log
.
Process started: /Library/TeX/texbin/bibtex "prova".aux
This is BibTeX, Version 0.99d (TeX Live 2016)
The top-level auxiliary file: prova.aux
The style file: plain.bst
Database file #1: myrefs.bib
Process exited normally
Process started: /Library/TeX/texbin/bibtex "prova".aux
This is BibTeX, Version 0.99d (TeX Live 2016)
The top-level auxiliary file: prova.aux
The style file: plain.bst
Database file #1: myrefs.bib
Process exited normally
업데이트 2: 문제는 내 TexStudio가 sec.aux
두 번째 참고문헌에 대한 링크를 생성하는 파일을 실행하지 않는다는 것입니다. 나는 이 링크의 단계를 따랐다.https://sourceforge.net/p/texstudio/wiki/Tips%20and%20Tricks/생성하여 .cwl
TexStudio Completion에 추가했지만 여전히 작동하지 않습니다.
답변1
두 multibib
개의 새 파일 과 mwe.tex
. 두 파일 모두 로 실행해야 합니다 . TeXStudio는 for file 로 실행을 수행합니다 . 왜냐하면 여러분이 직접 수행해야 하기 때문입니다. Windows 터미널에서 명령을 실행하면 됩니다 . 그런 다음 TeXStudio로 두 번 컴파일하여 결과 PDF를 얻을 수 있습니다.pdflatex
mwe.aux
apndx.aux
.aux
bibtex
bibtex
mwe.aux
apndx.aux
bibtex apndx
그림의 캡션(주석에 있는 질문)에서 명령을 실행하려면 다음과 같은 \citeapndx
명령을 사용해야 합니다 \protect
(a와 동일 \section
).
\caption{In figure caption \protect\citeapndx{Johnson2000}}
% ^^^^^^^^
따라서 다음 파일을 사용하면 됩니다 mwe.tex
(패키지는 filecontents
MWE를 컴파일하는 하나의 파일에 bib 파일과 tex 코드를 모두 포함하는 데에만 사용됩니다).
% needs: bibtex apndx
\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
@inproceedings{Creighton2006,
author = {Creighton, Oliver and Ott, Martin and Bruegge, Bernd},
booktitle = {Requirements Engineering, 14th IEEE International Conference},
isbn = {0769525555},
pages = {109--118},
publisher = {IEEE},
title = {{Software cinema-video-based requirements engineering}},
url = {http://ieeexplore.ieee.org/xpls/abs{\_}all.jsp?arnumber=1704054},
year = {2006},
}
\end{filecontents}
\begin{filecontents}{apndx.bib}
@article{Johnson2000,
author = {Johnson, W Lewis and Rickel, Jeff W and Lester, James C},
journal = {International Journal of Artificial Intelligence in Education},
number = {11},
pages = {47--78},
title = {{Animated pedagogical agents: face-to-face interaction in
interactive learning environments}},
volume = {Internatio},
year = {2000},
}
\end{filecontents}
\documentclass[12pt]{article}
\usepackage{natbib}
\usepackage{multibib}
\usepackage{graphicx}
\newcites{apndx}{References in Appendix}
\begin{document}
First paper to cite: \cite{Creighton2006}
\bibliographystyle{ecca}
\bibliography{\jobname}
\appendix
Cite a paper in the appendix \citeapndx{Johnson2000}
%\section{In the appendix \protect\citeapndx{Johnson2000}} % <===========
\begin{figure}
\centering
\includegraphics[width=5cm]{example-image-a}
\caption{In figure caption \protect\citeapndx{Johnson2000}} % <=======
\label{fig:example-image-a}
\end{figure}
\bibliographystyleapndx{ecca}
\bibliographyapndx{apndx}
\end{document}
그리고 컴파일 체인(TeXStudio와는 별개):
R
Windows 시작 키와 키를 눌러 Windows에서 터미널 창을 연 다음 를 입력cmd
하고 Enter 키를 누릅니다.- tex 코드와 bib 파일이 있는 디렉토리로 이동하세요.
cd <directory path>
- 명령 실행
pdflatex mwe
(두 개의 필요한 파일 생성.aux
) - 실행 명령
bibtex mwe
(컴파일mwe.aux
) - 실행 명령
bibtex apndx
(컴파일apndx.aux
) - 명령 실행
pdflatex mwe
(결과적으로 파일*.bbl
및*.blg
) - 명령 실행
pdflatex mwe
(참고pdf
문헌이 포함된 파일 생성)
편집기(TeXStudio, TeXnicCenter 등)를 사용하는 경우 편집기 는 pdflatex mwe
및 실행할 수 있지만 . 따라서 Windows 터미널에서 TeXStudio를 사용하여 첫 번째 컴파일을 실행한 후 이 명령을 실행하십시오.bibtex mwe
bibtex apndx
컴파일 체인을 실행하면 다음과 같은 결과 PDF를 얻을 수 있습니다.