Skip to content

Cannot render command "dfrac" #56

@jokerphuongnam

Description

@jokerphuongnam

I cloned SwiftMathDemo and try to render LaTex, code as below (this first of demoLabels is mine).

struct ContentView: View {
    let maths = [
        "5 + 0i",
        "(3 + 4i) + (2 - 4i) = 3 + 4i + 2 - 4i = 5 + 0i",
        "5(\\cos(0) + i\\sin(0))",
        "5e^{i0}",
        "\\dfrac{1}{x}",
        "(1 + 2i) \\cdot (2 - 1i) = 1 \\cdot 2 + 1 \\cdot (-1i) + 2i \\cdot 2 + 2i \\cdot (-1i) = 2 - i + 4i - 2 = 5 + 0"
    ]
    
    var body: some View {
        VStack {
            List(maths, id: \.self) { math in
                MathView(latex: math)
            }
        }
        .frame(width: 400)
        .padding()
    }
}

Mine didn't get rendered:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions