Mastering LaTeX on Linux without Overleaf

LaTeX Vs Word like software

Requirements

sudo apt-get install -y latexila texlive-latex-extra texlive-science texlive-lang-italian xreader kile

Compiling LaTeX

  • pflatex: compile to see all sections but the page of this is unknown so also the index is uncorrect
  • bibtex: update the bibliography that now know the what is cited and when to order correctly the bibliography and remove non cited works
  • pdflatex: add bibliography and other information bibtex
  • pdflatex: fix the page changes after bibliography added

Shovel python automation

# you must have python on your computer
pip install shovel
from shovel import task
import os
import subprocess
@task
def install():
"""
This install all latex requirements. Esamples: shovel install
"""
os.system('sudo apt-get install -y latexila texlive-latex-extra texlive-science texlive-lang-italian xreader')
@task
def build(name='template'):
"""
This compile latex code into pdf. Esamples: shovel build
"""
commands = [
['pdflatex', name + '.tex'],
['bibtex',name + '.aux'],
['pdflatex', name + '.tex'],
['pdflatex', name + '.tex']
]
for c in commands:
subprocess.call(c)
@task
def open(name='template.pdf'):
"""
This open pdf. Esamples: shovel open
"""
subprocess.call(['xreader', name])
def remove_all_file_with_extention(ext):
for parent, dirnames, filenames in os.walk('./'):
for fn in filenames:
if fn.lower().endswith(ext):
os.remove(os.path.join(parent, fn))
@task
def clean():
"""
This clean all file create by latex. Esamples: shovel clean
"""
extensions = ['.aux', '.bbl', '.blg', '.idx', '.lof', '.log', '.lot', 'out']
for ext in extensions:
remove_all_file_with_extention(ext)
shovel install # install all lib seen at step requirements
shovel build # build pdf
shovel open # open pdf
shovel clean # remove all generated file excluded the .pdf

Latexila or Gnome LaTeX

kile

Share work and work together

Latex Alternatives

Conclusions

--

--

--

Linux user and Open Source fun. Deep learning PhD Student, Full stack web developer, Mobile developer, Musitian.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Electric Shock

Adobe Flash Player For Chrome Mac Download

windows nt sunucusu üstündeki güvenlik veritabanı bu iş istasyonu güven ilişkisi için bir…

Software Engineering Lessons | Do Code That Matters

Setting up Metamask for Binance Smart Chain (BSC)

Create a new Laravel 8.0 project

Top Resume Parsing Tools 2021

Recurrence Relation Cheat Sheet

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nicola Landro

Nicola Landro

Linux user and Open Source fun. Deep learning PhD Student, Full stack web developer, Mobile developer, Musitian.

More from Medium

Get to know MQTT

OpenCV: imread() Method “IMREAD_UNCHANGED” Flag Is Explained

Judge Photo Aesthetics with Deep Learning

Surveillance System for Internet Denied Areas