Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm writing a little BibTeX exporter for the publication database of my institute. We do have a lot of authors with all kind of weird characters in their names, which get the "WTF is Unicode?"-treatment from BibTeX.

As I have to preprocess author names and titles before exporting anyway, I thought that I could replace as much unicode characters as possible with their LaTeX equivalent. There's an image with such a mapping on bibtex.org: mapping

But that image is

  1. incomplete (e.g. capital German umlauts are missing) and
  2. not of much use to me in this form.

Does someone know of such a mapping that is as complete as possible and available in a machine-readable format?

Edit: Juan's XML is probably as complete as it gets (I'll post a Python dictionary reduced to unicode and LaTeX on github). But in the meantime, I also found the mapping that Zotero uses. It can be found in their SVN-Repository.

Edit2: OK, the Python dictionary can be found here, and the XSL Style Sheet to convert Juan's XML into a Python dictionary is here.

share|improve this question
2  
Use biber+biblatex or bibtex8? – Seamus Jan 27 '11 at 11:52
2  
we don't use the exported bibtex files ourselves. It's a service for people that download papers from our website. I can't influence how they use the bibtex files we provide. – piquadrat Jan 27 '11 at 12:14
Good question! There are other circumstances where this mapping could be valuable. – Charles Stewart Jan 27 '11 at 12:19
Many citation exporters don't try to create BibTeX-compatible databases any more, and I think that's pretty ok since BibTeX is completely outdated. I think you don't have to put much effort in supporting a decade-old, broken system. – Philipp Jan 27 '11 at 14:12
1  
Philipp: What alternatives are there that are widely in use? I'm a programmer, not a researcher, so I'm not current on this topic :) – piquadrat Jan 27 '11 at 14:18
show 1 more comment

2 Answers

up vote 5 down vote accepted

From a related question on SO, there is

... an XML file from the W3C. It maps Unicode to HTML, MathML, LaTeX, Mathematica, and others. (The file is 1.4 MB, uncompressed.)

You can read more about it here: http://www.w3.org/TR/unicode-xml/

share|improve this answer
1  
Here's a web app based on the data from that XML file. Enter Unicode and loop up LaTeX and vice versa. johndcook.com/unicode_latex.html – John D. Cook Feb 18 at 15:11

You can use biber with the optional arguments for the bibdata bibtex and the exported bib encoding (UTF8).

biber --bblencoding=UTF-8 --bibencoding=latin1 --allentries --bibdata <file.bib>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.