Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 6544  / 1 Year ago, thu, may 4, 2023, 11:25:51

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.


More From » latex

 Answers
7

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


[#37186] Saturday, May 6, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iedncommon

Total Points: 200
Total Questions: 95
Total Answers: 132

Location: Tonga
Member since Mon, Aug 2, 2021
3 Years ago
;