Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
on-line_resources:faq:latex [2015/10/16 11:09]
giunta
on-line_resources:faq:latex [2019/04/05 13:53]
giunta
Line 1: Line 1:
 ====== SISSA Computing FAQ: about LATEX ====== ====== SISSA Computing FAQ: about LATEX ======
  
-It sometimes happens that you need a new version of some macro package or font; the correct approach is to create a private installation of (La)TeX which includes the new stuff you need.+It sometimes happens that you need a new version of some macro package or font; the correct approach is to create a private installation of (La)TeX which includes the new stuff you need.  
 + 
 +There are two options: the [[on-line_resources:​faq:​latex#​tex_live_package_manager_tlmgr|TeX Live package manager]] or the [[on-line_resources:​faq:​latex#​manual_mode|manual mode]] 
 + 
 +===== TeX Live package manager (tlmgr) ===== 
 +<note important>​To use the TeX Live package manager, you have to load the ''​texlive''​ module first </​note>​ 
 + 
 +Before using ''​tlmgr''​ in user mode for the first time, you have to set up the user tree with the //​init-usertree//​ action: 
 + 
 +  tlmgr init-usertree 
 +   
 +This command creates a directory named ''​texmf''​ in your home directory. 
 + 
 +Then, you have to use the //install// action: it checks if the package and all dependencies are already installed in the system installation. ​ If this is not the case, it installs the package and all dependencies into the user tree (~/texmf).  
 + 
 +  tlmgr --user-mode install pkg 
 + 
 +==== Example ==== 
 + 
 +Load ''​texlive''​ module: 
 + 
 +  $ module load texlive 
 + 
 +Compile a tex file: 
 + 
 +<​code>​ 
 +$ latex example.tex 
 +... 
 + 
 +! LaTeX Error: File `memorygraphs.sty'​ not found. 
 + 
 +Type X to quit or <​RETURN>​ to proceed 
 +</​code>​ 
 + 
 +Search which package contains //​memorygraphs.sty//​ file: 
 + 
 +<​code>​ 
 +$ tlmgr search --global --all memorygraphs.sty 
 +... 
 +memorygraphs:​ 
 + texmf-dist/​tex/​latex/​memorygraphs/​memorygraphs.sty 
 +</​code>​ 
 + 
 +If it is the first time you use ''​tlmgr'',​ set up the user tree with the command ''​tlmgr init-usertree''​ 
 + 
 +  $ tlmgr init-usertree 
 + 
 +You need to install the package ''​memorygraphs'',​ using the command ''​tlmgr --user-mode install memorygraphs''​ 
 + 
 +<​code>​ 
 +$ tlmgr --user-mode install memorygraphs 
 +... 
 +tlmgr: package repository http://​ctan.mirror.garr.it/​mirrors/​CTAN/​systems/​texlive/​tlnet (verified) 
 +[1/1, ??:??/??:??​] install: memorygraphs [189k] 
 +running mktexlsr ... 
 +done running mktexlsr. 
 +tlmgr: package log updated: /​u/​j/​janedoe/​texmf/​web2c/​tlmgr.log 
 +</​code>​ 
 + 
 +===== Manual mode =====
  
 Create in your home directory a subdirectory named ''​texmf'',​ using the following command: ​ Create in your home directory a subdirectory named ''​texmf'',​ using the following command: ​
Line 31: Line 90:
 You can use this approach for updates to packages installed in the SISSA workstations,​ as well as for installing new versions of things. ​ You can use this approach for updates to packages installed in the SISSA workstations,​ as well as for installing new versions of things. ​
  
-== Reference ==+==== Reference ​====
 [[http://​www.tex.ac.uk/​cgi-bin/​texfaq2html?​label=privinst]] [[http://​www.tex.ac.uk/​cgi-bin/​texfaq2html?​label=privinst]]