A CLI for updating and auto-compiling *.tex
file in Latex Environment. Work
for both GNU LINUX and macOS.
We will need the following requirements:
-
pdflatex
comes with installingLatex
engine. -
rubber
similar to thepdflatex
see the note below on how to install it for macOS. -
fswatch
this command line will allow watching file changes in the given directory.
rubber
is no longer existed, and there is a way around to install it.
For your given python3
which is the default for the system: do the following.
git clone https://gitlab.com/latex-rubber/rubber.git ~/.rubber
cd ~/.rubber
python3 setup.py install # this will create the build direcotry with the binary (executable) inside namely: rubber
python3 setup.py clean --all # this will remove the build directory
You will see that rubber
get to install to your default python which is in my
case anaconda
(~/opt/anaconda3/bin
). Check the installation by
cd ~/opt/anaconda3/bin
ls | grep rubber
Check here:
brew install fswatch
You will need only these packages:
sudo apt-get install rubber
sudo apt-get install inotify-tools
A simple curl for my raw-script
which can be used to check the script, or map it to your machine
# To watch
curl -L https://raw.githubusercontent.com/Ghasak/myLatex/main/mylatex | bat
# To install
mkdir ~/.mylatex # or whatever
cd ~/.mylatex
touch mylatex
curl -L https://raw.githubusercontent.com/Ghasak/myLatex/main/mylatex >> ~/.mylatex/mylatex
chmod -x ~/.mylatex/mylatex
# In your .profile, or .zshrc or .bashrc whatever is your running shell, put
source PATH="$PATH:$HOME/.mylatex/"
keep the shell running to monitor your .text
script-file.
mylatex text_file.tex