Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have just upgraded to 12.04. I have always used LaTeX opensans package (www.ctan.org/pkg/opensans) and never had problems with it in Ubuntu. Now I installed it the same way as I always did but I cannot get it to work at all! I use it with LyX (www.lyx.org). Anyone using LaTeX opensans in Ubuntu 12.04? If so, how did you install it?

Thanks in advance.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

There are two ways of installing it:

  1. in TEXMFLOCAL, which is usually /usr/local/share/texmf (you can check this with
    kpsewhich -var-value=TEXMFLOCAL)
  2. or in TEXMFHOME (which is usually ~/texmf)

The instruction provided in http://ww.tug.org/texlive/devsrc/Master/texmf-dist/doc/fonts/opensans/opensans.pdf ONLY works if you choose to install the files in TEXMFLOCAL. So if you move your files to TEXMFLOCAL, you should be able to follow those instructions.

However if that doesn't work for you (eg because you don't have administrator rights), you can install the files in TEXMFHOME.

To do this create the directory 'texmf' in your home directory. You can now download the zip from http://www.ctan.org/tex-archive/fonts/opensans, and unzip it in '~/texmf/', the directory you just created. You should now have a directory ~/texmf/tex/latex/opensans, which contains the .sty files you need.

Now you need to tell Latex that you have installed new files, you can do this by opening a terminal and typing

texhash ~/texmf/

Now you need to tell updmap that there are new fonts installed, so we need to create a file $HOME/texmf/web2c/updmap.cfg which contains the line Map opensans.map. Do this by executing the following commands:

mkdir ~/texmf/web2c
echo 'Map opensans.map' >> ~/texmf/web2c/updmap.cfg
updmap

At the bottom of the output you should now verify that it processed opensans.map, now we need to tell latex again that we have changed some files:

texhash ~/texmf

and that should do the trick!

EDIT: changed the answer based on feedback from OP

share|improve this answer
    
Thanks burger.ga for answering. I used to install the package following its documentation: 1. Copying doc/, fonts/, source/, and tex/ directories to my global texmf/ directory; 2. Running mktexlsr; and 3. Running updmap --enable Map=opensans.map. Now, while compiling LyX files I get the error message: !pdfTeX error: pdflatex (file OpenSans-Regular-03): Font OpenSans-Regular-03 at 432 not found. I followed your instructions with the local texmf folder but still no luck. –  daruko Jul 3 '12 at 1:25
    
P.S.: opensans does not seem to be available from package manager. Maybe it will be there with Quantal ([link]launchpad.net/ubuntu/quantal/amd64/texlive-fonts-extra). –  daruko Jul 3 '12 at 1:39
    
Thanks again burger.ga. I was actually installing in TEXMFLOCAL with admin rights. What I did now was to remove all opensans files from there and follow your updated instructions. The only difference was that I had to add "sudo" before updmap since I was getting no permissions for writing to ~/.texmf-var/web2c/updmap.log. Unfortunately, the error remains. It says now: "!pdfTeX error: pdflatex (file ec-lmtt9): Font ec-lmtt9 at 600 not found". Note that now the error is with another font (?). –  daruko Jul 3 '12 at 11:48
    
I think it worked becaus I think the lmtt9 font is in the Latin modern package (ctan.org/tex-archive/fonts/lm) Are you by any chance using that package as well? Maybe you can try a minimum example with \usepackage{default}[opensans]? –  Gerhard Burger Jul 3 '12 at 13:03
    
You know, it is working if I use only opensans for the whole document. However, if I use, e.g., Latin Modern Roman for the serif fonts, the error appears! Some kind of conflict is there. The thing is that before upgrading to 12.04 everything worked properly since I often used these fonts in combination. –  daruko Jul 3 '12 at 15:51

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.