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

Elixir Phoenix: Creating An App With Tests (Updated for Phoenix 1.3)

“WePiggy’s Billionaires” Activity on WePiggy-Heco Is About to End

The Decision Control Structure ( if statement and if else statement)

Development Environment for Building an iOS and Android app

Uploading GPX routes onto the Garmin 820 using an iPhone

📢 We aim to become the next leading gamefi metaverse.

The Reasons why you Must Use Visual Studio Code

From Software Engineer to Scrum Master. My Path

My Path from Software Engineer to Scrum Master

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

Making AI simple again

Installing TensorFlow GPU (2.7) on Windows 10

Snapshot of Target Platform Selection on CUDA Toolkit downloads page

My Ephiphany for the new year

AMD’s rally is cooling amid a potential “fatigue” in the PC market, an analyst suggests downgrading