jkuczm / MathematicaCellsToTeX

Convert Mathematica cells to TeX, retaining formatting.
Other
57 stars 10 forks source link

Error when a box has options #7

Closed jkuczm closed 8 years ago

jkuczm commented 8 years ago

Bug reported by Matthew Galles.

When "formatting" boxes, like SuperscriptBox, have options, their conversion to TeX results in errors.

Minimal example is:

CellToTeX[SuperscriptBox["T", "1", MultilineFunction -> None], "Style" -> "Input"]
(* CellsToTeXException::unsupported: Box: MultilineFunction->None is not one of ...*)
(* Failure[...] *)
jkuczm commented 8 years ago

Quick workaround is to remove options from affected boxes before conversion to TeX. For example:

CellToTeX[something /. SuperscriptBox[x_, y_, ___] :> SuperscriptBox[x, y], ...]