Giter Site home page Giter Site logo

autotex's Introduction

autotex Manual

autotex is a linux program that runs TeX and LaTeX continuously. For simple example, when

autotex testfile.tex

runs in bash (or zsh), pdfTeX runs once. This program is written in Rust.

Installation

It can be installed using cargo.

Using Cargo

git clone https://github.com/e0328eric/autotex.git
cd autotex
cargo install --path .

Usage

Run TeX Engines

Use --engine or -e option to specify TeX engines. For example, if you want to use plain TeX, type either

autotex -e tex testfile.tex
autotex --engine tex testfile.tex
autotex -e plaintex testfile.tex
autotex --engine plaintex testfile.tex

in the folder that contains a file to be compiled, then TeX runs and make testfile.dvi.

Option --engine can get pdftex, xetex, luatex, tex, plaintex, pdflatex, xelatex, lualatex and latex.

Another ways to use these options is use specific engine options. Below table shows flags for each engines.

TeX Related Engine Flag
pdftex -p
xetex -x
luatex -l
tex -t
pdflatex -pL
xelatex -xL
lualatex -lL
latex -L

For example, below arguments are identical:

autotex --engine xelatex testfile.tex
autotex -e xelatex testfile.tex
autotex -xL testfile.tex
autotex -Lx testfile.tex

If there is no options like

autotex testfile.tex

then pdfTeX runs in default.

Continuous Compiling

The option -c

Many people might want to run TeX engine continuously. This means that TeX engine runs if the compiled file is modified. There is an option what you want. If you run autotex like

autotex -c testfile.tex

then TeX engine runs (in this example, there is no engine options, so pdfTeX runs) and autotexwaits until thetestfile.tex` file is modified. If this file is modified, then TeX engine runs one more time.

If you want to do this with LuaLaTeX, then run like either

autotex -e lualatex -c testfile.tex

as we expected. Note that there is no order for options. So

autotex -c -e lualatex testfile.tex
autotex -ce lualatex testfile.tex
autotex -ec lualatex testfile.tex
autotex -lLc testfile.tex
autotex -clL testfile.tex

runs exactly same as in the previous example.

View Pdf

If the option -v is enabeled, then open a pdf viewer so that we can view the pdf that compiled from TeX file. Hence, the command, for instance,

autotex -vcpL testfile.tex

means that compile with pdflatex continuously and view the pdf file of it.

v0.2.0 upgrade part

autotex config

autotex can be configurable with yaml file. It must be placed in ~/.config/autotex and must have name with config.yaml. The example config is in below:

engine:
  main: pdflatex
pdf: zathura

In general, the command autotex FILENAME runs pdftex in default. However, if the config file is like in above, it runs pdflatex in default. pdf part gives the default pdf viewer. The default pdf viewer is xdg-open.

autotex's People

Contributors

e0328eric avatar

Stargazers

Peter Roh avatar  avatar

Watchers

 avatar

Forkers

berkcelc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.