Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
on-line_resources:faq:latex [2019/04/04 16:18] giunta [SISSA Computing FAQ: about LATEX] |
on-line_resources:faq:latex [2021/05/14 14:50] (current) giunta [TeX Live package manager (tlmgr)] |
||
---|---|---|---|
Line 8: | Line 8: | ||
<note important>To use the TeX Live package manager, you have to load the ''texlive'' module first </note> | <note important>To use the TeX Live package manager, you have to load the ''texlive'' module first </note> | ||
- | Before using ''tlmgr'' in user mode, you have to set up the user tree with the //init-usertree// action: | + | 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 | tlmgr init-usertree | ||
Line 16: | Line 16: | ||
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). | 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 | ||
+ | |||
+ | ==== Use an updated version of TeX Live ==== | ||
+ | |||
+ | To use an updated version of ''Tex Live'', create missing //backup// folder in your user tree : | ||
+ | |||
+ | mkdir -p ~texmf/tlpkg/backups | ||
+ | | ||
+ | Update the repository: | ||
+ | |||
+ | tlmgr --usermode option repository ctan | ||
+ | | ||
+ | and finally update all your Tex packages: | ||
+ | |||
+ | tlmgr --usermode update --all | ||
==== Example ==== | ==== Example ==== | ||
- | If you need to install the package ''memorygraphs'', you have to use the command ''tlmgr --user-mode install memorygraphs'' | + | 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> | <code> |