# Blog

## Blogging about Maths & Physics, Python, Linux, Japanese...

# Python script to recursively clean LaTeX output files

Quick python script to remove LaTeX output files. This can be done recursively. There is always a prompt before files get removed.

Continue reading# An elegant way to repeatedly call the same function on a grid of parameter values

Oftentimes, we call functions over a wide range of parameter values, e.g. to generate plots for different scenarios. For multiple parameters, this leads to ugly multi-loops and cumbersome boilerplate. With this snippet it becomes one line.

Continue reading# Find unused graphics in LaTeX project; rename/move them (while updating paths in code)

Simple script to find graphics which are not used in a LaTeX project and simple script to rename files which are and also taking care of renaming all references to them in the latex project. While that’s the use case, it’s totally not LaTeX specific (simply searches through all `*.tex`

files for the path).

# Fancy Mathematica Plot of Functions in One Complex Variable

Visualizing functions that depend on a complex variable is oftentimes done with either contour plots or with multiple one dimensional plots where either the real or imaginary part is set to a selection of fixed values. This Mathematica function will combine both plots to provide the nice overview of the contour plot, while making it easy to compare it with the 1D lines.

Continue reading# Mathematica LaTeX Export - Bug Workarounds

Mathematica has some basic LaTeX export possibilities built in. However, the LaTeX support is far from optimal and at times quite buggy.
I just came accross two issues: Missing support for `Subsuperscript`

and nonsensical `\left`

and `\right`

statements which
are inserted in connection with `Abs`

. I wrote a short python3 script as a workaround (together with Mathematica integration).