39

I would like to encourage my students to use LaTeX for their homework. I can make a template for them to learn basic math symbols. The most difficult thing is recommending a way to install LaTeX. I need a general-audience method that includes Mac and non-Mac.

It is 2019. There are modern issues like "does this produce PDF/A compliant documents" that remain a mystery to me (in fact my own version of LaTeX does not conform to the new and stringent PDF/A compliant standard). There may also be other modern issues I do not even know about. I would like to know the (short) list of "best" options, for reasonable interpretations of the word "best". My students are in engineering, computer science, and math.

This question has been asked in 2011, but I wonder if the answers are still relevant. Feel free to recommend old solutions if you feel they are still relevant.


Important metrics include:

  1. free/easy to install/use;
  2. usefulness for students to use as a tool in the future (such as publishing papers).

A comment on "overleaf" below suggests this may be good in all metrics, feel free to give more details.

AndréC
  • 24,137
Michael
  • 493
  • 4
    For the simplest use by students who only need to produce simple documents, there might be much to be said nowadays for something like overleaf? Is that an option? – Paul Stanley Jan 15 '19 at 17:01
  • @PaulStanley : All options are possible and welcomed. I don't know what overleaf is so feel free to give more detail. Of course, for students who eventually want to publish papers, I assume that latex will be more helpful for them. [edit: I google "overleaf" and find it is a form/variant/version of latex, is this correct?] – Michael Jan 15 '19 at 17:28
  • 1
    @Michael no, overleaf is a fully on-line LaTeX system; you can use LaTeX without installing anything (provided you are online, that is). – Rmano Jan 15 '19 at 17:37
  • 2
    You seem to mix up some rather important concepts – LaTeX as a format, TeX distributions and dedicated editors. Please note that "modern issues" like PDF/A have nothing to do with LaTeX itself. No way of installing "a version of" LaTeX will change that. There are packages like pdfx but how to use them is way out of scope for a question about installing TeX. – TeXnician Jan 15 '19 at 17:46
  • 8
    As others have said, Overleaf is simply a cloud based full TeX distribution and editor. That's what I recommend to my students initially. Then they don't have to worry about installing anything. It just works. If they do want to install their own distribution, there are two main distributions MikTeX (mainly for Windows although a Mac version has become available but I wouldn't recommend it) and TeX Live (Windows, Mac (in the form of MacTeX) and Linux). All are good and easy to install. But Overleaf is fine for beginning. – Alan Munn Jan 15 '19 at 17:52
  • @AlanMunn : Thanks, your rec that you have used this for students helped me to decide to register for overleaf (see my experience with that below). – Michael Jan 15 '19 at 18:58
  • As leader of your group (teacher) you need to decide how much support you will be providing. Your time is valuable and there are support sites such as this, HOWEVER you will need to guide and provide first port of call (i.e. not dismiss your leadership role) To that end I (Personally) would keep it simple 1) encourage initial use of Overleaf as the popular online method 2) Join local Tex Users Group http://tug.org/join.html and encourage students to standardise on the Full Single user Tex Live version student rate is $55 (includes the CD) may be $85 for your fee ? –  Jan 15 '19 at 18:58
  • 2
    It seems that LaTeX can generate PDF/A documents. It does take some extra work, as explained in the link. – Roland Smith Jan 15 '19 at 23:02
  • @AlanMunn Why wouldn't you recommend MikTeX for Mac? From what I've used it works about as well as TeX Live, and the differences are all as expected (i.e. installing packages on demand etc). – ShreevatsaR Jan 16 '19 at 06:31
  • @ShreevatsaR I'm probably being a bit unfair, but the Mac user base is so well served by MacTeX that Mac MikTeX users might find themselves with a lot less support when they run into problems. And since MikTeX is so Windows oriented, its user base may not be as helpful to Mac users. – Alan Munn Jan 16 '19 at 13:40
  • @AlanMunn Thanks that makes sense; though probably most of the support a user needs is not distribution-specific but rather about TeX/LaTeX/packages in general. So I guess the situation is closer to "no strong reasons to recommend" than to "strong reasons not to recommend". – ShreevatsaR Jan 16 '19 at 21:58
  • @ShreevatsaR Of course, I was thinking only in terms of distribution related issues. For example is the local texmf in ~/Library/texmf as it is in TeX Live? Can I have multiple years installed and switch between them, etc.? How do I set up my editor etc. Most Mac editors assume the TL paths, for example. But I agree with your "no strong reasons to recommend" version. (These are not question I need answers to, but samples.) – Alan Munn Jan 17 '19 at 02:32

