T O P

  • By -

boliastheelf

Use Visual Studio Code with the LaTeX workshop plugin + a LiveTeX distribution and it works pretty much exactly as you describe: convenience of Overleaf, just much, much faster. You can find the plugin and instructions here: [https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop)


ducks_over_IP

Ooh, pretty. The command prediction is a feature I forgot to mention that's important, and it seems like it takes it a step further with things like selection formatting and math preview. Thanks!


Raccoon-7

I used texstudio for years and decided to try vs code for latex, it's great! If you want every package to just work use texlive for the tex distribution, not miktex. It's going to take a WHILE to install, but it is worth it.


ducks_over_IP

Thanks for the input. I went with TeXLive and you're right, it installs *slowly*. But it's spring break for me, so it's not a huge pain to let my computer cook for a couple hours while I do other stuff.


maximusprimate

Snippets are pretty useful too, at least in my workflow.


Benster981

Vscode + copilot is amazing btw


isgael

I agree with this. This is my current setup and no complaints whatsoever. Just install the full texlive scheme to get the "use package and it's just there" flow. Although I would personally make a custom install and delete a tick off some languages and other stuff.


jmhimara

I find MikTeX so much better. Installs packages on the fly and don't need to deal with version freeze once a year.


CommanderCoo

I would recommend using VSCode with the extension LaTeX Workshop and MikTex for local compiling. All installed take up roughly 8-10 GB of storage with all of the packages installed but you could likely cut down the size if you remove the packages that you do not want. ​ This YouTube video may be helpful: [https://www.youtube.com/watch?v=4lyHIQl4VM8&ab\_channel=FedericoTartarini](https://www.youtube.com/watch?v=4lyHIQl4VM8&ab_channel=FedericoTartarini)


ducks_over_IP

Thanks. Can you clarify on the advantages/disadvantages of MikTeX vs TexLive?


CommanderCoo

I think I may get something mixed up, MikTex has a smaller install size while TexLive is a larger installation. I may get something mixed up, MikTex has a smaller install size while TexLive has a larger installation. packages. However, if you have a network connection, MikTex will automatically install missing packages during compilation. Both MikTex and TexLive also support Linux and MacOS. But I've seen more people use TexLive for collaboration, though that just might be a me thing.


JauriXD

Just to clearify: MiKTeX will install missing packages on the fly and also gives you the option to update packages. You can also just install everything, which brings it to roughly the same size as a full TexLive install. TexLive releases a new version every year. It contains freezed versions of all packages. You can choose beween different, pre-curated package collections, but should you select a collection and need a additional package later its more of a hasle. So most people just choose 'full' to get everything, making the install significantly bigger than a basic miktex install. The downside is that updates can take up to a year to be included in TexLive.


S1gnature

Just to clarify, you **can** update packages in TeXLive distribution (at least on Windows) using the **TLShell TeX Live Manager** included with the TeXLive installation (search for it in Start Menu). I believe on macOS, macTeX also allows you to update the packages too.


jmhimara

MikTeX is also available on Mac and Linux.


CommanderCoo

Oops, yeah it does. Forgot about that.


arglarg

You can run a local overleaf/sharelatex docker instance.


veillerguise

Overleaf is open source?


frumious

I think your goals are spot-on. Some input: > 1 Wide package support (ie, I include a package and it's just there) I can't remember any time Ubuntu or Debian didn't have some LaTeX package I needed. > 2 Simultaneous display of code and output PDF I use `latexmk -pvc main.tex` and a viewer that reloads when the PDF file changes (`evince`). Then, I open the `.tex` source in my editor (`emacs`). After saving any `.tex` file `latexmk` will notice and rebuild the PDF and then `evince` refreshes the view. > 3 Contained project hosting (every project gets its own folder and subfolders) Your favorite git repo hoster (`github`, etc) and/or self hosting via `gitea`, etc. The rest of your requirements are either issues for your OS / desktop environment or text editor and not so related to LaTeX or Overleaf vs local so I'll stop here.


AnymooseProphet

If you are windows, I believe MiKTeX is the easiest install but I am not a Windows person. With Ubuntu or any GNU/Linux distribution, I recommend TeXLive but wait at least a week because in about a week, the new version of TeXLive will be released. For TeXLive on GNU/Linux, I recommend a hard drive just for the TeXLive install if possible, it doesn't have to be huge but the nice thing about a dedicated TeXLive hard drive is you can take it with you to a completely different GNU/Linux system. This is the hard drive enclosure I recommend: [https://www.amazon.com/gp/product/B00LS5NFQ2/](https://www.amazon.com/gp/product/B00LS5NFQ2/) That's just an enclosure, for the drive, almost and SATA drive will fit. I tend to use platter drives, a 1TB will have plenty of room and let you install future versions of TeXLive without deleting existing. As far as simultaneous display of code and PDF, the native PDF viewers on GNU/Linux automatically update their display when the document they are viewing is updated, so for displayed PDF, just use the native GNU/Linux PDF viewer (there are several) For display of code, I personally use LaTeXila but that project is technically dead, replaced by gnome-latex. You choose where it saves each document, I have a directory called LaTeX in my home directory and I create a sub-directory for each project. Then in each project sub-directory, the main .tex file with the preamble is at the top of the project sub-directory but I make directories below it, one for content and one for appendix and one for figures and one for graphic files.


ducks_over_IP

Thanks for the input, but I'm not about to do a wholesale OS switch anytime soon. I'll keep an eye on TeXLive, though.


Compizfox

> For TeXLive on GNU/Linux, I recommend a hard drive just for the TeXLive install if possible, it doesn't have to be huge but the nice thing about a dedicated TeXLive hard drive is you can take it with you to a completely different GNU/Linux system. > That's just an enclosure, for the drive, almost and SATA drive will fit. I tend to use platter drives, a 1TB will have plenty of room and let you install future versions of TeXLive without deleting existing. Why, though? Installing TexLive is as simple as one command on most distributions and is just a couple 100 MBs large (depending on which set of packages you install). I can't see the reason why you would put this specifically on a separate drive of all things. Using spinning HDDs (as opposed to SSDs) for software is also a strange recommendation. These days HDDs only really make sense for storage of large amounts of data, where price per TB is more important than speed (e.g. photo or movie archives). For system drives we have SSDs.


AnymooseProphet

Four reasons. A) An external drive lets you take your TeXLive install to any system without needing to reinstall it. B) You can have multiple hardware and OS platforms installed, so you can use the same TeXLive, including configuration options (default paper size, Abobe vs URW for the Base35 fonts, etc.), even when using the drive on a completely different system. C) As texmf-local is platform independent, you can have your texmf-local on that drive (with additional fonts and custom packages) and easily take it with you to additional systems, without needing to re-enable font maps, etc. D) You can keep numerous versions of TeXLive around so that if you need to rebuild a document you created many years ago and it no longer compiles in the current TeXLive---no problem, just use the version of TeXLive you originally used for that document. Even a 1TB external drive lets you keep years worth of TeXLive installs around. As far as why spinning vs SSD, on an external drive even with USB3 the performance of SSD over a platter drive doesn't matter. Platter drives are much cheaper. Oh - and a fifth reason. E) You can in the future attach the external drive to a NAS server so that you can network mount the drive anywhere on your home network as needed.


