On Sat, Mar 27, 2021 at 05:37:27PM +0100, Ralf Hemmecke wrote:
> Hi Waldek,
> 
> interestingly, when I use
> 
> unset DAASE; HTPATH=. FRICAS_INITFILE='' fricas -noihere -paste ug08.ht
> 
> then there will be
> 
> ugProblemNumericPage26.VIEW  ugProblemNumericPage30.VIEW
> ugProblemNumericPage27.VIEW  ugProblemNumericPage31.VIEW
> ugProblemNumericPage28.VIEW  ugProblemNumericPage32.VIEW
> ugProblemNumericPage29.VIEW
> 
> generated with the files
> 
> data  image.bm        image.xpm
> 
> in them. When I look at the corresponding ug08.input, then I see
> something like this.
> 
> draw((x,y)+-> real exp complex(x,y), -2..2, -2*%pi..2*%pi, colorFunction
> == (x, y) +-> imag exp complex(x,y), title=="exp(x+%i*y)", style=="smooth")
> 
> However, executing that command alone will not produce an output file.
> 
> Unfortunately, I seemingly got lost when I folloed what happens during
> 
>   fricas -paste ...
> 
> Obviously, at some place FriCAS must set a default output to *.xpm and
> *.bm files. If it were clear at which place this happens (and it
> seemingly only happens with the -paste option, we could change it so
> that FriCAS will automatically also generate .ps file (even when they
> are not needed for HyperDoc.

This is hidden in C part: hyperdoc puts 'write' command after
graphic commands.  Required formats are specified as part of
that 'write' command.

See diff in the attachement.
-- 
                              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/20210327191613.GA12075%40math.uni.wroc.pl.
diff --git a/src/hyper/htinp.c b/src/hyper/htinp.c
index 5174ec6..5c617f1 100644
--- a/src/hyper/htinp.c
+++ b/src/hyper/htinp.c
@@ -366,8 +366,9 @@ get_graph_output(char *command,char *pagename,int com_type)
     for (i = 0; i < n; i++) {
         get_string_buf(spad_socket, buf, 1024);
     }
-    sprintf(buf, "(|processInteractive| '(|write| |%s| \"%s%d\" \"image\") NIL)", "%",
-            pagename, example_number);
+    sprintf(buf, "(|processInteractive| '(|write| |%s| \"%s%d\" (|construct|"
+                   "\"image\" \"postscript\")) NIL)", "%",
+                     pagename, example_number);
     send_lisp_command(buf);
     send_lisp_command("(|setViewportProcess|)");
     send_lisp_command("(|processInteractive| '(|close| (|%%| -3)) NIL)");

Reply via email to