4 Answers4

31

In the end "best" is judgmental. There are two options:

  • Install a fully functional local TeX system. For that the obvious candidates would be MiKTeX, MacTeX, or TeXlive, and in terms of ease of installation for most students either MiKTeX (Windows) or MacTeX (OSX). (Linux users would probably want TeXlive, and may need to be warned about the tendency for distribution packages to be considerably out of date.)
  • Use a cloud-based system, of which the most commonly used is now Overleaf

Although there are pros and cons to all these choices, there is a lot to be said for beginners in using a cloud-based approach in terms of your criteria. It offers a straightforward LaTeX compiler and editor, with nothing to install, and it works pretty intuitively. It's free for personal use. It's "real LaTeX" and mostly any document that compiles there will compile on other systems in the same way. There are good reasons for experienced users to prefer to maintain a local system and their are occasional disadvantages to being in the cloud: but as a way to get going quickly without installing anything, it may have much to say for it.

To my mind the main practical downsides are (1) occasionally the cloud-based systems lag behind bleeding edge TeX development (but that is unlikely to be a problem for most users) and (2) Overleaf seems to encourage the use of non-standard "templates", some of which are of dubious quality or utility, and which may not be portable. But (1) is unlikely to bite new users, mostly, and (2) can be avoided by encouraging people to use Standard templates.

There are obviously more principled reasons why people might refuse to use cloud-based systems and circumstances (e.g. confidentiality concerns) in which they would not be appropriate. But if your students are not handling sensitive personal data, or commercial or government secrets, and do not have rooted objections to the use of anything in the cloud, those do not seem to be deal killers. Some might have other personal views (for instance preferring to use a particular editor).

In the long run, if someone is going to use LaTeX a lot, there are very sound reasons to move away from such systems to something more controllable. At that point the sort of information provided at the LaTeX project page and by TUG is useful.

Arguably as important (and here again the cloud based systems tend to help) is encouraging users to use modern practices (such as UTF encoding) and packages from the start.

Paul Stanley
  • 18,151
  • Thanks! I will use Overleaf. You can see my answer below which documents my experience with that (over the past 20 minutes). – Michael Jan 15 '19 at 18:54
  • PS: Minor edit suggestions for your answer: Can you make minor clarifications in your first bullet to say which is for mac, which for linux, which for pc? – Michael Jan 15 '19 at 18:55
  • Very nice answer. Overleaf also is quite useful as a collaborative tool for experienced LaTeX users too, so although I agree that most of us find a dedicated local distribution the most useful, there's still room for Overleaf for some tasks. – Alan Munn Jan 16 '19 at 01:50
  • Though I'm not familiar with Overleaf, it would seem that having its own editor might be a major disadvantage. One of the (many) reasons that I use LaTeX in the first place is so that I can write with my own preferred editor, rather than having to learn a different command set. – jamesqf Jan 16 '19 at 05:32
  • LaTeX itself assumes UTF-8 out-of-the-box nowadays, so hopefully that area at least is sorted – Joseph Wright Jan 16 '19 at 12:15
  • 1
    Note that another possible disadvantage of a cloud-based system is that you cannot directly access the filesystem and external tools. This can be a problem with package versions, using and/or synchronizing local files, programming interface packages like pythontex and knitr, tools like latexcount, latexdiff, bibtool, make tools like latexmk or arara, using shell-escape, but also inspecting and intermediate files like bbl files or glossaries, security issues for content files and/or restricted usage conditions for data files, etc. – Marijn Jan 16 '19 at 12:28
  • 1
    Many of these things are possible in one way or another on Overleaf, but it can be a lot easier to use a local installation if you want to do things that Overleaf does not offer by default. – Marijn Jan 16 '19 at 12:30
