I'm trying to install Mathtex on my Ubuntu 16.04 server for my engineering wiki. It has been a nightmare, just as it was in the past when I tried this.
First, I've installed mathtex via apt-get. That complains of a missing directory. After manually creating those directory it moves on to complain of another. Finally complains of a missing cache directory. I create the cache just like the others and mathtex still complains that the cache directory is missing...
Then I attempt to install via the instructions on the website (http://www.forkosh.com/mathtex.html). In other words, install the dependencies LaTeX and dvipng. Then compile the program using cc (although I use gcc). I've gotten this to work in previous installations of Ubuntu - 12.04 or 14.04 - but can't find those instructions anymore. I was paying for a service until this summer when they went out of business.
Here is the compile line:
cc mathtex.c –DLATEX=\"$(which latex)\" –DDVIPNG=\"$(which dvipng)\" –o mathtex.cgi
cc: error: –DLATEX="/usr/bin/latex": No such file or directory
cc: error: –DDVIPNG="/usr/bin/dvipng": No such file or directory
cc: error: –o: No such file or directory
Did you copy that command from a document? You have the wrong kind of dashes on your options.
– (en dash) and replace it with