threatofrain 5 days ago

Y’all should try espanso for your latex needs.

1
JadeNB 5 days ago

> Y’all should try espanso for your latex needs.

I definitely understand why macro-expander programs can be useful, but I'm always a bit puzzled about the idea of combining them with a macro language like (La)TeX. Why introduce two layers of macro indirection? Maybe it just doesn't fit my use case, which doesn't mean it can't fit anybody's; but, more intriguingly, maybe it would come to fit my use case if I understood what it can add, so I wonder if you could describe how it's useful to you.

red_admiral 5 days ago

> Why introduce two layers of macro indirection

TeX already has more than enough layers of macro indirection :/

Try debugging an \makeatletter\expandafter and you're going to have a bad day. I think the macro system is even Turing-complete in some sense, certainly the number of times you potentially need to run TeX to guarantee a complete output reduces to the halting problem.

JadeNB 5 days ago

> > Why introduce two layers of macro indirection

> TeX already has more than enough layers of macro indirection :/

Sure, I should have said "another layer of macro indirection" instead of just two!

> Try debugging an \makeatletter\expandafter and you're going to have a bad day. I think the macro system is even Turing-complete in some sense, certainly the number of times you potentially need to run TeX to guarantee a complete output reduces to the halting problem.

So is the indirect (har!) answer that, for you, which I know isn't the same as the person I was originally responding to, introducing the new macro layer allows you to replace some of the TeX-level indirection by a more concretely understandable macro expander?

(By the way, you are right that TeX's macro system is Turing-complete, not just incidentally but intentionally; Knuth didn't plan to make it so, but did so by request from Steele.)