Open schneiderfelipe opened 4 years ago
I never really got these starred commands, what are they for?
(I think the equation one is to avoid numbering?)
Edit: hmm https://tex.stackexchange.com/a/45394 right so probably not all of it is useful right now
I never really got these starred commands, what are they for?
They normally mean something is executed, but less output is produced. That's more like a convention.
(I think the equation one is to avoid numbering?)
Yes. Allowing *
to appear in a command's name would solve it. Is it too hard?
I think the question is more whether it's really super useful or not :-)
Franklin cannot hope to support all of LaTeX so it would make sense to determine a "useful subset", I agree that unnumbered equations might be good but apart from that the general command* seems a bit useless to me?
I think the question is more whether it's really super useful or not :-)
I have to admit, not really. But it is super cool 😄.
Franklin cannot hope to support all of LaTeX so it would make sense to determine a "useful subset", I agree that unnumbered equations might be good but apart from that the general command* seems a bit useless to me?
I agree. But you might not need to support all of LaTeX if all of LaTeX could be defined from within Franklin. And it suffices (I think) to support \newcommand
and \newenvironment
both with and without *
.
And this could be a simple fix. At
the definition could be rewritten to be
r"^\s*(\\[\p{L}]+\*?)\s*$"
(Disclaimer: I haven't tested it.) Do you think it will clash with something else in Franklin?
your modification is correct (feel free to open a draft pr with it!) the only thing to test is that there's no ambiguity with the emphasis since *blah*
is meant to give blah and so there's a parsing ordering to consider. I think it will be fine but it should be tested nonetheless with things like
\com*{foo *bar*}
\com*{foo} *bar*
*\com*{foo}*
for environment it's within braces so it's trivial.
this is effectively done on branch https://github.com/tlienart/Franklin.jl/tree/beginend (which is not ready to be released but hopefully soon).
The idea would be to support
\newcommand{\mycommand*}{...}
as in LaTeX\mycommand*
. This came from a comment in #624.This might have to do with #628 (for things such as
\begin{equation*}
, etc.).