22

Modern LaTeX installations boil down to various attempts to make the software usable without making it larger than an operating system. TeX Live is wonderful, but it's over 3 GB to download, taking too much space on a computer with a 128 GB solid-state drive, as many of my students are stuck with. It installs the manual for every known package, even though most people probably use the online copies, especially with the advent of TeXdoc Online.

This is what I've recommended for individual installations:

  • Mac: MacTeX is TeX Live for macOS; it's available as an installer or through the Homebrew package manager. There are three variants: the full MacTeX (brew cask install mactex), a slightly smaller version without the extra applications (brew cask install mactex-no-gui), and BasicTeX, a minimal installation (brew cask install basictex).

    Homebrew mostly downloads MacTeX and runs the installer for you, but it's valuable because it ensures the most recent dependencies are installed (e.g. using the most recent Ghostscript without duplicating it), and it makes uninstalling MacTeX much easier, which is especially useful when it comes time to update it every year. (You otherwise have to remove the old version of MacTeX by hand when you install a new release.)

    The full MacTeX is easiest to use, since you won't need to install extra packages, but space considerations often make it impractical. I usually install BasicTeX: you'll likely need a bit more than the package provides: I would glance over the collection packages in the TeX Live Manager (which comes with the full MacTeX or can be installed with brew cask install tex-live-utility) to see what you'll likely need. Running tlmgr install collection-fontsrecommended collection-latexextra collection-luatex to start, along with any languages relevant to your work, will take care of most missing package warnings.

    Whichever way you install it, it's often a good idea to set up MacTeX so that admin rights aren't necessary.

  • Linux: Most Linux distributions have their own version of TeX Live, though they are often a year behind. There's usually both a slimmed-down version equivalent to BasicTeX and a full installation.

  • Windows: MikTeX is still reliable, and can install packages on demand.

  • R (RStudio): for users of LaTeX via R, the TinyTeX distribution will install packages on the fly.

  • iOS: Texpad lets you write LaTeX on an iPad and has its own package manager.

  • Android: See How to install TeX on Android phones?

Whichever way you install LaTeX and its packages, it's a good idea to keep things updated (for TeX Live, run tlmgr update --self --all --reinstall-forcibly-removed periodically). TeX Live tends to get far more reliable over the course of the year as packages are updated, and LaTeX itself has received some great mid-year updates of late (see the official LaTeX News).

The flip side of 'modern' is that it LaTeX doesn't have to be on one's own computer. Overleaf or Authorea can be great solutions in certain situations.

