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:
- TUG/CTAN (Official):
- tug.org: Acquiring TeX Live as an ISO image
- TeX Live ISO image file
- Open source mirror site of Tsinghua University (China)๏ผ
- install-tl-windows.exe / install-tl-unx.tar.gz file size is about tens of megabytes, installation needs network to download
- TeX Live ISO image file file size is about 5-6 gigabytes, full packages locally.
Recommend guide๏ผ
macOS Installation Guide¶
- note๏ผchoose one of below methods is enough, then install other needed packages with
tlmgr
manually.
# 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
๏ผ
# 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¶
- Arch Linux reference
# 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¶
# 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 ๅฎ่ฃ ็ไป็ป
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¶
-
new text editors๏ผ
-
:simple-microsoft: Visual Studio Code
- Recommand extensions James-Yu/LaTeX-Workshop
- Open source version VSCodium/vscodium
-
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:
- Windows: SumatraPDF
- macOS: Skim
- Linux: Okularใ zathura