Skip to content

LaTeX Writing Environment

TeX Distributions

  • ๐Ÿ”— TeXLive: Support Windows, Linux; Rolling update, the new version is released around March (e.g. TeX Live 2024).
    • ๐Ÿ”— MacTeX: Support macOS, macOS distribution of TeXLive.
  • ๐Ÿ”— MikTeX: mainly support Windows.

Installation

Image file (ISO format) download:

Recommend guide๏ผš

macOS Installation Guide

  • note๏ผšchoose one of below methods is enough, then install other needed packages with tlmgr manually.
Bash
# macOS environment configuration

# method 1: without GUI environment [RECOMMEND]
# tex-live-utility includes tlmgr (TeX Live package manager)
brew install mactex-no-gui
brew install tex-live-utility

# method 2: full installation with GUI
brew install mactex
# compare to `mactex-no-gui`, the GUI apps includes:
# - TeXShop: latex editor, but not powerfull.
# - Tex Live Utility: latex manager, includes tlmgr (TeX Live package manager)
# - BibDesk: citation and bibliography manager, .bib file is supported to import
# - Latexit: support formula editing and preview
# - Excalibur: latex spelling checker (new version has removed)

# method 3: minimal installation
brew install basictex
  • mirrors and update optional๏ผš
Bash
# change mirror site
sudo tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
# more mirror site in china: <https://help.mirrorz.org/CTAN/>
# full mirror site supported from CTAN: <https://ctan.org/mirrors>

# update packages
sudo tlmgr update --self --all

Linux or Windows WSL Installation Guide

Bash
# method 1: download ISO file [offline installations]
md5sum texlive2024.iso # validate Hash value, or use sha512sum
# mount file
sudo mkdir /mnt/texlive
sudo mount ./texlive2024.iso /mnt/texlive
# execute install-tl file to install (command line mode)
sudo /mnt/texlive/install-tl 
# Enter C , custom installation [optional] (Enter the corresponding letter to select or cancel, e.g.: deghijknostuvwxyzABCEHIKLMNS to remove), Enter R to return.
# Enter I , default installation, default path is /usr/local/texlive/<version-year>

# clean up after installation
sudo umount /mnt/texlive
sudo rm -r /mnt/texlive
# Add environment variables to file ~/.bashrc
# Add TeX Live to the PATH, MANPATH, INFOPATH
export PATH=/usr/local/texlive/2024/bin/x86_64-linux:$PATH
export MANPATH=/usr/local/texlive/2024/texmf-dist/doc/man:$MANPATH
export INFOPATH=/usr/local/texlive/2024/texmf-dist/doc/info:$INFOPATH
# validate tex command
tex -v

# method 2: use latest script to install [online installation]
# here is bfsu mirror (China)
# curl -O https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet/install-tl-unx.tar.gz
# here is CTAN mirror (USA)
curl -O https://tug.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz

tar -zxvf ./install-tl-unx.tar.gz
cd ./install-tl-xxx
sudo perl ./install-tl
# more parameters
./install-tl -gui # GUI installation
./install-tl -select-repository # select mirror site index, default option maybe slow
./install-tl -repository <https://path> # use certain mirror site

# method 3: use arch-packaged Tex Live
# Arch Linux
texlive-basic
texlive-latex
texlive-latexrecommended
texlive-latexextra
# (more latexlive-xx packages, group by upstream categories)
aur/texlive-full

Windows Installation Guide

Bash
# method1: download install-tl-windows.exe [online installation]
install Tex Live with GUI.

# method2: download ISO file, install in command line mode with install-tl-windows.bat [offline installation]
# mount ISO file to virtual optical drives (e.g. Z disk)
Z:\install-tl-windows.bat --no-gui

note:

  • installation path cannot be to deep,
  • non-C disk is ok,
  • only use latin letters in path (no other languages or special characters like space, slash)

default path: C:\texlive\<version-year>


Tex Editors

From: ไธ€ไปฝ็ฎ€็Ÿญ็š„ๅ…ณไบŽ LATEX ๅฎ‰่ฃ…็š„ไป‹็ป

latex-editors

special purpose editors

  • ๐Ÿ”— WinEdt: paid, only support Window.
  • ๐Ÿ”— Texifier: originally TexPad, paid, only support macOS now, Windows version is not ready.
  • ๐Ÿ”— TeXmaker: open source and free, multi-platform.
  • ๐Ÿ”— TeXStudio: open source and free, multi-platform.
  • ๐Ÿ”— TeXworks: within TexLive, not powerful.
  • ๐Ÿ”— TeXShop: within MacTeX, not powerful.

general purpose editors

Online LaTeX Platform

  • Overleaf: ShareLaTeX has been merged into Overleafใ€‚
  • ๐Ÿ”— TeXPage: new online platform of LaTeX in China (similar to Overleaf)

Additional Tools

Lightweight PDF reader:


References