Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change the way Maxima generates LaTeX code?

I would like to be able to change the way Maxima generates the LaTeX code (in general). For example, I have the following code in Maxima:

enter image description here

I then exported the code to LaTeX, and I immediately get an error saying:

! 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 at least not only to not get any errors, but also to change a little bit the style of the LaTeX code generation to adapt it to certain circumstances. For example, I would like to be able to insert a break line (or more) after the outputs...

Is it possible to do? Are there any alternatives?

like image 775
nbro Avatar asked Jan 31 '26 23:01

nbro


1 Answers

You can put the following line in the preamble of the LaTeX output:

\DeclareUnicodeCharacter{2212}{-}

which tells LaTeX what to do with the Unicode hyphen (character 2212 according to this table).

WxMaxima should generate this declaration itself -- it is a bug that it does not.

like image 130
Robert Dodier Avatar answered Feb 03 '26 21:02

Robert Dodier