Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-05 Thread Waldek Hebisch
On Sun, May 05, 2024 at 09:55:38PM +0800, Qian Yun wrote:
> 
> 
> On 5/5/24 00:09, Waldek Hebisch wrote:
> > On Sat, May 04, 2024 at 11:13:14PM +0800, Qian Yun wrote:
> > > 
> > > On 5/4/24 22:01, Ralf Hemmecke wrote:
> > > > 
> > > > Anyway, by building with -j1 I got your branch compiled with a view3D
> > > > still running with 100% cpu usage after the build had successfully
> > > > finished.
> > > 
> > > I've never met this before.
> > 
> > I have written about it in messsage titled "Races in graphics".
> 
> I can't find this message.  Is this the recent reply to
> "remove sleep to speed up draw" thread or an older mail?

For some reason it did not get to the list, I have re-sent it.

> > This is not a new thing and core reason is not due to your patch.
> > Simply, your patch affects timing and _maybe_ increased probabilty
> > of this happening.  Or maybe the hang is just bad luck.
> > 
> > This 100% cpu usage is principle should be not very hard to
> > eliminate, but involves some tedious work.  And before doing
> > this work it would be good to know what Wayland folks are going to
> > break.
> > 
> 
> Regarding wayland, I believe XWayland will continue to provide
> compatibility.  I've being using wayland for a long time and
> hit no problems so far.

Common sense says that there should be good compatiblity for many
years.  But new "cool" trend is to break things, so I am not
sure.  IIUC 'xnest' is incombatible with Wayland.  'xvfb' seem to
be derivative of 'xnest' so that potentially may be broken
(more precisely, if/when 'xnest' is broken IMO there is risk that
'xvfb' will be no longer updated and may bitrot).

One possible way to improve our graphics is to use Xt.  Xt is basic
X11 toolkit (some other toolkits are built on top of Xt).  But,
it is not clear how long Xt will be maintained.  Note: I do not
think there is worry in the next few years.  However, we are
using code that is 30 years old and preferably improved code
should live longer.

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


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-05 Thread Qian Yun




On 5/5/24 00:09, Waldek Hebisch wrote:

On Sat, May 04, 2024 at 11:13:14PM +0800, Qian Yun wrote:


On 5/4/24 22:01, Ralf Hemmecke wrote:


Anyway, by building with -j1 I got your branch compiled with a view3D
still running with 100% cpu usage after the build had successfully
finished.


I've never met this before.


I have written about it in messsage titled "Races in graphics".


I can't find this message.  Is this the recent reply to
"remove sleep to speed up draw" thread or an older mail?


This is not a new thing and core reason is not due to your patch.
Simply, your patch affects timing and _maybe_ increased probabilty
of this happening.  Or maybe the hang is just bad luck.

This 100% cpu usage is principle should be not very hard to
eliminate, but involves some tedious work.  And before doing
this work it would be good to know what Wayland folks are going to
break.



Regarding wayland, I believe XWayland will continue to provide
compatibility.  I've being using wayland for a long time and
hit no problems so far.

- Qian

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/9884ac44-895a-4d49-9e25-6791988d87bf%40gmail.com.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Ralf Hemmecke

Qian,

you should also replace epsf by graphicx in 
src/doc/sphinx/source/install.rst.


In fact, any traces of ImageMagick (Makefile.in and install.rst) should 
be remove.


Ralf

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/763447b7-b78d-4635-81a0-9841663bdb05%40hemmecke.org.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Ralf Hemmecke

> After I tried
> make book
> make book.pdf
> without success. But since _I_ know that to build html doc I need to
> switch to src/doc, I switched to src/doc and issued again make book,
Not only *you* know. It is even properly documented. ;-)

http://fricas.github.io/install.html#build-extra-documentation-book-and-website

But you are right, at some point, we should add a "book.pdf" target to 
the top-level Makefile.


> But I remember having read somewhere viewports will not be build (I
> use WSL2 so I never tried xvfb)
I am not sure, but I would bet that xvfb allows to build without X. So 
it should work under WSL2. Sorry, that is just a guess.


> I re-switched to src/doc, issued a 'make book.pdf' and, after
> temporarily installing tensor.sty with 'apt-get install
> texlive-science' I was able to obtain an up to date book. Good!
Cool! So that was on WSL2?

> So my notes would be maybe to add at the end of the./configure step,
> as it's usual, a displayed message related to:
>
> configure: HyperDoc graphics must be built separately.
> configure: WARNING: Aldor interface will not be built.
>
> and building viewports and eventually how to build book.pdf.
>
> Remember, I did this with a newbie spirit in mind.
The newbie spirit is good. We need more of this kind.

But since the generation is not important for people that are not 
familiar with building things (we provide it on github anyway), I think 
it is enough to have the build-instruction on the website (url above).


Ralf> After I tried
> make book
> make book.pdf
> without success. But since _I_ know that to build html doc I need to
> switch to src/doc, I switched to src/doc and issued again make book,
Not only *you* know. It is even properly documented. ;-)

http://fricas.github.io/install.html#build-extra-documentation-book-and-website

But you are right, at some point, we should add a "book.pdf" target to 
the top-level Makefile.


> But I remember having read somewhere viewports will not be build (I
> use WSL2 so I never tried xvfb)
I am not sure, but I would bet that xvfb allows to build without X. So 
it should work under WSL2. Sorry, that is just a guess.


