2

I am writing a report with latex but \printbibliography gives Undefined control sequenceerror. This is an extract from my .tex file:

\documentclass[]{article}
\usepackage[backend=biber, sorting=none, maxnames=35]{biblatex}
\addbibresource{report.bib}

\title{Title}
\begin{document}
\maketitle

Report content \cite{hkust}\cite{hkust_cat}\cite{geom}\cite{dreiding}\cite{cp2k}\cite{charmm}\cite{Smit}\cite{csd1}\cite{csd2}.

\printbibliography
\end{document}

And this is my .bib file:

    @article{Smit,
    author = {Boyd, Peter G. and Moosavi, Seyed Mohamad and Witman, Matthew and Smit, Berend},
    title = {Force-Field Prediction of Materials Properties in Metal-Organic Frameworks},
    journal = {The Journal of Physical Chemistry Letters},
    volume = {8},
    number = {2},
    pages = {357-363},
    year = {2017},
    doi = {10.1021/acs.jpclett.6b02532}
}

@article{dreiding,
    author = {Mayo, Stephen L. and Olafson, Barry D. and Goddard, William A.},
    title = {DREIDING:  a generic force field for molecular simulations},
    journal = {The Journal of Physical Chemistry},
    volume = {94},
    number = {26},
    pages = {8897-8909},
    year = {1990},
    doi = {10.1021/j100389a010}
}

@article {hkust,
    author = {Chui, Stephen S.-Y. and Lo, Samuel M.-F. and Charmant, Jonathan P. H. and Orpen, A. Guy and Williams, Ian D.},
    title = {A Chemically Functionalizable Nanoporous Material [Cu$_3$(TMA)$_2$(H$_2$O)$_3$]$_n$},
    journal = {Science},
    volume = {283},
    number = {5405},
    pages = {1148--1150},
    year = {1999},
    doi = {10.1126/science.283.5405.1148}
}

