2

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}
Dilawar
  • 992
  • 1
    In general it is hard to access the citations of a different document, but it is possible in certain cases, see https://tex.stackexchange.com/q/426964/35864 – moewe Apr 30 '18 at 06: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 08:28
  • Any news here? Did the link help? If not, what would you like to change? – moewe May 04 '18 at 07:42
  • @moewe I haven't tried the solution yet. I'll update you as soon as I try it this weekend. – Dilawar May 04 '18 at 08:27
  • @moewe I could not get citation to appear. It turns out the pnas-new style uses natbib and bib files generated can not be used with biblatex. I am trying with different backend. I'll update if something changes. – Dilawar May 08 '18 at 11:09
  • .bib files for use with natbib can certainly be used with biblatex as well. You just have to run Biber. But if you are not using biblatex at all, you may want to remove the reference to biblatex in the body of your question and the tag. – moewe May 08 '18 at 11:12
  • @moewe Surely I am missing something. I've added the MWE. Thanks for all the effort. – Dilawar May 08 '18 at 11:16
  • Ah now I understand. The .bbl file is produced by natbib. In that case the answer is sadly: No, you can't import that file for use with biblatex. The .bbls that biblatex needs and produces are strictly and completely incompatible with those from BibTeX. – moewe May 08 '18 at 11:17
  • @moewe sigh :-( . Anyway thanks a lot. It might be useful somewhere else. – Dilawar May 08 '18 at 11:19

1 Answers1

3

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.

moewe
  • 175,683