> I re-switched to src/doc, issued a 'make book.pdf' and, after
> temporarily installing tensor.sty with 'apt-get install
> texlive-science' I was able to obtain an up to date book. Good!
Cool! So that was on WSL2?

> So my notes would be maybe to add at the end of the./configure step,
> as it's usual, a displayed message related to:
>
> configure: HyperDoc graphics must be built separately.
> configure: WARNING: Aldor interface will not be built.
>
> and building viewports and eventually how to build book.pdf.
>
> Remember, I did this with a newbie spirit in mind.
The newbie spirit is good. We need more of this kind.

But since the generation is not important for people that are not 
familiar with building things (we provide it on github anyway), I think 
it is enough to have the build-instruction on the website (url above).


Ralf

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/965a2584-f2ef-4357-9871-fb37b46bee0d%40hemmecke.org.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Ralf Hemmecke

Why  are you not using pdflatex? Because of .ps image?


Initially, I had to use just latex. The pictures would not work nicely 
with pdflatex.


pdflatex is the goal, Just wait a little. I also want to see hyperlinks.
(In fact, I rather dream of the book in html format.)

Ralf

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/29bfad12-fb8c-4914-bb1d-76300b769cb6%40hemmecke.org.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Grégory Vanuxem
Just a question, I used to prefer pdflatex over latex/dvips in the
past (for links and other addons), and at the end of the book build I
saw:
ps2pdf book.ps

Why  are you not using pdflatex? Because of .ps image?

Le sam. 4 mai 2024 à 20:04, Grégory Vanuxem  a écrit :
>
> Hi,
>
> I just built the book cloning the new-ps-book branch, very good job,
> thanks to all !
>
> I regularly use to look at he book.pdf, the one downloadable from
> github.io but I gave it a try to build it, I hadn't built it for more
> than 10 years, so I did it with a newbie spirit in mind.
>
> ./configure && make
>
> After I tried
> make book
> make book.pdf
> without success. But since _I_ know that to build html doc I need to
> switch to src/doc, I switched to src/doc and issued again make book,
> make book.pdf and he build stopped with:
> =
> ┌──(greg㉿ellipse)-[~/Tmp/fricas]
> └─$ make book.pdf
> make: *** Aucune règle pour fabriquer la cible « book.pdf ». Arrêt.
>
> ┌──(greg㉿ellipse)-[~/Tmp/fricas]
> └─$ ls
> build   config confignotes.tex  contrib
> INSTALL LICENSE.txtREADME.rst
> build-setup.sh  config_cl.out  config.statusdoc
> INSTALL.CYGWIN  Makefile   src
> ChangeLog   config.lispconfigureFAQ
> lastBuildDate   Makefile.instamp-rootdirs
> CHANGELOG.old   config.log configure.ac generate_INSTALL.sh
> license Makenotes.tex  target
>
> ┌──(greg㉿ellipse)-[~/Tmp/fricas]
> └─$ cd src/doc/
>
> ┌──(greg㉿ellipse)-[~/Tmp/fricas/src/doc]
> └─$ make book
> make: *** Aucune règle pour fabriquer la cible « book ». Arrêt.
>
> ┌──(greg㉿ellipse)-[~/Tmp/fricas/src/doc]
> └─$ make book.pdf
> grep 
> '\(\\head{\|\\psXtc\|\xtc\|\\noOutputXtc\|\\nullXtc\|epsffile\|\\spadgraph\)'
> /home/greg/Tmp/fricas/src/doc/htex/ug*.htex \
> | mawk -f /home/greg/Tmp/fricas/src/doc/ugepsf.awk > pics.mk
> (unset DAASE; FRICAS=/home/greg/Tmp/fricas/target/x86_64-linux-gnu;
> export FRICAS; \
> FRICAS_INITFILE=''  \
> /home/greg/Tmp/fricas/target/x86_64-linux-gnu/bin/fricas -noht
> -noclef -eval ')read /home/greg/Tmp/fricas/src/input/mobius.input')
> Checking for foreign routines
> FRICAS="/home/greg/Tmp/fricas/target/x86_64-linux-gnu"
> spad-lib="/home/greg/Tmp/fricas/target/x86_64-linux-gnu/lib/libspad.so"
> foreign routines found
> openServer result 0
>FriCAS Computer Algebra System
>   Version: FriCAS 2024-04-15 built with sbcl 2.4.4
>   Timestamp: sam. 04 mai 2024 17:43:10 CEST
> -
>Issue )copyright to view copyright notices.
>Issue )summary for a summary of useful system commands.
>Issue )quit to leave FriCAS and return to shell.
> -
>
> -- generate Mobius curve viewport for ViewportPage
> port := draw(surface((v*cos(u/2)+1)*cos(u),(v*cos(u/2)+1)*sin(u), _
>   v*sin(u/2)), u=-%pi..%pi, v=-0.5..0.5)
>
>Compiling function %C with type (DoubleFloat, DoubleFloat) ->
>   DoubleFloat
>Compiling function %E with type (DoubleFloat, DoubleFloat) ->
>   DoubleFloat
>Compiling function %G with type (DoubleFloat, DoubleFloat) ->
>   DoubleFloat
>Transmitting data...
>
> BadMatch (invalid parameter attributes)
> reading: integer: Connection reset by peer
> session: fatal, got out of sync with Spad server
>   (lost race)
> mkdir -p /home/greg/Tmp/fricas/target/x86_64-linux-gnu/share/viewports
> cp -r *.VIEW /home/greg/Tmp/fricas/target/x86_64-linux-gnu/share/viewports
> echo timestamp > viewports
> cp /home/greg/Tmp/fricas/src/doc/ps/exit.ps exit.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/help.ps help.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/home.ps home.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/up.ps up.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/ribbon2r.ps ribbon2r.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/ribbons2.ps ribbons2.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/ribbons2b.ps ribbons2b.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/2Dctrl.ps 2Dctrl.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/3Dctrl.ps 3Dctrl.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/SEGBIND.ps SEGBIND.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/arrowr.ps arrowr.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/knot3.ps knot3.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-alldoms.ps h-alldoms.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-allrank.ps h-allrank.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-atsearch.ps h-atsearch.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-brfront.ps h-brfront.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-comsearch.ps h-comsearch.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-consearch.ps h-consearch.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-docsearch.ps h-docsearch.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-gensearch.ps h-gensearch.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-matargs.ps h-matargs.ps
> cp /home/greg/Tmp/fricas/src/doc/ps/h-

Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Grégory Vanuxem
Hi,

