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:

enter image description here

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?

+3


source to share


3 answers


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.

+3


source


Most likely something happened when you exported the code. To fix an existing file, you can follow the accepted answer to this question.

https://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex

But try exporting again and see if the error was accidental.

Update:



Add to

\DeclareUnicodeCharacter{00A0}{ }

      

to your preamble.

+1


source


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.

+1


source







All Articles