I am using the textext extension to Inkscape to insert LaTeX into my figure. I am trying to insert a mathematical equation in which I need a cases environment, but when I put a:

f(x) =
        x & x>0, \\
        0 & \textrm{otherwise},

I get a bunch of errors from textext, like ! Misplaced alignment tab character &.. How can I fix this? The example screenshot on the textext website has a cases environment, so it has to work somehow.

  • You've probably hit upon this: Problem compiling cases environment Edit the preamble file to include \usepackage{amsmath}, – Torbjørn T. Feb 18 '15 at 15:00
  • @TorbjørnT. I saw that textext has a Preamble file option, but I don't know how to use it. Exactly what does this preamble file contain? – becko Feb 18 '15 at 15:15
  • By default, maybe nothing, I don't really know. You would put stuff that normally goes in the preamble of a LaTeX document (such as \usepackage{amsmath}) in it. – Torbjørn T. Feb 18 '15 at 15:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.