paolobrasolin / krater

Template to effortlessly build math-rich websites
39 stars 0 forks source link

Can we include (or export) plugins for numbering, labels and references? #9

Open jaycech3n opened 2 years ago

jaycech3n commented 2 years ago

I'm throwing together a collection of plugins to provide LaTeX-style functionality for theorem (lemma/definition/remark...) and equation labels and referencing, as well as for section numbering (the former integrates with, but also works without, the latter). Would there be potential interest in merging this functionality when it's complete?

jonsterling commented 2 years ago

This could very be useful, but we should think about the relationship with jekyll-sheafy, which achieves all this functionality --- admittedly in a way that may turn off LaTeX users who are not trying to build their own Kerodon 😄 . My thinking is that the functionality you propose could be very useful for people who want to basically use krater to write blog posts and short lecture notes --- as opposed to the more encyclopedic ambitions of those who use jekyll-sheafy.

What do you think @paolobrasolin?

jaycech3n commented 2 years ago

Yes I did consider this, as you say the two are geared at slightly different approaches :) I'm myself definitely doing things more in the "blog post"/"online standalone paper draft" style approach at the moment.

The functionality I propose can be completely toggled off (I have a working prototype; the numbering module is slightly janky), so that should hopefully minimize any potential conflicts with jekyll-sheafy. But I can also maintain a separate repo for these, depending on what Paolo thinks :)

paolobrasolin commented 2 years ago

krater is mostly boilerplate and a decent CI config. There is definitely value in adding some "real" functionality, especially if we see that as a starting point which works out of the box but is ultimately for users to customize, and not a "feature" that krater provides! In fact, users generate their repos from the template and unlike forks the notion of upstream is very tenuous.

jekyll-sheafy is another kind of very structured beast: its aim is feature-parity with Gerby, albeit with smaller books.

That being said, there definitely is some overlap in functionality and possibly in code: you could probably use the Jekyll::Sheafy::References module along with @jonsterling's tags for citations verbatim. 🤔

So, @jaycech3n, I think that right now you should try to take heavy inspiration from (read: shamelessly copy) the code that we already have and see if that already works for you. I see three possible outcomes:

Let me know if you know any help to navigate the code of https://github.com/paolobrasolin/jekyll-sheafy or https://github.com/jonsterling/math!

jaycech3n commented 2 years ago

Thanks for the pointers!

As Jon suggested, my current use case is more "quickly iterate writeups" than "encyclopedic database"---standalone articles that are meant to be presented more traditionally as a single continuous document, so splitting individual theorems, definitions etc. into separate files is somewhat overkillish. In particular it seems like clicking on a reference built by sheafy takes you to a separate dedicated page for just that node, but I'd prefer to stay on the same page and keep the surrounding context, like e.g. for actual print paper.

I spent some time over the weekend writing up the kind of functionality I'm thinking of, and it's now live at https://github.com/jaycech3n/math, in case you're interested :)

krater is mostly boilerplate and a decent CI config. There is definitely value in adding some "real" functionality, especially if we see that as a starting point which works out of the box but is ultimately for users to customize, and not a "feature" that krater provides! In fact, users generate their repos from the template and unlike forks the notion of upstream is very tenuous.

I like the fact that it is! I was just curious if there would be interest in maybe adding functionality, or maintaining a list of community plugins so people don't necessarily have to set things up from scratch each time :)

paolobrasolin commented 2 years ago

I spent some time over the weekend writing up the kind of functionality I'm thinking of, and it's now live at https://github.com/jaycech3n/math, in case you're interested :)

Cool @jaycech3n! I'll have a look at that!

I like the fact that it is! I was just curious if there would be interest in maybe adding functionality, or maintaining a list of community plugins so people don't necessarily have to set things up from scratch each time :)

Providing links to common plugins in the readme is also a good idea! #10