Andrew Dunning
  • 1,714
  • 13
  • 21
  • 5
    From what I understand, Homebrew simply uses the regular MacTeX installer, so for Mac users who are not used to using the command line (the majority in my experience) simply using the regular MacTeX installer from the Finder is a simpler option. Also unless you're really pressed for hard drive space, installing a full distribution will save you time/annoyance in the future. – Alan Munn Jan 15 '19 at 18:53
  • You might want to include that working LaTeX distributions are included in all popular (and less popular) Linux distros. For instance, on Debian and derivatives one can install the latex and xelatex packages to get two of them. – Andrea Lazzarotto Jan 15 '19 at 22:18
  • 1
    @AlanMunn I have a lot of impoverished students using MacBooks with tiny solid-state drives, thanks to Apple's stinginess. I find that Homebrew is a great safe way to start introducing students to the terminal, which they'll often need to learn sooner or later, and opens up the entire world of Unix-based software (such as pandoc mentioned elsewhere). – Andrew Dunning Jan 16 '19 at 04:19
  • That's true, Apple is certainly stingy on the base storage configurations, so Basic TeX can definitely come in handy for those students. I'm still not convinced about Homebrew as a first recommendation, but it might depend a lot on the other needs of your students. – Alan Munn Jan 16 '19 at 04:25
  • @AlanMunn I adjusted it to make it clearer that it's not the only option. I find that there is quite a lot in MacTeX that needs extra software to function. Need to use arara? Just run brew cask install java, which fixes configuration issues in the Java installer. Even something as simple as LaTeXindent doesn't come working out-of-the-box, and the manual recommends using cpanm for the extra dependencies. Homebrew makes that easy, but getting this sorted otherwise is an absolute bear. – Andrew Dunning Jan 16 '19 at 12:18
  • 3GB - so LaTeX finally outgrew Emacs in terms of size? – Thorbjørn Ravn Andersen Jan 16 '19 at 12:58
  • @ThorbjørnRavnAndersen That's the download size. The installation is something like 5 GB these days. – Andrew Dunning Jan 16 '19 at 13:07
  • I find this reply particularly interesting because of the arguably short-sighted elaborations in regards to all systems other than Mac. And "Most Linux distributions have their own version of TeX Live, though they are often a year behind.". That is one fatal statement, for the lack of a better term. It casts a less than favorable light on the Linux world and its adaption of TeX Live and actually lacks some facts & figures to substantiate the claim. And all of this stems from... your students having hard drives with only 128 GB capacity. – henry Jan 20 '19 at 09:16
  • 1
    @henry Feel free to edit as you see fit; there are certainly exceptions. I have quite a lot of experience in troubleshooting LaTeX with colleagues/students, and for years it has consistently been the Linux users that run into the strangest problems – typically because they are running distributions that are a few years behind or tried to update it with a newer TeX Live that didn't work with their system. – Andrew Dunning Jan 21 '19 at 14:37
  • +1 for the bit on how to keep the cask/brew installed TeX up-to-date. For me a sudo was required though: sudo tlmgr update --self --all --reinstall-forcibly-remove. – Matthias Arras Aug 29 '20 at 20:39
0

Short version:

Try vscode + docker + latex, as explained here. You can create a image for docker containers (like this one) with a preconfigured installation and release them to your students. That will save everyone's time.

Long story:

I installed MacTeX in macOS almost eight years ago. The installation package comes with lots of outdated bloatware (e.g., a text editor, etc.). The package installer does not respect macOS application packaging standards, so the file structure is messed up. Keeping the installation updated is complex. It may happen to you that it becomes unusable just because a file becomes 'too old' (that happened the last week in my local environment). I discourage you from using the packages directly unless you want to "waste" your time configuring the environment.

JPCF
  • 180
-1

I don't know the subject of your class but I think using markdown and pandoc could be the easiest way to get LaTeX style PDFs with a lot less work. Just need to install pandoc and pandoc-citeproc. Pandoc will be used to generate the PDF file, and can also be used to generate a tex file later if it needs more functionality, like a larger bibliography or visuals. For short assignments with few references it should work well.

P.S.: I don't know what is the configuration required in Windows-based PCs, but on Unix-based systems it is quick and simple.

More information:

http://blog.martinfenner.org/2013/06/19/citations-in-scholarly-markdown/

  • Good alternative answer but you are implying that this doesn’t need to install LaTeX and that’s incorrect: Pandoc generates PDFs via LaTeX. – Konrad Rudolph Jan 16 '19 at 00:52
  • Oh, that is correct. Didn't know that actually, I have LaTeX installed but use it rarely because markdown is so much simpler. – Gavin Belsen Jan 16 '19 at 01:05
  • I don't think this is really a good option for students, frankly. Markdown has its uses, but it is severely limited (by design) and although you can embed LaTeX into your Markdown documents, the pandoc layer hides the LaTeX in ways that make debugging extremely hard if you don't know what you're doing. To the extent that it's useful to expose students to LaTeX, it's the extra power that might convince them of its usefulness. Markdown's raison d'être is exactly the opposite. Given the choice between Word and Markdown, I can tell you what most students would choose. – Alan Munn Jan 16 '19 at 01:41
  • I totally agree with you. In the day-to-day use, markdown is better for most work that envolves strictly text. When that work envolves equations, pictures and graphs I generally use Rmarkdown. Just when I have to really do something special (large number of citations and pages) I'll fire up LaTeX. – Gavin Belsen Jan 16 '19 at 16:05