@article{charmm,
    author = {MacKerell, A. D. and Bashford, D. and Bellott, M. and Dunbrack, R. L. and Evanseck, J. D. and Field, M. J. and Fischer, S. and Gao, J. and Guo, H. and Ha, S. and Joseph-McCarthy, D. and Kuchnir, L. and Kuczera, K. and Lau, F. T. K. and Mattos, C. and Michnick, S. and Ngo, T. and Nguyen, D. T. and Prodhom, B. and Reiher, W. E. and Roux, B. and Schlenkrich, M. and Smith, J. C. and Stote, R. and Straub, J. and Watanabe, M. and Wi{\'o}rkiewicz-Kuczera, J. and Yin, D. and Karplus, M.},
    title = {All-Atom Empirical Potential for Molecular Modeling and Dynamics Studies of Proteins},
    journal = {The Journal of Physical Chemistry B},
    volume = {102},
    number = {18},
    pages = {3586-3616},
    year = {1998},
    doi = {10.1021/jp973084f}
}

@article{cp2k,
    title={cp2k: atomistic simulations of condensed matter systems},
    author={Hutter, J{\"u}rg and Iannuzzi, Marcella and Schiffmann, Florian and VandeVondele, Joost},
    journal={Wiley Interdisciplinary Reviews: Computational Molecular Science},
    volume={4},
    number={1},
    pages={15--25},
    year={2014}
}

@article{lammps,
    title={Fast Parallel Algorithms for Short-Range Molecular Dynamics},
    author={Steve Plimpton},
    journal={The Journal of Computational Physics},
    volume={117},
    number={1},
    pages={1-19},
    year={1995}
}

@article{lbfgs,
    title={On the Limited Memory BFGS Method for Large Scale Optimization},
    author={Dong C., Liu and Jorge, Nocedal},
    journal={The Journal Mathematical Programming},
    volume={45},
    number={},
    pages={503-528},
    year={1989},
    doi={10.1007/BF01589116}
}

@article{fire,
    title = {Structural Relaxation Made Simple},
    author = {Bitzek, Erik and Koskinen, Pekka and G{\"a}hler, Franz and Moseler, Michael and Gumbsch, Peter},
    journal = {Physical Review Letters},
    volume = {97},
    issue = {17},
    pages = {170201-170205},
    numpages = {},
    year = {2006},
    month = {},
    publisher = {},
    doi = {10.1103/PhysRevLett.97.170201}
}

@article{hkust_cat,
    author = {Alaerts, Luc and S{\'e}guin, Etienne and Poelman, Hilde and Thibault-Starzyk, Fr{\'e}d{\'e}ric and Jacobs, Pierre A. and De Vos, Dirk E.},
    title = {Probing the Lewis Acidity and Catalytic Activity of the Metal-Organic Framework [Cu$_3$(btc)$_2$]},
    journal = {Chemistry: A European Journal},
    volume = {12},
    number = {28},
    year = {2006},
    pages = {7353-7363},
    doi = {10.1002/chem.200600220}
}

@article {Murnaghan,
    author = {Murnaghan, Francis D.},
    title = {The Compressibility of Media under Extreme Pressures},
    volume = {30},
    number = {9},
    pages = {244--247},
    year = {1944},
    doi = {10.1073/pnas.30.9.244},
    journal = {Proceedings of the National Academy of Sciences}
}

@article{geom,
    author = {Prestipino, C. and Regli, L. and Vitillo, J. G. and Bonino, F. and Damin, A. and Lamberti, C. and Zecchina, A. and Solari, P. L. and Kongshaug, K. O. and Bordiga, S.},
    title = {Local Structure of Framework Cu(II) in HKUST-1 Metallorganic Framework: Spectroscopic Characterization upon Activation and Interaction with Adsorbates},
    journal = {Chemistry of Materials},
    volume = {18},
    number = {5},
    pages = {1337-1346},
    year = {2006},
    doi = {10.1021/cm052191g},
}

@article{csd1,
    author = {Allen, Frank H.},
    title = "{The Cambridge Structural Database: a quarter of a million crystal structures and rising}",
    journal = {Acta Crystallographica Section B},
    year = {2002},
    volume = {58},
    pages = {380--388},
    doi = {10.1107/S0108768102003890},
}

@article{csd2,
    author = {Groom, Colin R. and Allen, Frank H.},
    title = {The Cambridge Structural Database in Retrospect and Prospect},
    journal = {Angewandte Chemie International Edition},
    volume = {53},
    number = {3},
    pages = {662-671},
    doi = {10.1002/anie.201306438},
    year = {2014},
}

When I run the .bib file it says:

WARN - The entry 'charmm' has characters which cannot be encoded in 'ascii'. Recoding problematic characters into macros.

But I think I solved this problem by writing the non english characters in curly brackets.

Another problem is, when I compile the report it prints something weird for the \geom reference. Here is the references page. Check reference 3.

references

I don't know how to fix this problem. I checked the other questions here but none of them was helpful. Any help is appreciated.

  • Hi and welcome to TEX stackexchange! To help other users understand what your problem is, it's useful to provide a "minimum working example" (often referred to as MWE), that anyone can copy and compile to see what you're talking about :) – Superuser27 Mar 14 '19 at 10:32
  • @Superuser27 I hope this much of the code is enough – beliz Mar 14 '19 at 10:37
1

When I run the MWE on a modern LaTeX system (newer than April 2018), LaTeX complains

! Package inputenc Error: Unicode character   (U+2009)
(inputenc)                not set up for use with LaTeX.

And indeed a copy-and-paste of your .bib file into https://w3c.github.io/xml-entities/unicode-names.html and search for U+2009 in the output shows that the title of the entry geom

title = {Local Structure of Framework Cu(II) in HKUST-1 Metallorganic Framework: Spectroscopic Characterization upon Activation and Interaction with Adsorbates},

has a thin space (U+2009) after the colon instead of a normal space.

One could tell LaTeX what to do with U+2009 by adding

\DeclareUnicodeCharacter{2009}{\thinspace}

to the preamble. But I think in this case a thin space is not appropriate.

I suggest you just replace the thin space with a normal space.


The message

WARN - The entry 'charmm' has characters which cannot be encoded in 'ascii'. 
       Recoding problematic characters into macros.

suggests that you might be using an older LaTeX system (older than April 2018), where ASCII is still the standard encoding and not UTF-8. In that case Biber tries to convert non-ASCII characters to their LaTeX counterparts, but apparently fails to do a sensible thing for U+2009.

In this case the only way to get things going quickly again is by replacing the thin space with a normal one.


As for the other non-ASCII char warnings you get, they are not exactly remedied by adding more braces.

I suggest you encode both your .tex document and your .bib file in UTF-8 and tell LaTeX about it by loading \usepackage[utf8]{inputenc} (that last bit is not necessary any more in newer LaTeX releases, because UTF-8 is the default).

In general it is not better for Biber to input Wiórkiewicz-Kuczera as Wi{\'o}rkiewicz-Kuczera (charmm) as long as you tell Biber which encoding you are going to use. I strongly prefer Unicode characters here if possible because that avoids an unnecessary pair of braces (which could destroy kerning). The same holds for J{\"u}rg/Jürg (cp2k) and S{\'e}guin/Séguin (hkust_cat).

You may also want to have a look at the title of hkust

title = {A Chemically Functionalizable Nanoporous Material [Cu$_3$(TMA)$_2$(H$_2$O)$_3$]$_n$},

seems like a mild abuse of math mode. There are dedicated packages like mhchem and chemmacros that allow you to typeset chemical formulae without having to go back and forth between text and math mode.

  • I am using \usepackage[utf8]{inputen} but it wasn't helping with the problem. However I fixed the thin space and it works perfectly! Thank you. – beliz Mar 14 '19 at 11:32
  • @beliz Did you get exactly the same errors and output with inputenc? I was expecting slightly different (if still wrong) behaviour. But maybe things were even more different in the older version of LaTeX and the involved packages you seem to be using. – moewe Mar 14 '19 at 11:36
  • I was using inputenc, yes. But I hadn't fixed the thin space, and I was still getting the same undefined control sequence error. After fixing the thin space, I don't get the 'ascii' error or the undefined control sequence error. – beliz Mar 14 '19 at 11:47

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.