I just built the book cloning the new-ps-book branch, very good job,
thanks to all !

I regularly use to look at he book.pdf, the one downloadable from
github.io but I gave it a try to build it, I hadn't built it for more
than 10 years, so I did it with a newbie spirit in mind.

./configure && make

After I tried
make book
make book.pdf
without success. But since _I_ know that to build html doc I need to
switch to src/doc, I switched to src/doc and issued again make book,
make book.pdf and he build stopped with:
=
┌──(greg㉿ellipse)-[~/Tmp/fricas]
└─$ make book.pdf
make: *** Aucune règle pour fabriquer la cible « book.pdf ». Arrêt.

┌──(greg㉿ellipse)-[~/Tmp/fricas]
└─$ ls
build   config confignotes.tex  contrib
INSTALL LICENSE.txtREADME.rst
build-setup.sh  config_cl.out  config.statusdoc
INSTALL.CYGWIN  Makefile   src
ChangeLog   config.lispconfigureFAQ
lastBuildDate   Makefile.instamp-rootdirs
CHANGELOG.old   config.log configure.ac generate_INSTALL.sh
license Makenotes.tex  target

┌──(greg㉿ellipse)-[~/Tmp/fricas]
└─$ cd src/doc/

┌──(greg㉿ellipse)-[~/Tmp/fricas/src/doc]
└─$ make book
make: *** Aucune règle pour fabriquer la cible « book ». Arrêt.

┌──(greg㉿ellipse)-[~/Tmp/fricas/src/doc]
└─$ make book.pdf
grep 
'\(\\head{\|\\psXtc\|\xtc\|\\noOutputXtc\|\\nullXtc\|epsffile\|\\spadgraph\)'
/home/greg/Tmp/fricas/src/doc/htex/ug*.htex \
| mawk -f /home/greg/Tmp/fricas/src/doc/ugepsf.awk > pics.mk
(unset DAASE; FRICAS=/home/greg/Tmp/fricas/target/x86_64-linux-gnu;
export FRICAS; \
FRICAS_INITFILE=''  \
/home/greg/Tmp/fricas/target/x86_64-linux-gnu/bin/fricas -noht
-noclef -eval ')read /home/greg/Tmp/fricas/src/input/mobius.input')
Checking for foreign routines
FRICAS="/home/greg/Tmp/fricas/target/x86_64-linux-gnu"
spad-lib="/home/greg/Tmp/fricas/target/x86_64-linux-gnu/lib/libspad.so"
foreign routines found
openServer result 0
   FriCAS Computer Algebra System
  Version: FriCAS 2024-04-15 built with sbcl 2.4.4
  Timestamp: sam. 04 mai 2024 17:43:10 CEST
-
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
-

-- generate Mobius curve viewport for ViewportPage
port := draw(surface((v*cos(u/2)+1)*cos(u),(v*cos(u/2)+1)*sin(u), _
  v*sin(u/2)), u=-%pi..%pi, v=-0.5..0.5)

   Compiling function %C with type (DoubleFloat, DoubleFloat) ->
  DoubleFloat
   Compiling function %E with type (DoubleFloat, DoubleFloat) ->
  DoubleFloat
   Compiling function %G with type (DoubleFloat, DoubleFloat) ->
  DoubleFloat
   Transmitting data...

BadMatch (invalid parameter attributes)
reading: integer: Connection reset by peer
session: fatal, got out of sync with Spad server
  (lost race)
