Fork me on GitHub
#announcements
<
2022-12-02
>
philippamarkovics16:12:14

🌱 https://github.clerk.garden, a simple publishing space for https://clerk.vision notebooks, is officialy available today! Find out about how it works and how to build and publish your Clerk notebooks at https://github.clerk.garden 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 https://cortexjs.io/mathlive/ 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 https://mentat-collective.github.io/mathlive.cljs/ written with #clerk. • Clojars: https://clojars.org/org.mentat/mathlive.cljs • Github: https://github.com/mentat-collective/mathlive.cljs • cljdoc: https://cljdoc.org/d/org.mentat/mathlive.cljs/0.1.0 • Interactive docs: https://mentat-collective.github.io/mathlive.cljs/ https://user-images.githubusercontent.com/69635/205183928-e0fb6227-c45c-4db7-982d-c8e8a3cb3ee8.gif

🆒 8
1
🎉 1
💯 1
jsa-aerial21:12:46

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

jsa-aerial22:12:33

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

kennytilton12:12:57

Brilliant! Have you looked at automatically recognizing simple exponents, so 3-x-2 gets parsed as 3x^2? http://tiltonsalgebra.com/#mathpaper

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! https://gitter.im/cortex-js/community

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

kennytilton16:12:51

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

kennytilton20:12:08

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 https://cortexjs.io/mathlive/guides/shortcuts/

kennytilton13:12:27

Ah, yes:

'eta': {
    after:
      'nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text',
    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.

kennytilton12:12:27

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

practicalli-johnny21:12:27

Practicalli online books moving to mkdocs and material theme, starting with https://practical.li/neovim/ Content can now be edited directly via the website (via GitHub edit links )

🎉 8
1
borkdude22:12:56

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

borkdude22:12:45

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

practicalli-johnny02:12:56

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.