我想在参考书目标题和内容之间写一些文字。
我尝试解决此解决方案但它不适用于 multibib 包。谢谢。
% arara: xelatex
% arara: bibtex: { files: [ main, B , A ] }
% arara: xelatex
% arara: xelatex
% arara: clean1
\documentclass{report}
\usepackage{etoolbox}
\newcommand{\bibpreface}[1]{\patchcmd{\thebibliography}{\list}{#1\list}{}{}}
\usepackage[resetlabels,labeled]{multibib}
\usepackage{xepersian}
\settextfont{XB Niloofar}
\newcommand{\ReferenceDocuments}{\rl{مستندات مرجع}}
\newcommand{\RelevantDocumentation}{\rl{مستندات ذیربط}}
\newcites{A,B}{\ReferenceDocuments%
,
\RelevantDocumentation}
\begin{document}
یک استناد به مستندات مرجع
\cite{bb}
یک استناد به مستندات ذیربط
\citeA{aa}
یک استناد به مراجع اصلی
\citeA{cc}
یک استناد دیگر
\citeB{dd}
\renewcommand{\refname}{\rl{مراجع}}
\bibpreface{مقداری متن قبل از محتویات\\}
\bibliographystyle{plain-fa}
\bibliography{lit}
\bibliographystyleA{plain}
\bibliographyA{lit}
\bibliographystyleB{plain}
\bibliographyB{lit}
\end{document}
和lit.bib
:
@Article{aa,
author = {Author, A.},
title = {Title},
journal = {Journal},
year = 2000
}
@ARTICLE{bb,
AUTHOR = {واحدی, مصطفی},
TITLE = {درختان پوشای کمینه دورنگی مسطح},
JOURNAL = {مجله فارسی نمونه},
VOLUME = {1},
YEAR = {1387},
NUMBER = {2},
MONTH = {آبان},
PAGES = {22-30},
LANGUAGE = {Persian}
}
@ARTICLE{dd,
AUTHOR = {بهبودیفام, حسین},
TITLE = {یک عنوان درست و درمون},
JOURNAL = {مجله فارسی نمونه},
VOLUME = {1},
YEAR = {1387},
NUMBER = {2},
MONTH = {آبان},
PAGES = {22-30},
LANGUAGE = {Persian}
}
@ARTICLE{cc,
AUTHOR = {بهبودی, احمد},
TITLE = {یک عنوان درست و درمون},
JOURNAL = {مجله فارسی نمونه},
VOLUME = {1},
YEAR = {1387},
NUMBER = {2},
MONTH = {آبان},
PAGES = {22-30},
LANGUAGE = {Persian}
}
答案1
一种选择是使用 biblatex 的“内部结构”:
\documentclass{report}
\usepackage{hyperref}
% \usepackage{xepersian}
% \settextfont{XB Niloofar}
% bibliography
\usepackage[natbib = true, % true allows usage of citet, citep etc. commands
style = authoryear, % numeric, % trad-plain: use old bibtex plain style
backend = biber, %
hyperref = true, %
giveninits = true, % first names are reduced to initials
maxbibnames = 8, maxcitenames = 2, %
uniquename = init,
uniquelist = minyear,
doi = false, url = false, isbn = false, eprint = false] % supress all id numbers
{biblatex} %
\addbibresource{lit.bib}
% categories
\DeclareBibliographyCategory{published}
\DeclareBibliographyCategory{conf}
% add papers to categories
\addtocategory{published}{aa}
\addtocategory{published}{dd}
\addtocategory{conf}{bb}
\addtocategory{conf}{cc}
%
\defbibfilter{pub}{category=published}
\defbibfilter{conf}{category=conf}
\begin{document}
\nocite{*}
\defbibnote{A}{During the course of this thesis my research has contributed to the following publications:}
\defbibnote{B}{Conference papers}
\printbibliography[
title = {Peer-reviewed journals},
heading=subbibliography,
filter = pub,
prenote = A
]
\printbibliography[
title = {Conference contributions},
heading=subbibliography,
filter = conf,
prenote = B
]
\end{document}
您必须使用 biber 而不是 bibtex 来编译它,最好使用latexmk
它来根据需要经常编译文档(并且您不必关心如何调用 biber)。命令很简单latexmk -pdf -xelatex <yourfile>
很抱歉,由于缺少波斯字体,我不得不修改参考书目:
@Article{aa,
author = {Author, A.},
title = {Title A},
journal = {Journal},
year = 2000
}
@ARTICLE{bb,
AUTHOR = {Author, B.},
TITLE = {Title B},
JOURNAL = {Journal B},
VOLUME = {1},
YEAR = {1387},
NUMBER = {2},
MONTH = {آبان},
PAGES = {22-30},
LANGUAGE = {Persian}
}
@ARTICLE{dd,
AUTHOR = {Author, C.},
TITLE = {Title C},
JOURNAL = {Journal C},
VOLUME = {1},
YEAR = {1387},
NUMBER = {2},
MONTH = {آبان},
PAGES = {22-30},
LANGUAGE = {Persian}
}
@ARTICLE{cc,
AUTHOR = {Author, D.},
TITLE = {Title D},
JOURNAL = {Journal D},
VOLUME = {1},
YEAR = {1387},
NUMBER = {2},
MONTH = {آبان},
PAGES = {22-30},
LANGUAGE = {Persian}
}
编辑:使用 bibtex 和 multibib(注意,这感觉像是一种残酷的黑客攻击,而且可能确实是……):
\documentclass{report}
\usepackage{hyperref}
% \usepackage{xepersian}
% \settextfont{XB Niloofar}
\usepackage[resetlabels,labeled]{multibib}
\newcites{A,B}
{{BibTitle A\newline\vspace{2ex}\newline\mdseries\normalsize Description text for this bibliography A},%
{BibTitle B\newline\vspace{2ex}\newline\mdseries\normalsize Description text for this bibliography B}%
}
\begin{document}
\nociteA{aa,cc}
\bibliographystyleA{plain}
\bibliographyA{lit}
\nociteB{bb,dd}
\bibliographystyleB{plain}
\bibliographyB{lit}
\end{document}
您可以尝试在标题和文本之间添加垂直距离。但是我在多书目手册中没有找到解决方案。似乎只有标题,没有介绍性文字。
输出(仅适用于书目 A,因为另一个设置为报告类中的新页面):
答案2
另一种方法(我认为更轻量级)是使用这种技术删除标题:使用没有额外标题的 multibib
然后在适当的地方手动添加标题。