$ in hypertex \example command

5 views
Skip to first unread message

Grégory Vanuxem

unread,
Jul 1, 2024, 10:47:31 AMJul 1
to fricas...@googlegroups.com
Hello,

I encountered the following message running a personal \example{} command in Hyperdoc:

(1) -> Print_to_string: Unrecognized Keyword Type 65
Print_to_string: Unrecognized Keyword Type 65

At first guess I would say that this comes from the dollar sign. The command is correctly executed in the Xterm but I have this message in the main console. Is this not supported in the \example{} hypertex command or just not handled at all?

The command is:
\example{l:=[x,pi()$JWSEXPR,7]}

In fact, looking more carefully, 'pi' here is not in bold in HyperDoc whereas examples are in bold usually. I do not know if this is related.
I do not also know what are the TextNode-s used in src/hyper/spadint.c but the console message seems to come from line 610.

Regards,

- Greg 

Grégory Vanuxem

unread,
Jul 1, 2024, 8:46:10 PMJul 1
to fricas...@googlegroups.com
Not related to the dollar sign for information. Same things happen with:
++ \example{l:=[1,pi(),17]}

I used this completely unrelated \example{}, file src/algebra/string.spad:
================================================================
)abbrev category STRICAT StringCategory
-- Note that StringCategory is built into the old compiler
-- redundant SetCategory added to help Aldor compiler
++ Description:
++ A category for string-like objects

StringCategory() : Category == Join(StringAggregate(), SetCategory, OpenMath) with
  string : Integer -> %
  ++ string(i) returns the decimal representation of i as a string.
  ++ \example{l:=[1,pi(),17]}
=======================================================
I should have noticed the _two_ messages. I will fill an issue later today.

(Vanilla FriCAS just cloned from GitHub.com)

- Greg

Grégory Vanuxem

unread,
Jul 2, 2024, 7:59:39 PMJul 2
to fricas...@googlegroups.com
Filed as issue #176

pi() in a HyperTeX \example{}, when the example is executed, causes
spurious messages

https://github.com/fricas/fricas/issues/176

Waldek Hebisch

unread,
Jul 2, 2024, 8:40:25 PMJul 2
to fricas...@googlegroups.com
On Tue, Jul 02, 2024 at 02:45:30AM +0200, Grégory Vanuxem wrote:
> Not related to the dollar sign for information. Same things happen with:
> ++ \example{l:=[1,pi(),17]}
>
> I used this completely unrelated \example{}, file src/algebra/string.spad:
> ================================================================
> )abbrev category STRICAT StringCategory
> -- Note that StringCategory is built into the old compiler
> -- redundant SetCategory added to help Aldor compiler
> ++ Description:
> ++ A category for string-like objects
>
> StringCategory() : Category == Join(StringAggregate(), SetCategory,
> OpenMath) with
> string : Integer -> %
> ++ string(i) returns the decimal representation of i as a string.
> ++ \example{l:=[1,pi(),17]}
> =======================================================
> I should have noticed the _two_ messages. I will fill an issue later today.

I can not reproduce this. Compiling STRICAT above and using Browse
gives me expected result.

--
Waldek Hebisch

Grégory Vanuxem

unread,
Jul 2, 2024, 9:14:53 PMJul 2
to fricas...@googlegroups.com
Ok, I will check on a pure GNU/Linux. It’s on WSL2, so with Windows (here 11), but with the latest vanilla FriCAS. No other FriCAS installed. Below you can see the banner of the official version. My working copy is different for example. Maybe WSL2 or Windows specificities. Good thing to know nevertheless. Thanks!

Top of the ChangeLog:
2024-07-01  Waldek Hebisch  <c...@fricas.org>

* src/algebra/fspace.spad: Re-apply change from 05-26
src/algebra/Makefile.in, src/algebra/constant.spad,
src/algebra/exposed.lsp, src/algebra/expr.spad,
src/interp/i-funsel.boot: Adjust


The test from the issue (#176):

Capture d'écran 2024-07-03 025832.png

--
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 fricas-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZoSd98v3Ren1C2tO%40fricas.org.

Grégory Vanuxem

unread,
Jul 2, 2024, 9:53:02 PMJul 2
to fricas...@googlegroups.com
No. I just tested on an up to date Parrot GNU/Linux, Debian based,
SBCL 2.4.1 from Parrot, same machine, this issue occurs also. FriCAS
just cloned. My sequence of commands was:

start fricas
close hyperdoc
compile foo.spad with the FooCategory from issue #176
start hyperdoc with )hd
browse for operation 'bar', execute the bar example 'pi()' by clicking on it.
In the just opened xterm I see the two messages.

If the 'pi()' example is already defined at startup and no use of )hd
the warning messages are displayed in the main terminal instead of the
xterm freshly started. I am stuck.

- Greg


Le mer. 3 juil. 2024 à 03:14, Grégory Vanuxem <g.va...@gmail.com> a écrit :
>
> Ok, I will check on a pure GNU/Linux. It’s on WSL2, so with Windows (here 11), but with the latest vanilla FriCAS. No other FriCAS installed. Below you can see the banner of the official version. My working copy is different for example. Maybe WSL2 or Windows specificities. Good thing to know nevertheless. Thanks!
>
> Top of the ChangeLog:
> 2024-07-01 Waldek Hebisch <c...@fricas.org>
>
> * src/algebra/fspace.spad: Re-apply change from 05-26
> src/algebra/Makefile.in, src/algebra/constant.spad,
> src/algebra/exposed.lsp, src/algebra/expr.spad,
> src/interp/i-funsel.boot: Adjust
>
>
> The test from the issue (#176):
>
>
>

Waldek Hebisch

unread,
Jul 3, 2024, 3:08:58 PMJul 3
to fricas...@googlegroups.com
On Wed, Jul 03, 2024 at 03:52:24AM +0200, Grégory Vanuxem wrote:
> No. I just tested on an up to date Parrot GNU/Linux, Debian based,
> SBCL 2.4.1 from Parrot, same machine, this issue occurs also. FriCAS
> just cloned. My sequence of commands was:
>
> start fricas
> close hyperdoc
> compile foo.spad with the FooCategory from issue #176
> start hyperdoc with )hd
> browse for operation 'bar', execute the bar example 'pi()' by clicking on it.

I see. I did not execute the example. When I do I see the suprious
messages.

> In the just opened xterm I see the two messages.

That just how HyperDoc works, it goes twice over the same thing,
in each pass it emits a single message.

> If the 'pi()' example is already defined at startup and no use of )hd
> the warning messages are displayed in the main terminal instead of the
> xterm freshly started. I am stuck.

ATM it looks that handling of '\spad' command is somewhat inconsitent.
FriCASsys uses '\spad{pi}', probably to get appropriate font and
HyperDoc is doing something wrong with it.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages