Is there any Ubuntu software to draw math?

I found excellent project called Xournal++ to fulfil my needs: https://github.com/xournalpp/xournalpp

Xournal++ is a handwriting notetaking software with PDF annotation support. Written in C++ with GTK3, supporting Linux (e.g. Ubuntu, Debian, Arch, SUSE), macOS and Windows 10. Supports pen input from devices such as Wacom Tablets.

Features:

  • Support for pen pressure, e.g. Wacom Tablet
  • Support for annotating PDFs
  • Fill shape functionality
  • PDF Export (with and without paper style)
  • PNG Export (with and without transparent background)
  • Allow to map different tools / colors etc. to stylus buttons / mouse buttons
  • Sidebar with Page Previews with advanced page sorting, PDF Bookmarks and Layers (can be individually hidden, editing layer can be selected)
  • enhanced support for image insertion
  • Eraser with multiple configurations
  • Significantly reduced memory usage and code to detect memory leaks compared to Xournal
  • LaTeX support (requires a working LaTeX install)
  • bug reporting, autosave, and auto backup tools
  • Customizeable toolbar, with multiple configurations, e.g. to optimize toolbar for portrait / landscape
  • Page Template definitions
  • Shape drawing (line, arrow, circle, rect, splines)
  • Shape resizing and rotation
  • Rotation snapping every 45 degrees
  • Rect snapping to grid
  • Audio recording and playback alongside with handwritten notes
  • Multi Language Support, Like English, German (Deutsch), Italian (Italiano)...
  • Plugins using LUA Scripting

They have an unstable bleeding edge PPA:

sudo add-apt-repository ppa:andreasbutti/xournalpp-master
sudo apt update
sudo apt install xournalpp

There is also a PPA for stable releases. In addition to amd64, it also hosts packages for ARM, PowerPC and other architectures on supported versions of Ubuntu:

sudo add-apt-repository ppa:apandada1/xournalpp-stable
sudo apt update
sudo apt install xournalpp