From Trebor to ~jonsterling/forester-discuss
I updated to the 5.0 development branch just now, and I found that
the following link in my tree broke:
> [Zorn’s lemma](https://en.wikipedia.org/wiki/Zorn\%27s_lemma)
Removing the escaped \% fixes it. The error message is
^ Expected text but got: (Eval.V.Content
(Types.Content
[(Types.Text
"https://en.wikipedia.org/wiki/Zorn");
(Types.TeX_cs %);
(Types.Text "27s_lemma")]))
From Trebor to ~jonsterling/forester-discuss
> Is it documented somewhere? If not, can it be added? This is documented at [1], and you can use arbitrary HTML tags according to [2]. [1] https://www.jonmsterling.com/jms-00D0.xml [2] https://www.jonmsterling.com/jms-00RH.xml
From Trebor to ~jonsterling/forester-discuss
Sure, but perhaps bikeshedding a little more on the actual syntax.
From Trebor to ~jonsterling/forester-discuss
> The scope of such a function is a bit unclear... How bad would it be if we *at least* just rendered the KaTeX code as text (but without attempting to transform the code into plain text mathematics)? This would be OK if we're taking the *forester* code, not KaTeX code, because otherwise the title will be overwhelmed with complicated macros. (If the macros were not complicated, I wouldn't define a shorthand for it in the first place.) But would this be a bit hacky since it doesn't respect beta-equality anymore? > Ultimately I would like to have a version of the command palette that can have KaTeX nodes inside it! This would be very helpful, but it is probably not realistic to expect that everything using the title will support this. Wikipedia for example resorted to not use any special symbols due to "technical limitations". A forester directive like \alttext{...forester code...}{plain text} is perhaps the most universal solution.
From Trebor to ~jonsterling/forester-discuss
I tried it out and nothing broke. Although I did wrap my macros in #{...}, because the docs say it is idempotent, and this is also the canonical way to do it in Typst (where we define functions, not macros, so we must be in math mode to actually scope check the math symbols). So after this change I need to not do that because this is not idempotent anymore: x {+} y is not the same as x + y. So I'm fully in favor of this change, as long as the docs are updated accordingly.
From Trebor to ~jonsterling/forester-discuss
I'll try out the commit, but incidentally I'm stopped by OCaml, roughly because of a tangle of problems that I finally diagnosed to be https://discuss.ocaml.org/t/unable-to-install-some-packages-with-opam-on-macos/14434/6 which may be a datapoint regarding the discussion on build ecosystems.
From Trebor to ~jonsterling/forester-discuss
When writing trees related to delta functors, forester drops the formula in titles shown in `query all`, and the Ctrl-K pop up. I didn't remember exactly but I think this is not the previous behavior. What would be a nice way to make it show at least something? A tree titled "-functor" is really unhelpful here. Perhaps we can set up a small ad-hoc procedure to approximate the formula, covering KaTeX built-ins such as greek letters and \hom, \lim? This has surely been done before. More generally, is there a way to tell forester how to render plain text from contents?
From Trebor to ~jonsterling/forester-discuss
> I would like to keep it simple *and* language/locale-independent. For that reason, I would probably not like to include a pluralisation filter.
I think Wikipedia simply looks at characters directly following the link, not
specifically looking for plural endings. Of course, this is still language
dependent since some languages don't want spaces after links. Maybe a
more explicit syntax for adding pre/postfixes into the link is desirable?
For example, [[link|s]] might be a solution (I don't know if | is allowed in
links or not, but we can always bike-shed later).
From Trebor to ~jonsterling/forester-discuss
I suppose a few features documented in (for example) https://en.wikipedia.org/wiki/Help:Link can be useful. For instance, [[link]]s will tuck the -s in the link, very useful if you just want to add a simple plural. A way to control the initial case could also be useful, but perhaps it is too complicated.
From Trebor to ~jonsterling/forester-discuss
Wow, thanks for the quick response!