mkdir -p /home/greg/Tmp/fricas/target/x86_64-linux-gnu/share/viewports
cp -r *.VIEW /home/greg/Tmp/fricas/target/x86_64-linux-gnu/share/viewports
echo timestamp > viewports
cp /home/greg/Tmp/fricas/src/doc/ps/exit.ps exit.ps
cp /home/greg/Tmp/fricas/src/doc/ps/help.ps help.ps
cp /home/greg/Tmp/fricas/src/doc/ps/home.ps home.ps
cp /home/greg/Tmp/fricas/src/doc/ps/up.ps up.ps
cp /home/greg/Tmp/fricas/src/doc/ps/ribbon2r.ps ribbon2r.ps
cp /home/greg/Tmp/fricas/src/doc/ps/ribbons2.ps ribbons2.ps
cp /home/greg/Tmp/fricas/src/doc/ps/ribbons2b.ps ribbons2b.ps
cp /home/greg/Tmp/fricas/src/doc/ps/2Dctrl.ps 2Dctrl.ps
cp /home/greg/Tmp/fricas/src/doc/ps/3Dctrl.ps 3Dctrl.ps
cp /home/greg/Tmp/fricas/src/doc/ps/SEGBIND.ps SEGBIND.ps
cp /home/greg/Tmp/fricas/src/doc/ps/arrowr.ps arrowr.ps
cp /home/greg/Tmp/fricas/src/doc/ps/knot3.ps knot3.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-alldoms.ps h-alldoms.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-allrank.ps h-allrank.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-atsearch.ps h-atsearch.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-brfront.ps h-brfront.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-comsearch.ps h-comsearch.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-consearch.ps h-consearch.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-docsearch.ps h-docsearch.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-gensearch.ps h-gensearch.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matargs.ps h-matargs.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matats.ps h-matats.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matdesc.ps h-matdesc.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matexamp.ps h-matexamp.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matexports.ps h-matexports.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matimp.ps h-matimp.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matinv.ps h-matinv.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matmap.ps h-matmap.ps
cp /home/greg/Tmp/fricas/src/doc/ps/h-matops.ps h-matops.ps
cp /home/greg/Tm

Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Waldek Hebisch
On Sat, May 04, 2024 at 11:13:14PM +0800, Qian Yun wrote:
> 
> On 5/4/24 22:01, Ralf Hemmecke wrote:
> > 
> > Anyway, by building with -j1 I got your branch compiled with a view3D
> > still running with 100% cpu usage after the build had successfully
> > finished.
> 
> I've never met this before.

I have written about it in messsage titled "Races in graphics".
This is not a new thing and core reason is not due to your patch.
Simply, your patch affects timing and _maybe_ increased probabilty
of this happening.  Or maybe the hang is just bad luck.

This 100% cpu usage is principle should be not very hard to
eliminate, but involves some tedious work.  And before doing
this work it would be good to know what Wayland folks are going to
break.

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


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Qian Yun



On 5/4/24 22:01, Ralf Hemmecke wrote:


Anyway, by building with -j1 I got your branch compiled with a view3D 
still running with 100% cpu usage after the build had successfully 
finished.


I've never met this before.


Looking at the book is a pleasure now. Qian, you really did a great job.
Some pictures look even better than in the printed version of the 
original Jenks&Sutor book.


I think I can savely upstream

https://github.com/hemmecke/fricas/commit/d460657632ce3fb9f8b9ea83112642ba59a9e3a9

and then please recheck that there will be no hanging view3D (and 
friends) in your patch. I would like to test it again before you commit.


Ralf



I've rebased https://github.com/oldk1331/fricas/commits/new-ps-book/
to 
https://github.com/oldk1331/fricas/commit/7102a38052a58de2ac5dba33ec9ccb13b8981798


Please try this with a fresh build.  There should be no more problems.

- Qian

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/e0549719-254f-4f28-9bea-44962e6c72da%40gmail.com.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Ralf Hemmecke

So I think that "nullXtc" should not be removed.
It is useful for the cases that we show the command into the book,
but do not actually execute it.


OK, then finally, there is a good semantics for \nullXtc.
I'll document that later.
When I started recreating the build procedure for the book, I had to 
"invent" some semantics and was probably a bit careless.


You asked me previously to commit the "remove nullXtc" patch. I was 
already a bit reluctant there, because I have not yet checked whether it 
had an influence on the HyperDoc side of the documentation creation.


Anyway, by building with -j1 I got your branch compiled with a view3D 
still running with 100% cpu usage after the build had successfully finished.


Looking at the book is a pleasure now. Qian, you really did a great job.
Some pictures look even better than in the printed version of the 
original Jenks&Sutor book.


I think I can savely upstream

https://github.com/hemmecke/fricas/commit/d460657632ce3fb9f8b9ea83112642ba59a9e3a9

and then please recheck that there will be no hanging view3D (and 
friends) in your patch. I would like to test it again before you commit.


Ralf

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/1fc84c04-2338-45f0-973a-d0caad03cdd0%40hemmecke.org.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Qian Yun

That's probably caused by tmp/ug07.input.

It doesn't hang here, but I do find that there are remaining processes
like viewman and view3D.

The problem is that there are multiple unclosed viewports.

The following fixup patch should solve that: by adding 5 images to
the book (section 7.1.9 and 7.1.10) and using "nullXtc" to
disable viewport creation in section 7.2.4 and 7.2.5.

https://github.com/oldk1331/fricas/commit/32716305e0e00ce1499e1d578092502e42badbf5


So I think that "nullXtc" should not be removed.
It is useful for the cases that we show the command into the book,
but do not actually execute it.

- Qian

On 5/4/24 16:08, Ralf Hemmecke wrote:

Qian,

I just compiled your new-ps-book branch
https://github.com/oldk1331/fricas/commit

https://github.com/oldk1331/fricas/commit/e34fadc066ee34b4b6a56ceadfa3284934166999

It leave one process hanging and thus does not finish. I must 
investigate, but have no time now. Will try more as soon as possible.


The process was a spadclient that ran with 100% CPU.

Ralf



--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/2a327466-e52f-4cfb-9f73-9b7f20e08764%40gmail.com.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-04 Thread Ralf Hemmecke

Qian,

I just compiled your new-ps-book branch
https://github.com/oldk1331/fricas/commit

