Skip to content

Command-Line Interface

Installation

To install for the first time, or update your installation of Texlish, run the following command (assuming you have NodeJS installed):

Terminal window
npm install -g texlish@latest

Compilation

You can compile a .texlish file as follows:

Terminal window
# Compile to filename.tex and run pdflatex to make filename.pdf
texlish --pdf filename.texlish
# Compile to filename.tex and run xelatex to make filename.pdf
texlish --xe filename.texlish
# Compile to filename.tex and run lualatex to make filename.pdf
texlish --lua filename.texlish
# Compile to filename.tex and run latex to make filename.dvi
texlish --latex filename.texlish
# Just compile to filename.tex
texlish filename.texlish
# Override one compiler option for this run
texlish --config scriptGrouping=alpha filename.texlish
# Enable LaTeX-compat mode
texlish --config latexCompat filename.texlish

Configuration

Texlish looks for a project config file in .config/, then in the current directory, named one of:

  • texlishconfig.yaml, texlishconfig.yml, texlishconfig.json, texlishconfig.js, texlishconfig.mjs, or texlishconfig.cjs
  • texlish.config.yaml, texlish.config.yml, texlish.config.json, texlish.config.js, texlish.config.mjs, or texlish.config.cjs

YAML config example:

scriptGrouping: alphanumeric
latexCompat: false
styles:
"*": "\\textit"

You can also override config options in individual .texlish files using ::config directives.

VSCode Integration

Our VSCode plugin provides the following features in .texlish files:

  • Syntax highlighting
  • Automatic indentation after \command:, : environment, ::special