All of my previous Tex experience has been with the MiKTex distribution. However, I recently installed Ubuntu 21.10 and it appears that MiKTex is not compatible with this version of Ubuntu yet. Moreover, I have heard that TexLive is a better distribution overall for Linux users anyhow. So, my goal is to switch to TexLive. However, I would like to keep using the TexWorks editor because I am familiar with its keyboard shortcuts.
So far, I successfully installed TexLive and TexWorks using sudo apt-get install texlive and sudo apt-get install texworks.
However, when I open one of my documents in TexWorks and try to compile it, I get an error saying that the packages it needs are not installed:
! LaTeX Error: File `enumitem.sty' not found.
In MiKTex, when a package like this is missing, it just automatically installs the package for you as long as you are connected to the internet. How can I make TexLive do the same?
I would prefer not to do sudo apt-get install texlive-full if possible, because I do not need all the other language files etc. and am working on a small HD partition.
tlmgr install ..., or install a package calledtexliveonflythat attempts to do what MiKTex does by runningtlmgr install texliveonfly. Either of the latter two solutions brings me right back to question posed in the OP, which is how to get thetlmgrto work from the command line. – Max Jan 01 '22 at 06:50apt-fileand use it viaapt-file search enumitem.styand it will tell you which Ubuntu package provides that latex package. – daleif Jan 01 '22 at 09:07texlive-full, and the second one appears to be an unrelated issue since it was solved usingsudo. Fair point about "old" vs. "out of date"; I will edit the post. – Max Jan 01 '22 at 11:33tlmgr init-usertree. This brings the main question into focus, namely how to get a TexLive installation in Ubuntu that installs packages on the fly. If I am understanding @daleif correctly the answer may simply be that this is impossible. – Max Jan 01 '22 at 11:37tlmgris fully operational and you have even more control over what is being installed. Plustexliveonflynow works (as it usestlmgr) – daleif Jan 01 '22 at 11:46texliveonflyvery seldomly as I usually have the packages that I need. I chose to keep the documentation of that packages that I use. NB: I've never used TeXLive from a Linux dist as they mostly lack behind on updates. – daleif Jan 01 '22 at 11:47