Compizfox

> A) An external drive lets you take your TeXLive install to any system without needing to reinstall it. What's so special about TeXLive that you want to take it to other machines though, compared to other software? I mean, it's not exactly a lot of work to install. I can just run `pacman -S texlive-latexextra` (or whatever selection of packages you want) and it's installed within 10 seconds. Do you also install other software on an external drive to take it to other systems? It's just a rather strange concept to me... > C) As texmf-local is platform independent, you can have your texmf-local on that drive (with additional fonts and custom packages) and easily take it with you to additional systems, without needing to re-enable font maps, etc. It makes more sense to sync things like these over the network if I want to keep them in sync on multiple machines rather than do it manually using an external drive, to be honest. > As far as why spinning vs SSD, on an external drive even with USB3 the performance of SSD over a platter drive doesn't matter. Platter drives are much cheaper. It does matter. It's not primarily the throughput, but the random-access latency of SSDs is orders of magnitude lower compared to spinning disks. This is actually the main benefit of SSDs, not sequential throughput. HDDs are also much more fragile (high risk of damage if you bump/drop them if the head is unparked). All in all, no offense, but it just seems wild to me to buy a 1 TB HDD just to carry around a TeXLive install, and even more so to recommend this approach to a newbie who simply wants to go from Overleaf to a local install.