https://github.com/oldk1331/fricas/commit/e34fadc066ee34b4b6a56ceadfa3284934166999

It leave one process hanging and thus does not finish. I must 
investigate, but have no time now. Will try more as soon as possible.


The process was a spadclient that ran with 100% CPU.

Ralf

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/dc45d2c3-2352-4d62-bcd6-d2bfeb817b17%40hemmecke.org.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-02 Thread Ralf Hemmecke

Hi Qian,

I can try your patch only tonight. For my two patches, I think I can 
commit them. Will also do tonight.


I have detected a few more docfixes while I go through the sources, and 
things are not that easy whent it comes to generating the .input files 
from the data in the book.


Compare

https://github.com/fricas/fricas/blob/master/src/input/images2.input

with

https://github.com/fricas/fricas/blob/master/src/doc/htex/ug21.htex#L79

Yes, vectors.input and cdraw.input are similar, but not identical.

However, OK, I agree, that your .ps generation patches might go in 
before the generation of .input from ug*.htex (even though all that is 
not urgent). Give me one or two days.


Ralf


On 5/3/24 02:04, Qian Yun wrote:

I have committed all related patches, the patch in this thread is
the last one.

I have updated it a little bit to improve the build process and
fixed the pictures in section 10.5.

https://github.com/oldk1331/fricas/commit/e34fadc066ee34b4b6a56ceadfa3284934166999

So your changes should be based on master branch from now on.

But before I commit this patch, I really would like to see
you to commit
https://github.com/hemmecke/fricas/commit/d460657632ce3fb9f8b9ea83112642ba59a9e3a9

and

https://github.com/hemmecke/fricas/commit/32a50eeb2c762e4df3b42c5f0f9cb38aa4f2a811

first.  These "noOutputXtc" patches.


I'm more familiar with these related areas and I'm confident
these changes are good to go.

- Qian

On 4/29/24 04:09, Ralf Hemmecke wrote:

Qian,

I assume that your patches are the same as your new-ps-book branch.
I somehow liked your idea for the "stamp-pics" target.
Currently, I am going slowly through the documentation and found a 
number of bugs. See my branch

https://github.com/hemmecke/fricas/tree/wip/fricas-book.
(DANGER! I will freely rebase that on top of "master")
I'm not yet that far to include all you stuff of the ps generation.
As you see, I still have some old remnants of your old patches from 
your ps-book branch. Maybe with your recent commits to master, some of 
them could be removed from my branch.


Sorry that I am so slow, but I am working on it.

Ralf





--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/f30dac2e-e6cc-4a21-b580-ca7f45e68b27%40hemmecke.org.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-05-02 Thread Qian Yun

I have committed all related patches, the patch in this thread is
the last one.

I have updated it a little bit to improve the build process and
fixed the pictures in section 10.5.

https://github.com/oldk1331/fricas/commit/e34fadc066ee34b4b6a56ceadfa3284934166999

So your changes should be based on master branch from now on.

But before I commit this patch, I really would like to see
you to commit
https://github.com/hemmecke/fricas/commit/d460657632ce3fb9f8b9ea83112642ba59a9e3a9

and

https://github.com/hemmecke/fricas/commit/32a50eeb2c762e4df3b42c5f0f9cb38aa4f2a811

first.  These "noOutputXtc" patches.


I'm more familiar with these related areas and I'm confident
these changes are good to go.

- Qian

On 4/29/24 04:09, Ralf Hemmecke wrote:

Qian,

I assume that your patches are the same as your new-ps-book branch.
I somehow liked your idea for the "stamp-pics" target.
Currently, I am going slowly through the documentation and found a 
number of bugs. See my branch

https://github.com/hemmecke/fricas/tree/wip/fricas-book.
(DANGER! I will freely rebase that on top of "master")
I'm not yet that far to include all you stuff of the ps generation.
As you see, I still have some old remnants of your old patches from your 
ps-book branch. Maybe with your recent commits to master, some of them 
could be removed from my branch.


Sorry that I am so slow, but I am working on it.

Ralf



--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/bf6f4fe7-127f-4ce2-aa2b-a51f8fd090b5%40gmail.com.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-04-28 Thread Ralf Hemmecke

Qian,

I assume that your patches are the same as your new-ps-book branch.
I somehow liked your idea for the "stamp-pics" target.
Currently, I am going slowly through the documentation and found a 
number of bugs. See my branch

https://github.com/hemmecke/fricas/tree/wip/fricas-book.
(DANGER! I will freely rebase that on top of "master")
I'm not yet that far to include all you stuff of the ps generation.
As you see, I still have some old remnants of your old patches from your 
ps-book branch. Maybe with your recent commits to master, some of them 
could be removed from my branch.


Sorry that I am so slow, but I am working on it.

Ralf

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/3148b1a0-1206-4add-babb-69dc4b323492%40hemmecke.org.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-04-27 Thread Qian Yun



On 4/26/24 18:23, Qian Yun wrote:



On 4/26/24 06:00, Waldek Hebisch wrote:


There is some problem with this.  On my machine I got faulty
'TEXTFILE.tex', it contained '\begin{noOutputXtc}' but no
matching end part, causing documentaion build failure.


