4

I have troubles with a publisher. I have a book script with a lot of references but for some reason they want no reference to a bibliography file but want the text that BibLaTeX generates IN the TeX-code. So they want a document without \cite{} but full information about the reference text that I want.

Here is a MWE for the situation right now:

\documentclass[english]{scrbook}
\usepackage{babel}  
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}  
\usepackage{microtype}
\usepackage{lmodern}  
\usepackage{filecontents}  
\usepackage[style=authortitle,backend=biber]{biblatex}  
\bibliography{\jobname}
\begin{filecontents}{\jobname.bib}   
@book{Test,
author = {Bernd Test},
year = {1986},
title= {Some Publication},
}
\end{filecontents}  



\begin{document}
This works, yeah!\footnote{\cite{Test}.}    
\printbibliography
\end{document}

Here is what the (probably) want:

\documentclass[english]{scrbook}  
\usepackage{babel}  
\usepackage[utf8]{inputenc}  
\usepackage[T1]{fontenc}  
\usepackage{microtype}  
\usepackage{lmodern}  

\begin{document}  

This works, yeah!\footnote{Test: \emph{Some publication}.}  
\section{References}  
Test, Bernd. \emph{Some publication}. 1986.  
\end{document}

My question now is: Is there a way to get from one code to the other code automatically? The important thing is to have the footnote and reference text in the document in such a way that the pdf looks the same.

Thanks in advance, Alex

naphaneal
  • 2,614
Alex
  • 373
  • 1
    Welcome to TeX.SX! Unfortunately, this is not how biblatex works. Unlike for BibTeX, there is no point at which you can 'intercept' the formatted bibliography. It is possible but very unlikely that a work-around mentioned in https://tex.stackexchange.com/q/12175/35864 works for you. Otherwise you will have to use BibTeX or produce the bibliography by hand. – moewe Jun 15 '18 at 11:26
  • 4
    @moewe even with bibtex I don't see how to replace the cite commands by their output. . – Ulrike Fischer Jun 15 '18 at 11:30
  • @UlrikeFischer Fair point, I hadn't seen the cite commands and only focused on the bibliography. For the bibliography things would almost look like in the expected output, but one would get the thebibliography (I guess many publishers know how to deal with that and will be OK with it, but you never know). – moewe Jun 15 '18 at 11:32
  • Thank you for your answers. So far a »no« unfortunately. Since the alternative is changing the publisher or 400 new footnotes: Further ideas? – Alex Jun 16 '18 at 10:04
  • It seems that you have two accounts, you can ask Stackexchange staff to merge them to regain control over your question: https://tex.stackexchange.com/help/merging-accounts – moewe Jun 16 '18 at 10:09

1 Answers1

3

Unfortunately, due to the way biblatex works you can't 'intercept' the formatted bibliography in way useful to your endeavour.

With traditional BibTeX styles it would at least be possible to obtain a bibliography with only minimal markup commands that would probably be OK for your publisher. This is because with .bst styles BibTeX writes the formatted bibliography to the .bbl file and that is subsequently read into the .tex file. The citations would not be replaced, but I'm not sure if your publisher really requires that.

With biblatex on the other hand, the backend (Biber or BibTeX) only writes the field data in a form digestible for LaTeX to the .bbl. The bibliography and citations are created from that data on the fly. There is no intermediate output that you could reasonably use to obtain the result you have in mind.

If you haven't already, you should definitely contact the publisher and inquire if they can't work around their limitations and accept the manuscript with biblatex or in PDF format, or ...

If they insist, I see two other ways that would require a not insignificant amount of work on your part

  1. You could try to convert your completed TeX document into a different format. tex4ht/htlatex springs to mind, but you could also try Pandoc (Bibtex to html/Markdown/etc., using Pandoc) or other solutions (Converting Latex to MsWord .doc or .rtf, How can I convert math-less latex documents into Microsoft Word?, https://texfaq.org/FAQ-fmtconv).

    • That means you could submit a HTML or .odt file.
    • Conversion back into (simpler) TeX might also be possible (but I'm not sure if that is even desirable)
    • The converted text needs to be checked carefully and will in all likeliness need manual tweaks. If you have a long text that will take quite some time.
  2. You could write a script that essentially does a search-and-replace job on \cite{sighfridsson} to Sigfridsson and Ryde 1998.

    • If your citation style is complicated and has context-dependent features like 'ibid.'/'op. cit.' this can become a lot harder.
    • A hard-coded solution (where you supply the expected output for each citekey) might be a viable option for texts with not that many different citations and a simple citation style.
    • An automatic solution would have to parse .bib files and would have to understand your desired citation and bibliography style. Many languages have libraries available that can parse .bib files, but I am not aware of a full-blown script that does this already.
      • If context-sensitive behaviour is required it is not unthinkable that biblatex could at least pass some of the necessary information required for that on to the script via an external file, but that will require a lot of work on both the script and biblatex side.
moewe
  • 175,683
  • Thank you moewe for your long and productive answer. Maybe it’s good to give some background information (I will take a close look at your suggested solutions though anyway): The publisher would prefer a tex document without references to the bib-file. They want to convert the tex-file (including the typical commands) into a format they work with. So they are able to handle tex but not the bibliographical references. Don’t ask me why. They also suggested converting into html but in fact I am lost in estimating which one could work for me – Alex Jun 19 '18 at 21:40