Skip to content

Workflow for math on computers

Saturday, December 21, 2019

Here I introduce some useful tools that streamline my daily life with mathematics.

Writing Documents

At least I use LaTeX. To compile LaTex code, Tectonic might be more convenient than TexLive if a large installation is too scaring.

On Windows some subtle tasks for PDF documents require Adobe Acrobat DC, you can download the installer from the official website Adobe and use amtemu to activate it. Now I am using Linux and have to give up Adobe Acrobat DC. If you still want an application with GUI to manipulate PDFs, there is an alternative for it -- Master PDF Editor. And here I write a keygen for versions older than 5.6.80 of it, including versions for Windows, Ubuntu and macOS:

Enjoy it, so my work won't be useless.

Mathpix

Mathpix outputs Latex code from images or PDF documents. Here is my shell script using its public API. To use this script, apply from Mathpix Dashboard an ID and a KEY, and then put them in ~/.config/mathpix. Then you will be able to use it 1000 times for free each month. It is not free anymore from the September 2022 [1].

Wolfram Mathematica

Mathematica supports dynamic and intuitive interaction and produces high-quality image within concise codes. Save images as PDF then you can insert them into your LaTeX code.

Download a trial version from Wolfram, use the keygen below to generate an activation code. It works for Wolfram Mathematica 13.1 for my Ubuntu Kinetic Kudu. Input your MathID (xxxx-xxxxx-xxxxx) for offline activation and then click Generate:

If bad luck, please try more times.

Inkscape

This free vector image editor works perfectly with LaTeX. To copy a vector image from other PDF, on Windows you can select it in Adobe Acrobat DC and choose edit with Inkscape. Then you can add some annotation and finally export it as PDF+LaTeX.

OCR

Mathpix is suitable for light-weight OCR tasks. As for offline OCR tasks, Adobe Acrobat DC works on Windows. For Linux, tesseract plus xclip is enough. Here we use two alias to OCR images from clipboard.

bash
alias ocrchi="xclip -selection clipboard -t image/png -o > /tmp/clip.png && tesseract  /tmp/clip.png /tmp/ocr-sim -l chi_sim &> /dev/null && cat /tmp/ocr-sim.txt"
alias ocren="xclip -selection clipboard -t image/png -o > /tmp/clip.png && tesseract  /tmp/clip.png /tmp/ocr-en -l eng &> /dev/null && cat /tmp/ocr-en.txt"

For wayland users, I have a zsh function in my .zshrc for OCR jobs.


  1. If the fee is too expensive, please consider LaTex-OCR. ↩︎