This does not always happen, and sometimes happen to other
tmp/*tex file.  The problem is that this TeX file missing
a few last lines.

This commit changes the processing of input->spool->tex from
interpsys to fricas (with sman).  So I guess it is caused by
some buffering issues/race condition related to sman?

This can be workaround by adding a few "--" lines by
htex2input.awk.



More findings:

It seems that I can't reproduce this "missing final lines"
problem in single process environment.

So it seems like this doesn't happen when building book
with "make -j1".

Anyway, the attached patch make the generation of
input->spool->tex to use XVFB+sman only when needed.

Now I tested build with multiple processes many times
and encounter no failure.

- Qian

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/c7421509-bf38-42b2-a71c-0b9591cb397e%40gmail.com.
diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index 0d4fa41a..74059d6b 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -632,9 +632,15 @@ ${HTEX_FILES_INPUT}: tmp/%.input: ${htexsrcdir}/%.htex
 HTEX_FILES_SPOOL = ${patsubst %, tmp/%.spool, ${HTEX_FILES}}
 ${HTEX_FILES_SPOOL}: tmp/%.spool: tmp/%.input
 	${MKDIR_P} tmp
-	(unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
-		echo ')read $<' | FRICAS_INITFILE='' ${XVFB} \
-		${FRICAS}/bin/fricas -noht -noclef > $@)
+	if grep "^write.*postscript" $<; then \
+		(unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
+			echo ')read $<' | FRICAS_INITFILE='' ${XVFB} \
+			${FRICAS}/bin/fricas -noht -noclef > $@); \
+	else \
+		(unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
+			echo ')read $<' | FRICAS_INITFILE='' \
+			${FRICAS}/bin/fricas -nosman > $@); \
+	fi
 
 HTEX_FILES_TEX = ${patsubst %, tmp/%.tex, ${HTEX_FILES}}
 ${HTEX_FILES_TEX}: tmp/%.tex: tmp/%.spool


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-04-26 Thread Qian Yun




On 4/26/24 06:00, Waldek Hebisch wrote:


There is some problem with this.  On my machine I got faulty
'TEXTFILE.tex', it contained '\begin{noOutputXtc}' but no
matching end part, causing documentaion build failure.


This does not always happen, and sometimes happen to other
tmp/*tex file.  The problem is that this TeX file missing
a few last lines.

This commit changes the processing of input->spool->tex from
interpsys to fricas (with sman).  So I guess it is caused by
some buffering issues/race condition related to sman?

This can be workaround by adding a few "--" lines by
htex2input.awk.


For me titles of pictures are too small, in bitmapped version
title letters are of comparable size to text letters, in .ps
version are smaller and almost unreadable when text has comfortable
size.


Yes, the old image is 300x300 while now is 400x400.
Also there is only one font size.

In the following patch I make the title font size different
from the axes label font and units font.

https://github.com/oldk1331/fricas/commit/103c0c04de8d6e1d38524a6d5aa2e4ee92742b0a.patch


I also noticed problem which has nothing to do with the patch:
in 5.4.5 there is an example computing 100!.  In HyperDoc
number appears fine, but in the .pdf it is truncated.


Yeah, it would be hard to handle this automatically.
Solve this by introducing a new latex package to line
break long numbers?


In slightly different spirit: book convention of having separate
page numbers in "front matter" and in main part IMO is misguided
in .pdf: viewer allows navigation by page number, but number on
pages and numbers in viewer frequently diverge.  IMO it would be
good to adopt uniform numbering.


Some pdf readers can handle this difference in page numbering.


Also, maybe print full section
number in the page header, that is 5.4.5 instad of current 5.4.


Well, even pages show chapter number, odd pages show section number,
leaves no space to show subsection number.  Also some subsection
names are very long.


Also after this patch, src/doc/ps/arrowr.ps SEGBIND.ps knot3.ps
ribbon2r.ps ribbons2.ps ribbons2b.ps can be removed, saves 1.3MB
and 81123 lines from repo.

https://github.com/oldk1331/fricas/commit/46b2e034148674eb05834d8a642d337b1162b897.patch


I think that they should be removed in the same commit as your
patch (when it goes in).


Sure.

- Qian

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/26633710-9d0c-418f-89ac-45f298f111f2%40gmail.com.


Re: [fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-04-25 Thread Waldek Hebisch
On Thu, Apr 25, 2024 at 09:36:45PM +0800, Qian Yun wrote:
> With this patch, the book.pdf uses PS format images instead of
> using imagemagick to "covert" from bitmap xpm images.

Good.

> Also as Ralf wishes, now the build of book is independent from
> build of hypertex pages.
> 
> P.S to Ralf, this patch uses a few lines of your noOutputXtc patch,
> you should upstream that first.

There is some problem with this.  On my machine I got faulty
'TEXTFILE.tex', it contained '\begin{noOutputXtc}' but no
matching end part, causing documentaion build failure.

For me titles of pictures are too small, in bitmapped version
title letters are of comparable size to text letters, in .ps
version are smaller and almost unreadable when text has comfortable
size.

I also noticed problem which has nothing to do with the patch:
in 5.4.5 there is an example computing 100!.  In HyperDoc
number appears fine, but in the .pdf it is truncated.

In slightly different spirit: book convention of having separate
page numbers in "front matter" and in main part IMO is misguided
in .pdf: viewer allows navigation by page number, but number on
pages and numbers in viewer frequently diverge.  IMO it would be
good to adopt uniform numbering.  Also, maybe print full section
number in the page header, that is 5.4.5 instad of current 5.4.

> Also after this patch, src/doc/ps/arrowr.ps SEGBIND.ps knot3.ps
> ribbon2r.ps ribbons2.ps ribbons2b.ps can be removed, saves 1.3MB
> and 81123 lines from repo.
> 
> https://github.com/oldk1331/fricas/commit/46b2e034148674eb05834d8a642d337b1162b897.patch

I think that they should be removed in the same commit as your
patch (when it goes in).

> From: Qian Yun 
> Date: Thu, 25 Apr 2024 21:27:43 +0800
> Subject: [PATCH] generate book with ps image instead of bitmap image
> 
> ---
>  src/doc/Makefile.in   | 29 +++--
>  src/doc/fricas.sty|  4 +++-
>  src/doc/htex/SEGBIND.htex |  2 +-
>  src/doc/htex2input.awk| 28 ++--
>  src/doc/spool2tex.awk |  3 +++
>  src/doc/ugepsf.awk| 24 
>  src/input/images1.input   |  7 ++-
>  src/input/ug-pics.input   | 28 
>  8 files changed, 82 insertions(+), 43 deletions(-)
>  delete mode 100644 src/doc/ugepsf.awk
>  create mode 100644 src/input/ug-pics.input
> 
> diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
> index 7093802ec..68e214a62 100644
> --- a/src/doc/Makefile.in
> +++ b/src/doc/Makefile.in
> @@ -46,9 +46,7 @@
>  #
>  # "make book.pdf" does the following:
>  # - Copy pictures from the ps/ directory for (documentation of HyperDoc).
> -# - Convert the *.VIEW/image.xpm pictures to .ps images (target stamp-pics).
> -#   That expects all the .VIEW/ directories to exist (make viewports).
> -#   It needs the convert program from ImageMagick. See ugepsf.awk.
> +# - Copy pictures from tmp/*.VIEW/image.ps (target stamp-pics).
>  # - Generate tmo/ug09.tex with the list of examples.
>  # - Create tmp/*.input from htex/*.htex (target ${HTEX_FILES_INPUT}).
>  #   The .input files contain the commands that should be executed.
> @@ -138,7 +136,6 @@ UGSYSCMD2HELP = ${AWK} -f ${srcdir}/syscmd.awk
>  HTEX2INPUT= ${AWK} -f ${srcdir}/htex2input.awk
>  SPOOL2TEX = ${AWK} -f ${srcdir}/spool2tex.awk
>  UGEXAMPLES= ${AWK} -f ${srcdir}/ugexamples.awk
> -UGEPSF= ${AWK} -f ${srcdir}/ugepsf.awk
>  
>  ###
>  # Most of the variables below are designed in the following way: If
> @@ -297,7 +294,8 @@ HTEX_PASTEFILES = \
>  # HyperDoc and book.pdf.
>  # The list can be generated by the following command.
>  # grep -R '\\spadcommand{)read' *| sed 's/[^ ]* //;s/[ \].*//'|sort -u
> -INPUT_EXTRA = arrows bouquet newton ribbon vectors
> +INPUT_EXTRA = arrows bouquet newton ribbon vectors \
> +  ntube tknot images1 ug-pics
>  
>  ###
>  # For these files .ht files will be generated.
> @@ -634,7 +632,9 @@ ${HTEX_FILES_INPUT}: tmp/%.input: ${htexsrcdir}/%.htex
>  HTEX_FILES_SPOOL = ${patsubst %, tmp/%.spool, ${HTEX_FILES}}
>  ${HTEX_FILES_SPOOL}: tmp/%.spool: tmp/%.input
>   ${MKDIR_P} tmp
> - echo ")read $<" | FRICAS_INITFILE='' ${INTERPSYS} > $@
> + (unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
> + echo ')read $<' | FRICAS_INITFILE='' ${XVFB} \
> + ${FRICAS}/bin/fricas -noht -noclef > $@)
>  
>  HTEX_FILES_TEX = ${patsubst %, tmp/%.tex, ${HTEX_FILES}}
>  ${HTEX_FILES_TEX}: tmp/%.tex: tmp/%.spool
> @@ -645,17 +645,12 @@ tmp/ug09.tex: tmp/examples.list
>   ${MKDIR_P} tmp
>   ${UGEXAMPLES} $< > $@
>  
> -pics.mk:
> - grep 
> '\(\\head{\|\\psXtc\|\xtc\|\\noOutputXtc\|\\nullXtc\|epsffile\|\\spadgraph\)' 
> ${srcdir}/htex/ug*.htex \
> - | ${UGEPSF} > $@
> -
>  ###
>  # There are a number of pictures for se

