SwiftMath
SwiftMath copied to clipboard
Cannot render command "iint" and "iiint"
I cloned SwiftMathDemo and try to render LaTex, code as below (this first of demoLabels is mine).
struct ContentView: View {
/// Set to *true* to preview the fonts
let previewFonts = false
let demoLabels = [
"\\iint_{S} \\mathbf{F} \\cdot d\\mathbf{S} = \\iiint_{V} \\nabla \\cdot \\mathbf{F} \\, dV",
"x_i\\in[-1{,}5;1,5]",
"\\text{Accented characters: áéíóúýàèìòùâêîôûäëïöüÿãñõ}",
"\\text{Special: çøåæœß'ÇØÅÆŒ}",
"\\text{Uppercase: ÁÉÍÓÚÝÀÈÌÒÙÂÊÎÔÛÄËÏÖÜÃÑÕ}",
"\\text{Accents: \\hat{o}, \\check{o}, \\tilde{o}, \\acute{i}, \\grave{o}, \\ddot{o}, \\dot{o}, \\breve{o}, `, \", \\upquote}, \\aa",
"\\text{Quadratic roots: }x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}",
Mine didn't get rendered:
I trie to render it in my project and the following error raised:
... Error Domain=ParseError Code=2 "Invalid command \iint" UserInfo={NSLocalizedDescription=Invalid command \iint}
I can render this on http://www.texrendr.com , I don't know it is a bug or I need do extra to make it work.
"iiint" : MTMathAtomFactory.operatorWithName( "\u{222D}", limits: false),
"iiint" : MTMathAtomFactory.operatorWithName( "\u{222D}", limits: false),
You mean adding the line to the var supportedLatexSymbols of MTMathAtomFactory.swift, right?