On Thu, May 19, 2022 at 07:18:01AM +0200, Ralf Hemmecke wrote:
> >Well, the intent clearly was that "printing" produces a bundle
> >containing step number and value,
>
> The time this method was invented for FriCAS, the people that invented
> jupyter where probably not yet born. The idea of having possibly another UI
> for FriCAS was not on the screen. "Saturn" was an in-house product.
>
> >and that separationg step number and value should be easy.
>
> Can you do it for all cases? Just two are given below. "Easy" is something
> else.
I wrote "should". If it is not easy we need to change it. That
is why I wrote about possible new io hook (IIUC this is similar
to what you do). The point is that IMO handling of number should
be together with output. So, I prefer changing 'mathprintWithNumber'
to produce somthing acceptable to jFriCAS (as opposed to out of
bound chanell).
> >To say the truth it looks somewhat strange that you want to
> >suppres printing of step number but want its value.
>
> The printing of the step number in the fricas algebra output consumes n
> colums of space where n depends on the number of digits of the step number.
> If the step number appeared in the beginning of the output, then perhaps I
> could parse the output, extract the value, remove the columns from the
> fricas output, and use it for jupyter. But it doesn't always
>
> Reading $IOindex is definitely a simpler solution, given that the step
> number cannot always be easily removed, see below. And I do not think that
> it makes sense to print the step number in the FriCAS output (and thus waste
> some output columns if it there is anyway a "Out[step]" in jupyter, which
> should, of course agree with what FriCAS thinks the step number is to make
> %%(stepnumber) work as expected.
OK, you can live with text formatting, except that you do not like
how line number is formatted (you have jupyter place for line
numbers). Anyway, IIUC you want:
- have line number available to output it in jupyter way
- no line number in text output
AFAICS we can modify 'mathprintWithNumber' to do what you need.
I am not sure how general this should be. One way is to have
a flag signalling to 'mathprintWithNumber' to do what jFriCAS
needs. Another possiblity is to have more general flags like
"suppress step number in output".
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/20220519235826.GA13992%40fricas.math.uni.wroc.pl.