Kapitel/Chapter 11

Einführung in LaTeX / Introduction into LaTeX

11.6

Integrating the external .bbl-file

In some cases publishers accept only _one_ TeX source file, which also includes a bibliography/index/... For bibtex it is really simply: the created bbl file can be simply inserted into the main TeX source file. But for biblatex/biber it is not possible; the created bbl file is not ready formatted. Here is a solution how it works:

% ! TEX lualatex
\documentclass[12pt]{article}
\usepackage[style=authoryear]{biblatex}% change it for your needs 
\addbibresource{biblatex-examples.bib}
%-------------- start insert modified commands ------------------
\makeatletter
\def\blx@bblfile@biber{%
  \blx@secinit
  \begingroup
  \blx@bblstart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%% copy here the contents of the created bbl file, like the following one

\refsection{0}
  \datalist[entry]{nyt/global//global/global}
    \entry{aksin}{article}{}
      \name{author}{7}{}{%
        {{un=0,uniquepart=base,hash=e410078ecf298d6b83792df6633b2b08}{%
           family={Aks{ı}n},
           familyi={A\bibinitperiod},
           given={Özge},
           giveni={Ö\bibinitperiod},
           givenun=0}}%
        {{un=0,uniquepart=base,hash=e881ffc293766c81018c24d97971f9c3}{%
           family={Türkmen},
           familyi={T\bibinitperiod},
           given={Hayati},
           giveni={H\bibinitperiod},
           givenun=0}}%
        {{un=0,uniquepart=base,hash=f9be8f5362c3f1a8c57254f421602a77}{%
           family={Artok},
           familyi={A\bibinitperiod},
           given={Levent},
           giveni={L\bibinitperiod},
           givenun=0}}%
        {{un=0,uniquepart=base,hash=ec020af214a005621e2bee07a4c233b2}{%
           family={Çetinkaya},
           familyi={Ç\bibinitperiod},
           given={Bekir},
           giveni={B\bibinitperiod},
           givenun=0}}%
        {{un=0,uniquepart=base,hash=3aaac037c43bc853e732168da667cd40}{%
           family={Ni},
           familyi={N\bibinitperiod},
           given={Chaoying},
           giveni={C\bibinitperiod},
           givenun=0}}%
        {{un=0,uniquepart=base,hash=7936aa08c0b52f024d7a3402b03bf380}{%
           family={Büyükgüngör},
           familyi={B\bibinitperiod},
           given={Orhan},
           giveni={O\bibinitperiod},
           givenun=0}}%
        {{un=0,uniquepart=base,hash=f37529ce7811acc4b7ecb0d352a007ec}{%
           family={Özkal},
           familyi={Ö\bibinitperiod},
           given={Erhan},
           giveni={E\bibinitperiod},
           givenun=0}}%
      }
      \strng{namehash}{860705eb8ffac6e40507746c7ede79ca}
      \strng{fullhash}{f565e365b13f55b7eb75966908d10961}
      \strng{bibnamehash}{860705eb8ffac6e40507746c7ede79ca}
      \strng{authorbibnamehash}{860705eb8ffac6e40507746c7ede79ca}
      \strng{authornamehash}{860705eb8ffac6e40507746c7ede79ca}
      \strng{authorfullhash}{f565e365b13f55b7eb75966908d10961}
      \field{sortinit}{A}
      \field{sortinithash}{2f401846e2029bad6b3ecc16d50031e2}
      \field{extradatescope}{labelyear}
      \field{labeldatesource}{}
      \field{labelnamesource}{author}
      \field{labeltitlesource}{title}
      \field{indextitle}{Effect of immobilization on catalytic characteristics}
      \field{journaltitle}{J.~Organomet. Chem.}
      \field{number}{13}
      \field{title}{Effect of immobilization on catalytic characteristics of saturated {Pd-N}-heterocyclic carbenes in {Mizoroki-Heck} reactions}
      \field{volume}{691}
      \field{year}{2006}
      \field{dateera}{ce}
      \field{pages}{3027\bibrangedash 3036}
      \range{pages}{10}
    \endentry
  \enddatalist
\endrefsection
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \blx@bblend
  \endgroup
  \csnumgdef{blx@labelnumber@\the\c@refsection}{0}}
\makeatother
%-------------- end insert modified commands ------------------
\begin{document}
foo~\cite{aksin}

\printbibliography
\end{document}

If you run bibtex instead of biber (btw: biber is the better choice) then you have to use it in this way:

...
\def\blx@bblfile@bibtex{% instead of ...\blx@bblfile@@biber
  \blx@secinit
  \begingroup
  \blx@bblstart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%% copy here the contents of the created bbl file (an example follows)
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  \blx@bblend
  \endgroup
  \csnumgdef{blx@labelnumber@\the\c@refsection}{0}%
  \iftoggle{blx@reencode}{\blx@reencode}{}}
...

Zurück zur Hauptseite/Back to main page
Copyright $Id: chapter11.html 2 2022-12-28 16:38:18Z voss $