Распечатать части библиографии, используя BibTeX? - PullRequest
1 голос
/ 23 февраля 2020

В течение нескольких дней я пытаюсь решить следующую проблему, для которой мне не удалось найти решение. Помощь очень ценится.

Я пишу длинный документ, и для некоторых разделов я хотел бы напечатать подмножество пунктов из общей библиографии, которые будут включены в самом конце перед добавлением.

Есть ли способ сделать это? Я играл с refsection и представлял что-то вроде:

 \documentclass[ twoside,openright,titlepage,numbers=noenddot,
            headinclude,footinclude,
            cleardoublepage=empty,abstract=on,
            BCOR=5mm,paper=a4,fontsize=11pt
            ]{scrreprt}

\usepackage{biblatex}

\addbibresource[label=ownpubs]{ownpubs.bib}
\addbibresource[label=refs]{references.bib}

\begin{document}

%here I want to print a selection of the complete bibliography
%References are required to be consistent throughout the whole document
\chapter*{Related Publications}
\begin{refsection}[references.bib]
    \nocite{*} 
    \printbibliography[heading=none]
\end{refsection}

%here goes all the other stuff: chapters, sections, whatever

%print complete bibliography
\nocite{*} 
\printbibliography

\end{document}

ownpubs.bib:

@article{einstein1935can,
  title={Can quantum-mechanical description of physical reality be considered complete?},
  author={Einstein, Albert and Podolsky, Boris and Rosen, Nathan},
  journal={Physical review},
  volume={47},
  number={10},
  pages={777},
  year={1935},
  publisher={APS}
}
@article{einstein1905movement,
  title={On the movement of small particles suspended in stationary liquids required by the molecularkinetic theory of heat},
  author={Einstein, A},
  journal={Ann. d. Phys},
  volume={17},
  number={549-560},
  pages={1},
  year={1905}
}

reference.bib:

@article{schrodinger1935gegenwartige,
  title={Die gegenw{\"a}rtige Situation in der Quantenmechanik},
  author={Schr{\"o}dinger, Erwin},
  journal={Naturwissenschaften},
  volume={23},
  number={50},
  pages={844--849},
  year={1935},
  publisher={Springer-Verlag}
}

С приведенным выше кодом I напечатаны библиографии, но ссылки (цифры) не совпадают.

Кто-нибудь знает способ решения этой проблемы? Я ни в коем случае не ограничен делением файлов. Это было единственное решение, которое мне удалось найти.

Спасибо за вашу помощь и теплые поздравления!

1 Ответ

1 голос
/ 27 февраля 2020

Вы можете использовать подход, аналогичный https://tex.stackexchange.com/a/166018, и автоматически добавить ключевое слово ко всем записям в references.bib. Это позволит вам фильтровать для тех, кто использует \printbibliography:

 \documentclass[ twoside,openright,titlepage,numbers=noenddot,
            headinclude,footinclude,
            cleardoublepage=empty,abstract=on,
            BCOR=5mm,paper=a4,fontsize=11pt
            ]{scrreprt}

\usepackage{biblatex}

\addbibresource[label=ownpubs]{ownpubs.bib}
\addbibresource[label=refs]{references.bib}

\DeclareSourcemap{
  \maps[datatype=bibtex]{
    \map[overwrite]{
      \perdatasource{references.bib}
      \step[fieldset=keywords, fieldvalue={,Perhalo}, append]
    }
  }
}

\begin{document}

%here I want to print a selection of the complete bibliography
%References are required to be consistent throughout the whole document
\chapter*{Related Publications}
\printbibliography[heading=none,keyword={Perhalo}]

%here goes all the other stuff: chapters, sections, whatever

%print complete bibliography
\nocite{*} 
\printbibliography

\end{document}
...