To Waldek:
Does HyperDoc use the generated .xpm image from "draw" commands?
To Ralf:
This is my current progress. The ps image looks much better that
xpm image, I have not realized this before.
Some problems other than black-and-white 2D image:
1. Title not shown in .ps format.
2. Image size needs adjustment in *.tex. (Currently too big.
I guess a new tex package is required for auto resizing.)
3. "smooth" style image is not shown.
- Qian
diff --git a/src/doc/ugepsf.awk b/src/doc/ugepsf.awk
index e39ddde9..a53d6c9c 100644
--- a/src/doc/ugepsf.awk
+++ b/src/doc/ugepsf.awk
@@ -18,7 +18,7 @@
} else {
print "no-pics: " $0
}
- print $0 ": " view n ".VIEW/image.xpm"
- print "\tconvert $< $@"
+ print $0 ": " view n ".VIEW/image.ps"
+ print "\tcp $< $@"
spadgraph=0
}
diff --git a/src/graph/view2D/write2d.c b/src/graph/view2D/write2d.c
index 05bbf62e..d9126b53 100644
--- a/src/graph/view2D/write2d.c
+++ b/src/graph/view2D/write2d.c
@@ -186,7 +186,7 @@ writeViewport(int thingsToWrite)
case Postscript:
/*** Create postscript output for viewport (in
fricas2D.ps) ***/
fricas_sprintf_to_buf2(PSfilename, "%s%s", viewDirName,
- "/fricas2D.ps");
+ "/image.ps");
if (PSInit(viewport->viewWindow,viewport->titleWindow) ==
psError)
return (-1);
drawViewport(PSoption); /* write new script file in /tmp */
diff --git a/src/graph/view3D/write3d.c b/src/graph/view3D/write3d.c
index ac5a1210..990b0fb5 100644
--- a/src/graph/view3D/write3d.c
+++ b/src/graph/view3D/write3d.c
@@ -196,7 +196,7 @@ writeViewport (int thingsToWrite)
case Postscript:
/*** Create postscript output for viewport (in
fricas3D.ps) ***/
fricas_sprintf_to_buf2(PSfilename, "%s%s", viewDirName,
- "/fricas3D.ps");
+ "/image.ps");
if (PSInit(viewport->viewWindow,viewport->titleWindow) ==
psError)
return(-1);
drawViewport(PSoption); /* write new script file in /tmp */
diff --git a/src/hyper/htinp.c b/src/hyper/htinp.c
index 5174ec69..f8014829 100644
--- a/src/hyper/htinp.c
+++ b/src/hyper/htinp.c
@@ -366,7 +366,7 @@ 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)", "%",
+ sprintf(buf, "(|processInteractive| '(|write| |%s| \"%s%d\"
\"postscript\") NIL)", "%",
pagename, example_number);
send_lisp_command(buf);
send_lisp_command("(|setViewportProcess|)");
On 2/3/24 23:04, Ralf Hemmecke wrote:
Hi Qian,
No. I think there is no reason to convert .xpm for the book.
Any way to produce the final picture that is included in the book is fine.
As far as I know, .xpm might be needed for HyperDoc.
Otherwise, I would be super-happy, if we can generate the pictures for
the book without X.
Let me know what you are doing. It would be possible to inject code that
while generating the .xmp, some other code generates .ps.
Ralf
On 2/3/24 15:32, Waldek Hebisch wrote:
On Sat, Feb 03, 2024 at 10:09:11PM +0800, Qian Yun wrote:
Hi Ralf,
I noticed that in the creation process of book.pdf,
you convert .xpm (bitmap) image to .ps format.
But "draw" in FriCAS can create ".ps" (vector) image directly.
I'm trying to use this better quality for the book.
So I'm asking there's no particular reason to choose
bitmap image over vector image, right?
There is a trouble: currently our 2D Postscript output is black and
white only (no colors). So there is some extra work to do,
either use Postscript only for 3D, or modify Postscript output
so that it can handle colors also for 2D.
BTW. There is long standing issue that our 3D Postscript output
needs connection to X server. It would be good to make it work
independently of X.
--
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/fac4e147-f8c7-4d61-ab42-590bccbfdb65%40gmail.com.