{"id":20279729,"url":"https://github.com/genieframework/stipplelatex.jl","last_synced_at":"2025-10-23T16:31:32.670Z","repository":{"id":52689674,"uuid":"340769267","full_name":"GenieFramework/StippleLatex.jl","owner":"GenieFramework","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-20T23:38:40.000Z","size":2276,"stargazers_count":2,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T13:46:25.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GenieFramework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-20T22:43:10.000Z","updated_at":"2024-12-20T23:11:21.000Z","dependencies_parsed_at":"2024-02-26T22:48:16.997Z","dependency_job_id":"a13aeac2-5802-4934-918c-80e9ead64ba6","html_url":"https://github.com/GenieFramework/StippleLatex.jl","commit_stats":{"total_commits":27,"total_committers":8,"mean_commits":3.375,"dds":0.6666666666666667,"last_synced_commit":"f2e356f8fb6a1dd4e32672f13241a8911a4db812"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleLatex.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleLatex.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleLatex.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenieFramework%2FStippleLatex.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GenieFramework","download_url":"https://codeload.github.com/GenieFramework/StippleLatex.jl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248357602,"owners_count":21090398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T13:32:44.479Z","updated_at":"2025-10-23T16:31:32.619Z","avatar_url":"https://github.com/GenieFramework.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StippleLatex\n\nStippleLatex uses Vue-Katex to imlement LaTeX-Formatting in Stipple.\nThere are three possibilities of entering LaTeX content in your web page\n- Latex-span element.\n\n    `latex(\u003cLaTeX formula\u003e, \u003cformatting options\u003e)`\n\n- HTML element with latex content via string macro with an optional modifier which can take the values `auto`or `display`\n\n    `span(latex\"\u003cLaTeX formula\u003e\")`  \n    `span(latex\"\u003cLaTeX formula\u003e\"display)`\n\n- HTML element with latex content via `@latex` macro with additional options\n\n    `span(@latex(raw\"\u003cLaTeX formula\u003e\")`  \n    `span(@latex(raw\"\u003cLaTeX formula\u003e\", display = true)`\n\nAll arguments also support Symbols to bind to model fields.\nHere's a demo app that shows possible use cases.\n\n```julia\nusing Stipple, Stipple.ReactiveTools\nusing StippleUI\nusing StippleLatex\n\n# define a small formula generator\nfunction nestlist(f, a; init = nothing)\n    T = eltype(a)\n    list = T[]\n    el = init\n    for (i, x) in enumerate(a)\n        el = i == 1 \u0026\u0026 init === nothing ? x : f(el, x)\n        push!(list, el)\n    end\n    list\nend\n\nformula = nestlist(*, [\"\", raw\"\\sin\", \"^2\", \" x\", \" +\", raw\" \\sqrt{\", \"a\", \"^2\", \" +\", \" b\", \"^2\"])\nformula[contains.(formula, \"sqrt\")] .*= \"}\"\n\n# setting up the app\n@app begin\n    @in x = 0\n    @in formula_1 = raw\"\\int_{a}^{b} f(x) \\, dx = F(x)\\Biggr|^b_a\"\n    @in formula_2 = raw\"\"\n    @private p = @task 1 + 1\n\n    @onchange isready begin\n        if !istaskstarted(p) || istaskdone(p) \n            p = @task begin\n                println(\"Task started\")\n                while x \u003c= 100\n                    sleep(1)\n                    x += 1\n                    pos = x \u003c 6 ? 1 : (x - 5) % (length(formula) + 5) + 1\n                    formula_2 = formula[min(pos, length(formula))]\n                end\n            end\n            schedule(p)\n        end\n    end\nend\n\nfunction ui()\n    [\n        row(cell(class = \"st-module\", [\n            cell(h1(latex(\"\\\\LaTeX\") * \"-Demo\"))\n            cell(h2(latex\"a^2 + b^2 = c^2\"))\n        ]))\n\n        row(cell(class = \"st-module\", [\n            textfield(\"Enter your LaTeX-Forumla\", :formula_1,)\n            cell(class = \"q-pa-md\", latex\":formula_1\"display)\n            row([\n                cell(class = \"q-pa-md bg-red-1\", raw\"\"\"cell(latex\"\\cos^2x\"display)\"\"\")\n                cell(class = \"q-pa-md bg-green-1\", latex\"\\cos^2x\"display)\n            ])\n            row([\n                cell(class = \"q-pa-md bg-red-1\", raw\"\"\"cell(latex\"This is auto mode with a formula \\(\\cos^2x\\)\"auto)\"\"\")\n                cell(class = \"q-pa-md bg-green-1\", latex\"This is auto mode with a formula \\(\\cos^2x\\)\"auto)\n            ])\n            row([\n                cell(class = \"q-pa-md bg-red-1\", raw\"\"\"latex(class = \"q-pa-md\", raw\"\\tan^2x\", display = true)\"\"\")\n                cell(class = \"bg-green-1 q-pa-md\", latex(class = \"q-pa-md\", raw\"\\tan^2x\", display = true))\n            ])\n            bignumber(\"Wait for 5\", :x, color = R\"x \u003e= 5 ? 'negative' : 'positive'\", icon = \"calculate\")\n            \n            row([\n                cell(class = \"q-pa-md bg-red-1\", raw\"\"\"cell(class = \"q-pa-md\", @latex(raw\"\\tanh^2 y\", display = R\"x \u003e= 5\"))\"\"\")\n                cell(class = \"q-pa-md bg-green-1\", @latex(raw\"\\tanh^2 y\", display = R\"x \u003e= 5\"))\n            ])\n\n\n            row([\n                cell(class = \"q-pa-md bg-red-1\", raw\"\"\"@latex(raw\"This is auto mode with an inline formula \\(\\cos^2x\\) and a display formula $$\\sin^2x$$\"\"\")\n                cell(class = \"q-pa-md bg-green-1\", @latex(raw\"This is auto mode with an inline formula \\(\\cos^2x\\) and a display formula $$\\sin^2x$$\", auto = true))\n            ])\n        ]))\n\n        row(cell(class = \"st-module\", [\n            textfield(class = \"q-pa-lg\", \"LaTeX\", :formula_2)\n            cell(class = \"q-pa-md\", \"Result:\")\n            cell(class = \"q-pa-md\", latex\":formula_2\"display)\n        ]))\n    ]\nend\n\nroute(\"/\") do\n    page(@init(), ui()) |\u003e html\nend\n    \nup()\n```\n\n![Demo App](./docs/demo.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenieframework%2Fstipplelatex.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenieframework%2Fstipplelatex.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenieframework%2Fstipplelatex.jl/lists"}