[fricas-devel] [PATCH] generate book.pdf with PS image instead of bitmap image

2024-04-25 Thread Qian Yun

With this patch, the book.pdf uses PS format images instead of
using imagemagick to "covert" from bitmap xpm images.

Also as Ralf wishes, now the build of book is independent from
build of hypertex pages.

P.S to Ralf, this patch uses a few lines of your noOutputXtc patch,
you should upstream that first.

Also after this patch, src/doc/ps/arrowr.ps SEGBIND.ps knot3.ps
ribbon2r.ps ribbons2.ps ribbons2b.ps can be removed, saves 1.3MB
and 81123 lines from repo.

https://github.com/oldk1331/fricas/commit/46b2e034148674eb05834d8a642d337b1162b897.patch

- Qian

--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/3d4c161e-12ff-4bc3-8d82-7d0ed05f6d68%40gmail.com.
From 46b2e034148674eb05834d8a642d337b1162b897 Mon Sep 17 00:00:00 2001
From: Qian Yun 
Date: Thu, 25 Apr 2024 21:27:43 +0800
Subject: [PATCH] generate book with ps image instead of bitmap image

---
 src/doc/Makefile.in   | 29 +++--
 src/doc/fricas.sty|  4 +++-
 src/doc/htex/SEGBIND.htex |  2 +-
 src/doc/htex2input.awk| 28 ++--
 src/doc/spool2tex.awk |  3 +++
 src/doc/ugepsf.awk| 24 
 src/input/images1.input   |  7 ++-
 src/input/ug-pics.input   | 28 
 8 files changed, 82 insertions(+), 43 deletions(-)
 delete mode 100644 src/doc/ugepsf.awk
 create mode 100644 src/input/ug-pics.input

