I have a problem with the font bitstream-charter.

less dummy.tex

\usepackage[bitstream-charter]{mathdesign} %my font!
% \usepackage[sfdefault]{cabin}


pdfLatex fails to produce a PDF with the following error:

pdflatex dummy.tex 
This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 34 languages loaded.
Document Class: scrbook 2013/12/19 v3.12 KOMA-Script document class (book)
Package scrlfile, 2013/12/19 v3.12 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

))) (/usr/local/texlive/2014/texmf-dist/tex/latex/koma-script/tocbasic.sty)
Package typearea, 2013/12/19 v3.12 KOMA-Script package (type area)
                  Copyright (C) Frank Neukam, 1992-1994
                  Copyright (C) Markus Kohm, 1994-

)) (/usr/local/texlive/2014/texmf-dist/tex/latex/mathdesign/mathdesign.sty
(/usr/local/texlive/2014/texmf-dist/tex/latex/base/t1enc.def)) (./dummy.aux)
(/usr/local/texlive/2014/texmf-dist/tex/latex/mathdesign/mdbcmr.fd) [1{/usr/loc
al/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./dummy.aux) )
!pdfTeX error: pdflatex (file texnansi.enc): cannot open encoding file for read
 ==> Fatal error occurred, no output PDF file produced!

Any idea what the problem might be?

  • all necessary packages are installed!
  • other fonts work nicely (tested \usepackage[sfdefault]{cabin})
  • using Ubuntu 14.04
  • 1
    There is no reason to ever use the texnansi encoding (and your example code does not use it) do you get that error from the posted code? Aug 13, 2014 at 11:34
  • Welcome to TeX SE! Make sure you test that code specifically to see if you still get the error. As @DavidCarlisle says, there is nothing in your code which would try to use the encoding in the error message so it seems likely that your MWE does not really reproduce the error you are seeing.
    – cfr
    Aug 13, 2014 at 12:25
  • Thanks for your comments! However, this MWE produces such an error! I posted the entire output below:
    – Johannes
    Aug 13, 2014 at 13:22
  • Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. Aug 13, 2014 at 20:16
  • @DavidCarlisle:Try the code. texnansi.enc is used by pdflatex. Aug 13, 2014 at 20:19

3 Answers 3


Install the package ly1. I just had the same problem and this package solved it for me. I'm sure a more knowledgeable user will be able to explain why.

  • 1
    @ChristianHupfer: Actually it is an answer, as texnansi.enc is contained in the ly1 package (at least in TeXlive 2014). Aug 13, 2014 at 20:13
  • @MartinSchröder: Thanks for the information ...
    – user31729
    Aug 13, 2014 at 20:14
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Aug 13, 2014 at 20:20
  • LY1 and texnansi refer to the same encoding but no new documents should be using that encoding. Aug 13, 2014 at 20:31
  • 1
    @DavidCarlisle texnansi.enc is loaded during font embedding in the PDF file, because of the entry md-chr8y CharterBT-Roman " TeXnANSIEncoding ReEncodeFont " <texnansi.enc <bchr8a.pfb in pdftex.map, which is a bit surprising; but apparently the T1 encoded virtual font is defined in terms of an LY1 encoded font.
    – egreg
    Aug 13, 2014 at 22:14

As well as installing ly1 (in $TEXMFHOME), I had to run updmap with the --force option in order to generate ~/.texlive2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map.


texnansi.enc is missing from fonts/enc/dvips/base copy it into there, texhash, and your font generation will work

  • 1
    It would be nice if you could provide a source where to get it. Or where to find it, if it is part of a TeX distribution. Also, welcome to our site! Oct 16, 2015 at 12:12

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.