2

I want to write some text between Bibliography title and content.

I tried to solve with this solution but it doesnot work with multibib package. Thanks.

% 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}

And 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}
}
2

One option is using the "internals" of 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}

You have to compile this using biber instead of bibtex, preferably by latexmk which also takes care of compiling the document as often as necessary (and you don't have to care about how to call biber). the command is simply latexmk -pdf -xelatex <yourfile>

I am sorry but I had to alter the bibliography as I lack the persian fonts:

@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}
}

The output: enter image description here


Edit: Using bibtex and multibib (note this feels like a cruel hack, and probably is...):

\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}

You can play around with the amount of vertical distance added between the heading and the text. I did however find no solution in teh multibib manual. It seems that there are only headings intended, no introductory text.
The output (only fpr Bib A as the other one is set to a new page in report class):

enter image description here

  • Thank you so much. But I want to use bibtex. – hossein behboodi Jan 25 '17 at 8:58
0

Another way (an more lightweight in my opinion) is to remove headers with this technique: Using multibib without an extra title

Then manually add titles wherever appropriate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.