diff --git a/src/doc/Makefile.in b/src/doc/Makefile.in
index 7093802ec..68e214a62 100644
--- a/src/doc/Makefile.in
+++ b/src/doc/Makefile.in
@@ -46,9 +46,7 @@
 #
 # "make book.pdf" does the following:
 # - Copy pictures from the ps/ directory for (documentation of HyperDoc).
-# - Convert the *.VIEW/image.xpm pictures to .ps images (target stamp-pics).
-#   That expects all the .VIEW/ directories to exist (make viewports).
-#   It needs the convert program from ImageMagick. See ugepsf.awk.
+# - Copy pictures from tmp/*.VIEW/image.ps (target stamp-pics).
 # - Generate tmo/ug09.tex with the list of examples.
 # - Create tmp/*.input from htex/*.htex (target ${HTEX_FILES_INPUT}).
 #   The .input files contain the commands that should be executed.
@@ -138,7 +136,6 @@ UGSYSCMD2HELP = ${AWK} -f ${srcdir}/syscmd.awk
 HTEX2INPUT= ${AWK} -f ${srcdir}/htex2input.awk
 SPOOL2TEX = ${AWK} -f ${srcdir}/spool2tex.awk
 UGEXAMPLES= ${AWK} -f ${srcdir}/ugexamples.awk
-UGEPSF= ${AWK} -f ${srcdir}/ugepsf.awk
 
 ###
 # Most of the variables below are designed in the following way: If
@@ -297,7 +294,8 @@ HTEX_PASTEFILES = \
 # HyperDoc and book.pdf.
 # The list can be generated by the following command.
 # grep -R '\\spadcommand{)read' *| sed 's/[^ ]* //;s/[ \].*//'|sort -u
-INPUT_EXTRA = arrows bouquet newton ribbon vectors
+INPUT_EXTRA = arrows bouquet newton ribbon vectors \
+  ntube tknot images1 ug-pics
 
 ###
 # For these files .ht files will be generated.
@@ -634,7 +632,9 @@ ${HTEX_FILES_INPUT}: tmp/%.input: ${htexsrcdir}/%.htex
 HTEX_FILES_SPOOL = ${patsubst %, tmp/%.spool, ${HTEX_FILES}}
 ${HTEX_FILES_SPOOL}: tmp/%.spool: tmp/%.input
 	${MKDIR_P} tmp
-	echo ")read $<" | FRICAS_INITFILE='' ${INTERPSYS} > $@
+	(unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
+		echo ')read $<' | FRICAS_INITFILE='' ${XVFB} \
+		${FRICAS}/bin/fricas -noht -noclef > $@)
 
 HTEX_FILES_TEX = ${patsubst %, tmp/%.tex, ${HTEX_FILES}}
 ${HTEX_FILES_TEX}: tmp/%.tex: tmp/%.spool
@@ -645,17 +645,12 @@ tmp/ug09.tex: tmp/examples.list
 	${MKDIR_P} tmp
 	${UGEXAMPLES} $< > $@
 
-pics.mk:
-	grep '\(\\head{\|\\psXtc\|\xtc\|\\noOutputXtc\|\\nullXtc\|epsffile\|\\spadgraph\)' ${srcdir}/htex/ug*.htex \
-	| ${UGEPSF} > $@
-
 ###
 # There are a number of pictures for sections in book.pdf that
 # demonstrate the use of HyperDoc.
 PS_FILES = \
   exit help home up	\
-  ribbon2r ribbons2 ribbons2b \
-  2Dctrl 3Dctrl SEGBIND arrowr knot3 \
+  2Dctrl 3Dctrl \
   h-alldoms h-allrank h-atsearch h-brfront h-comsearch h-consearch	\
   h-docsearch h-gensearch h-matargs h-matats h-matdesc h-matexamp	\
   h-matexports h-matimp h-matinv h-matmap h-matops h-matpage		\
@@ -665,8 +660,14 @@ PS_FILES_PS = ${patsubst %, %.ps, ${PS_FILES}}
 ${PS_FILES_PS}: %.ps: ${pssrcdir}/%.ps
 	cp $< $@
 
-stamp-pics: pics.mk viewports ${PS_FILES_PS}
-	${MAKE} -f pics.mk pics
+stamp-pics: ${INPUT_EXTRA_INPUT} ${HTEX_FILES_SPOOL} ${PS_FILES_PS}
+	${MKDIR_P} tmp
+	(unset DAASE; FRICAS=${FRICAS}; export FRICAS; \
+		echo ')read ug-pics' | FRICAS_INITFILE='' ${XVFB} \
+		${FRICAS}/bin/fricas -noht -noclef)
+	for f in tmp/*.VIEW/image.ps;