Fork me on GitHub

🌱, a simple publishing space for notebooks, is officialy available today! Find out about how it works and how to build and publish your Clerk notebooks at or head to #clerk-garden for questions and suggestions.

🎉 25
🪴 13
🏡 5
clojure-spin 3
🌱 3
👍 1
nextjournal 2
Sam Ritchie20:12:03

Announcing v0.1.0 of mathlive.cljs ! This library provides a #reagent component wrapping the equation editor. Enter math in a lovely, easy-to-use editor and extract it as LaTeX, MathJSON and many other formats. Please give the library a try via the written with #clerk. • Clojars: • Github: • cljdoc: • Interactive docs:

🆒 8
🎉 1
💯 1

As far as you know, will this work in any reagent built cljs frontend?


could be a nice addition to Saite

Sam Ritchie22:12:18

for sure. @U06C63VL4 i’m working on a layer beyond this that will parse MathJSON into a proper Clojure expression, so you can define proper functions etc with these fields


Brilliant! Have you looked at automatically recognizing simple exponents, so 3-x-2 gets parsed as 3x^2?

Sam Ritchie16:12:55

@U0PUGPSFR I like that a lot, and I like your whole site. I’m not sure mathlive can do that out of the box but I’ve asked over at their gitter site, so I’ll know soon!

Sam Ritchie16:12:26

it’s probably something we could rig up in the :on-change handler of course, detecting this and implementing that substitution


Oh, I was surfing too casually, did not notice you sit on top of a separate editor! Hope with the RFE pans out! But the code is tricky. eg, if the sequence were 3 x 4 2, we get 3x^42. But after typing the 3x4, the insertion caret stays on the baseline! I have actually toyed with showing two insertion points. 🙂 Fortunately this is just for basic Algebra, so the UX can cater to simpler expressions.

Sam Ritchie19:12:50

such a nice idea


Bike addresses some serious pain points!

Sam Ritchie03:12:11

@U0PUGPSFR looks like you can do it with onInlineShortcut, see this page and search for the first occurrence of that string


Ah, yes:

'eta': {
    value: '\\eta',
Nice little DSL. I prolly should have done sth like that, that code is a bear! But a static translation will have a problem: in my editor, if we type "x+2" then back up to change to "x-2" and first delete the "+", we get "x2", unconventional but legal, then can type our "-". A static translation of `variable+digit' would convert that to x-squared before I could type the "-"! FYI, I am thinking of porting my (Common Lisp) maths editor to ClojureDart/Flutter, so I can do sth mathy on mobile. A CLJD version would translate nicely to CLJS.


flutter_tex was straightforward to get working, anyway. Next up is a Common Lisp->Clojure port of the editor.


Practicalli online books moving to mkdocs and material theme, starting with Content can now be edited directly via the website (via GitHub edit links )

🎉 8

Looks awesome, I'm also considering mkdocs-material for #C029PTWD3HR and if that works out, also bb


@U05254DQM Is this out of date or is it also still using gitbook? is written in markdown and uses GitBook to generate the website via a GitHub action.


On the contribute page, yes that should be updated. I've done a PR from my tablet using the edit ✏️ link on that page, really quite handy, especially for quick fixes.