0

I am preparing submission for a journal which asked me to submit tables as separate pdf file. I compiled table as a standalone document with same bibliography file as the main paper. Most citation e.g. \cite{foo} and \cite{bar} were replaced by different numbers in table pdf which are different than the numbers in main paper. This is expected but this is not what I need. I want the citation numbering in table pdf to match the main reference in paper. Currently I have the following ad-hoc solution:

  • Compile the table along with the main paper but with \pagebreak and remove the table page from paper and save it separately.

This is not to my liking. Is there any way I can enforce the same numbering of citation in two different documents compiled separately?

I am using biblatex with lualatex.

MWE:

file table.bbl copied from bbl file generated after compiling another document.

\begin{thebibliography}{10}

\bibitem{hebb_organization_2005}
Hebb DO (2005) {\em The {Organization} of {Behavior}: {A} {Neuropsychological}
  {Theory}}.
\newblock (Psychology Press).
\newblock Google-Books-ID: uyV5AgAAQBAJ.

\bibitem{takeuchi_synaptic_2014}
Takeuchi T, Duszkiewicz AJ, Morris RGM (2014) The synaptic plasticity and
  memory hypothesis: encoding, storage and persistence.
\newblock {\em Phil. Trans. R. Soc. B} 369(1633):20130288.
\newblock 00078.

\end{thebibliography}

table.tex file.

\documentclass[crop=false]{standalone}
\usepackage{fontenc}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{colortbl}

\newcommand\SEB[1]{\textsubscript{#1}}
\def\RC{\rowcolor{gray!10}}
\renewcommand{\arraystretch}{1.2}
\usepackage[ ]{biblatex}

% This trick is from https://tex.stackexchange.com/a/426982/8087
\makeatletter
\newcommand*{\importbibfrom}[1]{%
  \def\blx@bblfile{%
    \blx@secinit
    \begingroup
    \blx@bblstart
    \InputIfFileExists{#1.bbl}
      {\blx@info@noline{... file '#1.bbl' found}%
       \global\toggletrue{blx@bbldone}}
      {\blx@info@noline{... file '#1.bbl' not found}%
       \typeout{No file #1.bbl.}}%
    \blx@bblend
    \endgroup
    % global sorting as this is called at BeginDocument
    \csnumgdef{blx@labelnumber@\the\c@refsection}{0}}}
\global\let\blx@rerun@biber\relax
\makeatother

\importbibfrom{table}

\begin{document}

\begin{tabular}{llp{0.1\linewidth}p{.15\linewidth}}
    \toprule
    \textbf{Symbol} & \textbf{Parameter} & \textbf{Value} & \textbf{Ref/Notes}\\
    \midrule
    A & B & C & \cite{hebb_organization_2005}\cite{takeuchi_synaptic_2014}
   \bottomrule
\end{tabular}
\end{document}
  • 1
    In general it is hard to access the citations of a different document, but it is possible in certain cases, see tex.stackexchange.com/q/426964/35864 – moewe Apr 30 '18 at 6:29
  • 1
    If the ordering of citation is defined by the main text, you could copy the main.bbl to table.bbl and not run biber on table. I'm not sure this works with biblatex, but is efficient with old fashion bibtex route. An elaborate version of this procedure is given in the post refered to in the previous comment. – Jhor Apr 30 '18 at 8:28
  • Any news here? Did the link help? If not, what would you like to change? – moewe May 4 '18 at 7:42
  • @moewe I haven't tried the solution yet. I'll update you as soon as I try it this weekend. – Dilawar May 4 '18 at 8:27
  • Did you get anywhere last weekend? – moewe May 8 '18 at 8:25
2

If both documents, the one you want to import the bibliography from and the one you import to, use the same bibliography set-up, it is possible to cook something up that works in certain cases. See How to import / print a bibliography created from a separate / external document?

Your problem is that you have a .bbl file created by pnas-new.bst and want to import that into a document that uses biblatex. That does not work since biblatex's .bbl files and the .bbl files produced by BibTeX's .bst styles are completely incompatible and not mutually understandable.

The solution in this case is to not load biblatex in table.tex

\documentclass[crop=false]{standalone}
\usepackage{fontenc}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{colortbl}
\usepackage[numbers]{natbib}
\newcommand\SEB[1]{\textsubscript{#1}}
\def\RC{\rowcolor{gray!10}}
\renewcommand{\arraystretch}{1.2}


\begin{document}
\begin{tabular}{llp{0.1\linewidth}p{.15\linewidth}}
    \toprule
    \textbf{Symbol} & \textbf{Parameter} & \textbf{Value} & \textbf{Ref/Notes}\\
    \midrule
    A & B & C & \cite{hebb_organization_2005}\cite{takeuchi_synaptic_2014}\\
   \bottomrule
\end{tabular}

\input{table.bbl}
\end{document}

gives

enter image description here

if compiled in the same folder as table.bbl from the question.

You can't really use most of biblatex's advanced features anyway if you import the .bbl from elsewhere, so you can just go with natbib here.

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.