0

I would like to install an homemade package ? With MacTeX, I put my package in texmf-local and then simply use texhash.

Under Ubuntu, I have to use the plain path sudo /usr/local/texlive/2013/bin/x86_64-linux/texhash. This is a little boring.

Have you a way to avoid the use of the long plain path ?

projetmbc
  • 13,315
  • You're probably using sudo in front of the command, aren't you? – egreg Apr 16 '14 at 16:34
  • Yes I forget to say that. I update my question now. – projetmbc Apr 16 '14 at 16:35
  • 1
    Add a file to /etc/profile.d which includes [ -d "/usr/local/texlive/2013/bin/x86_64-linux" ] && export PATH="/usr/local/texlive/2013/bin/x86_64-linux:${PATH}"? (I don't use Ubuntu - I do this on Fedora.) – cfr Apr 16 '14 at 16:37
  • This does not work for me... – projetmbc Apr 16 '14 at 16:48
  • maybe using an alias like alias mytexhash='sudo /usr/local/texlive/2013/bin/x86_64-linux/texhash'? You have to place that into your .bashrc file or the equivalent file where ubuntu stores bash config. Then you can just type mytexhash and it will call the long path automatically – d-cmst Apr 16 '14 at 16:55
  • This does not work... – projetmbc Apr 16 '14 at 17:07
  • 2
    I put mine in /home/cmhughes/texmf/tex/latex/ – cmhughes Apr 16 '14 at 17:10
  • have you sourced the .bahsrc file after adding the new alias? – d-cmst Apr 16 '14 at 17:10
  • "have you sourced the .bahsrc file ?" How can I do that ? – projetmbc Apr 16 '14 at 17:35
  • (Will delete this comment.) Follow the advice @cmhughes and use ~/texmf/tex/latex. It is, really, the best place to put personal .sty (etc.) files. Note, however, that some files should be put in other locations. A .bib file, e.g., should go in ~/texmf/bibtex/bib while a .bst would go in ~/texmf/bibtex/bst. The structure of ~/texmf, which you need to create yourself, should mimic the structure of your system tree. – jon Apr 16 '14 at 17:39
  • 1
    This question seems like it is a duplicate of Where do I place my own .sty files, to make them available to all my .tex files?... please confirm – cmhughes Apr 16 '14 at 18:15
  • While I agree with @cmhughes about where you should put custom packages (excepting font packages but you are unlikely to make those), you still need to sort out the problem with PATH in order to use the system effectively. If the problem only occurs when you use sudo is is somewhat contained (though may still cause issues sometime) but you should definitely ensure it is correct for your user. What does echo $PATH give? – cfr Apr 16 '14 at 21:24
  • @cmhughes Thanks for your advice about the directory. – projetmbc Apr 17 '14 at 11:33
  • @cfr This gives the following path /usr/local/texlive/2013/bin/x86_64-linux:/home/cbal/anaconda/bin:/usr/local/texlive/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games where. – projetmbc Apr 17 '14 at 11:47
  • @projetmbc You should be all set then ;). – cfr Apr 17 '14 at 13:19

0 Answers0