Can I change the way Maxima generates LaTeX code?
I would like to be able to change Maxima's way of generating LaTeX code (in general). For example, I have the following code in Maxima:
Then I exported the code to LaTeX
and I immediately got the error:
! Package inputenc Error: Unicode char \u8:− not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
You can check out the LaTeX code generated through this gist on GitHub.
I would like to not only not get any errors, but also slightly change the style of the LaTeX code generation to adapt it to certain circumstances. For example, I would like to be able to insert an interrupt line (or more) after exits ...
Can this be done? Are there any alternatives?
source to share
You can put the following line in the LaTeX output preamble:
\DeclareUnicodeCharacter{2212}{-}
which tells LaTeX what to do with Unicode hyphens (character 2212 according to this table ).
WxMaxima has to generate this ad on its own - it is a mistake that it does not.
source to share
Well, gistfile1.txt on line 54 contains −
characters instead -
. I wonder how these characters were created. What commands did you enter into wxMaxima to generate gistfile1.txt?
Anyway, I believe that if I replace those characters with a regular hyphen, it avoids the error you reported. So maybe the problem is not generating those characters in the first place.
EDIT: This answer doesn't match the meaning. See my other answer for a real solution.
source to share