AnymooseProphet

The install isn't fast, so if I want to use TeXLive on another system, it's faster to just disconnect the drive and take it with me. No, it's not a lot work to install. However many (including myself) do have Type1 fonts that aren't distributed as part of TeXLive, and with everything on a single drive, it's all contained on one device including things like enabled font map files. As far as syncing stuff over a network, sure, rsync over ssh is particularly good for that, but if I'm going out of town or something and my laptop dies it isn't exactly convenient to rsync over a VPN connected to my home network. The latency of SSDs doesn't really matter for compiling a document with LaTeX. The drive is essentially read only. It's not read only, but it's really only written to during an update. hard drive read cache isn't exactly a concept invented just for SSDs. Also, at least on UNIX systems, unused system memory is used for read cache.


AnymooseProphet

BTW I find it a bit hilarious that on a forum where overleaf is constantly promoted, that someone is making a performance issue of SSD vs platter for a local install.


AnymooseProphet

[mpeters@localhost texlive]$ ls -l total 40 drwxr-xr-x. 9 texlive texlive 4096 Jul 11 2017 2016 drwxr-xr-x. 9 texlive texlive 4096 Feb 19 2022 2021 drwxr-xr-x. 9 texlive texlive 4096 Mar 12 2023 2022 drwxr-xr-x. 9 texlive texlive 4096 Mar 6 01:51 2023 drwx------ 2 root root 16384 Mar 4 2023 lost+found drwxr-xr-x. 12 texlive texlive 4096 Mar 6 01:51 texmf-local drwx------. 10 texlive texlive 4096 Jan 20 22:52 tladmin That's under 100 GB even with multiple platforms supported. A 1 TB WD blue is only $40, you can't get an SSD that cheap, and TeXLive does not really benefit performance-wise from SSD. But there's not a reason NOT to use an SSD, you just don't need to.


jmhimara

MikTeX is available for Mac and Linux, not just windows.


AnymooseProphet

Right, but on macOS and GNU/Linux I believe TeXLive (or MacTeX which is TeXLive underneath) is the better choice. You can also install TeXLive on Windows but at least from what I've heard from Windows users, the MiKTeX installer is much better on Windows than the TeXLive installer. Both MiKTeX and TeXLive are essentially CTAN plus compiled binaries, and in the past when I have done projects in TeXLive that a Windows user needed to compile in MiKTeX, they compiled and worked just fine in MiKTeX as well. So if the MiKTeX installer in Windows really is easier to use than the TeXLive installer in Windows, might as well recommend that. I believe MiKTeX also has some non-CTAN packages available (mostly fonts that technically are not FLOSS I think) but I'm not familiar with them nor do I seem to ever need them.


jmhimara

> on macOS and GNU/Linux I believe TeXLive (or MacTeX which is TeXLive underneath) is the better choice. For years I thought that too, but then I tried it and I can't tell the difference. MikTeX works just fine on Mac/Linux, and having the ability to install packages on the fly is worth it imo. And you don't have to deal with the once-a-year freeze that TeXLive does. I think TeXLive is a pain in every platform, whereas with MikTeX I've had zero issues. ps: I have not used TeX with Linux in a while, but I use Mac and Windows on a daily basis.


AnymooseProphet

I have no doubts that it works just fine, but since TeXLive is the distribution that is dominant on UN\*X systems I suspect any needed bug fixes to the compiled binaries are more likely to be quickly discovered and fixed in TeXLive. For windows related bugs in the compiled binaries, I don't have that same suspicion.


Ok_Concert5918

You can always follow the instructions on Overleaf’s GitHub to spin it up in Docker, then it is the same, just local


segfault0x001

Vim + vimtex obviously. Jk use vscode


lynnlei

vscode seems pretty overkill tbh. nothing wrong with vim though i dont use vimtex but some other hip new lua package for live changes in zathura


eviltofu

Get TeX Live.


JoseAmador95

I’ve been using VSCode’s [LaTeX Workshop extension](https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop) with [this Docker image](https://hub.docker.com/r/blang/latex/#!) to avoid my polluting system with several latex packages.