1

I'm writing a CV-like document in order to be able to officially mentor PhD students. I face a major issue regarding the bibliography.

My bibliography must be managed like this:

  1. multi-sections: one for journals, one for books, one for conference proceedings...
  2. chronological or reversed chronological order
  3. my name must be highlighted
  4. references: cited AND non-cited ones

I'm able to solve points 1 to 3 BUT each time I want to print cited references with non-cited ones, cited references are placed at the beginning of each sub-sections (journals, books...) without keeping the original citing order (chronological or reversed chronological). How to solve this issue?

My template use the multibib package and BibTeX.

Hereafter, an example of my code:

 \documentclass[french]{hdrapplication}

    \usepackage{ae,lmodern}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{textcomp}

    \usepackage{textgreek}
    \usepackage{hyperref}

    \usepackage{array}
    \usepackage{color}

    \usepackage{xstring}

    %\usepackage[resetlabels]{multibib} % Present in the appropriate cls file
    \newcites{bookall}{Books}
    \newcites{journalall}{Journals}
    \newcites{proceedingsall}{Conferences}
    \newcites{othersall}{Others}

    \begin{document}

    My first publication \citeproceedings{RN1} was published in 2006...
    With this Phd student, we publised 2 papers \citejournal{RN2}\citeproceedings{RN3}...

    \section{References}

        % Name & bold
        \def\FormatName#1{%
            \IfSubStr{#1}{StefM}{\textbf{#1}}{#1}%
        }

        \begingroup
            \makeatletter
                \renewcommand{\@seccntformat}[1]{}
                \renewcommand{\refname}{}%
            \makeatother   

            \bibliographystylebook{unsrt}
            \bibliographybook{myBiblio_book}
            \nocitebook{*}

            \bibliographystylejournal{unsrt}
            \bibliographyjournal{myBiblio_journal}
            \nocitejournal{*}

            \bibliographystyleproceedings{unsrt}
            \bibliographyproceedings{myBiblio_proceedings}
            \nociteproceedings{*}

            \bibliographystyleotherss{unsrt}
           \bibliographyothers{myBiblio_others}
           \nociteothers{*}
        \endgroup
\end{document}

Configuration: - TeXMaker 5.0.3 - MiKTeX 2.9 - BiBTeX

StefM
  • 21
  • 2
  • 1
    IUse the \nocite{*} in the preamble. This being said, it is quite easy to obtain what you want with biblatex: e.g. \printbibliography[type=book, heading=subbibliography, title=Books]. – Bernard May 19 '20 at 15:31
  • Thanks @Bernard for your quick answer. According to me, \nocite{*} can't be in the preamble. I tried to use biblatex also without success... Indeed, I can't have cited AND non-cited references at the same time! Maybe I'm wrong. – StefM May 19 '20 at 15:46
  • Maybe this is a problem with you (non-standard) document class? I don't know where to find it, so I can't test. – Bernard May 19 '20 at 16:03
  • I use the hdrapplication document class from Stephane Galland that you can download there. – StefM May 19 '20 at 19:17
  • \nocite{*} should not appear in the preamble. From the BibTeX documentation: "Giving this command, in essence, \nocites all the entries in the database, in database order, at the very spot in your document where you give the command." So the best place to input \nocite{*} is probably just before \printbibliography. – barbara beeton May 19 '20 at 19:31
  • It works now combining your 2 propositions! Thanks a lot. – StefM May 20 '20 at 19:52

1 Answers1

1

Please find hereafter, the solution that works for me!

\documentclass[french]{hdrapplication}

\usepackage{ae,lmodern}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}

\usepackage{textgreek}
\usepackage{hyperref}

\usepackage{array}
\usepackage{color}

\usepackage{xstring}

\usepackage[backend=biber,style=numeric-comp,sorting=ynt,defernumbers=true,maxbibnames=99,url=false]{biblatex}
\usepackage{csquotes}
\addbibresource{myBiblio.bib}

% https://tex.stackexchange.com/questions/33330/make-one-authors-name-bold-every-time-it-shows-up-in-the-bibliography
\usepackage{xstring}
\usepackage{etoolbox}
\newboolean{bold}
\newcommand{\makeauthorsbold}[1]{%
  \DeclareNameFormat{author}{%
  \setboolean{bold}{false}%
    \renewcommand{\do}[1]{\expandafter\ifstrequal\expandafter{\namepartfamily}{####1}{\setboolean{bold}{true}}{}}%
    \docsvlist{#1}%
    \ifthenelse{\value{listcount}=1}
    {%
      {\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\namepartfamily\addcomma\addspace \namepartgiveni}}{\namepartfamily\addcomma\addspace \namepartgiveni}}%
    }{\ifnumless{\value{listcount}}{\value{liststop}}
      {\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni}}%
      {\expandafter\ifthenelse{\boolean{bold}}{\mkbibbold{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}{\addcomma\addspace \namepartfamily\addcomma\addspace \namepartgiveni\addcomma\isdot}}%
      }
    \ifthenelse{\value{listcount}<\value{liststop}}
    {\addcomma\space}{}
  }
}

\makeauthorsbold{StefM}

\begin{document}
     My report...

    \nocite{*}
    \printbibliography[type=inbook, heading=subbibliography, title=Books]
    \printbibliography[type=article, heading=subbibliography, title=Journal,resetnumbers=false]
    \printbibliography[type=inproceedings, heading=subbibliography, title=Conference proceedings,resetnumbers=false]
    \printbibliography[type=misc, heading=subbibliography, title=Others,resetnumbers=false]
\end{document}
StefM
  • 21
  • 2