#add typst support

26 messages · Page 1 of 1 (latest)

lean depot
robust pewter
#

Like, I genuinely would just rather type $S_1 \cup S_2 \cup S_3 \cup S_4$

magic vineBOT
#

John Math

oak jetty
#

man latex is easier

lean depot
# oak jetty man latex is easier

Recursion in LaTeX

We have to think about expansion, which is not related to core program logic.

\newcommand\unions[2]{
  \ifnum#1>1 \expandafter\unions\expandafter{\number\numexpr#1-1\relax}{#2} \cup {#2}_{#1}
  \else
    {#2}_1
  \fi
}
$\unions{4}{S}$

Array mapping in typst

If you're comfortable with array mapping and anonymous functions, typst can provide a more concise typst-like syntax.

#let mystr = (n, s) => range(1, n+1).map(k => $#s _#k$).join($union$)
$#mystr(4, $S$)$
magic vineBOT
#

vin100

oak jetty
#

my I am frankly not

#

gotta learn what it provids and how it fumctions

lean depot
#

using CJK characters and emoji for @magic vine input isn't convenient
the TeXit model is inefficient, cuz the setup is more troublesome (on both sides), and the usage is more complicated and error-prone

  1. user needs to add the right package to the ,preamble
  2. a TeXit's staff member needs to approve it manually
  3. user needs a special environment to input CJK characters

with typst, we don't need additional setup on users' side. they can directly use those special characters for bot's input (without additional setup/syntax)

#

the above transferred message is sm1 (who, I think, knows LaTeX basics well, but NOT the tricky LaTeX package config)
with typst, he'd be able get things right without having to look for additional LaTeX packages

silk haven
lean depot
#

The syntax is quite easy and intuitive, and it stretches the wrappers automatically, so there's no need to type stuff like \left(, and users can use text in math mode by double quotes instead of \text{} in LaTeX
so that would be much easier, especially for new learners
apart from that, an important reason would be the fact that @magic vine isn't always up 24/7

stiff wyvern
#

Why shouldn't we?

stiff wyvern
#

@lean depot found a reason; we need to host the bot ourselves

#

We can try it but that'd possibly not work

lean depot
stiff wyvern
#

I'd argue the benefit of adding it is mostly convenience for typst users

lean depot
robust pewter
# stiff wyvern Why shouldn't we?

Bloat, it'll be like 1.3 people using it every once in a while because everyone is just used to a more convinient alternative: LaTeX

#

Bloat
I think that's a thing that matters, I remember someone scolded us for having too many pointless bots

#

Theoretically, we could add it and see how frequently it is used and then if we actually do care about bot amount remove it if it is useless

#

But I'd save time by not adding it in the first place