[PATCH] enable "title" in PS format of image output

10 views
Skip to first unread message

Qian Yun

unread,
Apr 23, 2024, 8:47:05 AM4/23/24
to fricas-devel
This is the final piece of my fixes to PS output.

As discussed in previous thread, this patch enables title to
be shown in PS format output.

But I did not add a option to enable/disable the drawing of
frame over viewWindow and titleWindow. First, this feature
does not exist for the screen output or bitmap output.
Second, this requires rather extensive changes, including
adding support on the SPAD side. Third, this looks like
a debugging feature to me. So I leave this portion of code
under "#if 0".

Some side notes: it looks like the PS related functions
are modeled after X11 APIs. It looks like it was designed
with mono color at first, then added some color support,
but incomplete. Some other parts also looks like unfinished
or unpolished. Also the PS functions are too tightly tangled
with X11 logic, so it is too difficult to make the generation
of PS free of X11 dependency.


About next steps:

First is to use those generated PS images for the book.
I currently used a hack in htinp.c to generate PS image,
but a proper solution is needed, maybe by tweaking the
awk scripts.

Second is to make the book generated by pdflatex.

Third is to find a proper way to generate those fancy images
listed in appendix.

- Qian
fix-ps-title.patch

Ralf Hemmecke

unread,
Apr 23, 2024, 8:52:28 AM4/23/24
to fricas...@googlegroups.com
> with X11 logic, so it is too difficult to make the generation
> of PS free of X11 dependency.

That is sad.

> About next steps:
>
> First is to use those generated PS images for the book.
> I currently used a hack in htinp.c to generate PS image,
> but a proper solution is needed, maybe by tweaking the
> awk scripts.
>
> Second is to make the book generated by pdflatex.
>
> Third is to find a proper way to generate those fancy images
> listed in appendix.

I am working already silently on all of this. Slow prgress, but
progress. I'll let you know as soon as I have something working.

I think, your htinp.c hack is not needed.

Ralf

Waldek Hebisch

unread,
Apr 24, 2024, 11:12:24 AM4/24/24
to fricas...@googlegroups.com
On Tue, Apr 23, 2024 at 08:47:00PM +0800, Qian Yun wrote:
> This is the final piece of my fixes to PS output.
>
> As discussed in previous thread, this patch enables title to
> be shown in PS format output.
>
> But I did not add a option to enable/disable the drawing of
> frame over viewWindow and titleWindow. First, this feature
> does not exist for the screen output or bitmap output.
> Second, this requires rather extensive changes, including
> adding support on the SPAD side. Third, this looks like
> a debugging feature to me. So I leave this portion of code
> under "#if 0".

OK

> Some side notes: it looks like the PS related functions
> are modeled after X11 APIs. It looks like it was designed
> with mono color at first, then added some color support,
> but incomplete. Some other parts also looks like unfinished
> or unpolished. Also the PS functions are too tightly tangled
> with X11 logic, so it is too difficult to make the generation
> of PS free of X11 dependency.

Well, there are two things:
a) generate PS without connection to X server
b) compile PS output without X headers and libraries

For a) I do not think that "tightly tangled with X11 logic" is
a big problem. Concerning b), once a) is done b) would be
not difficult, just some tedious work: basically replace X11
hunks and PS hunks by separate functions and collect new functition
in appropriate files. Or, less elegant but possibly less work,
just put appropiates C preprocessor conditional around each hunk.

> About next steps:
>
> First is to use those generated PS images for the book.
> I currently used a hack in htinp.c to generate PS image,

AFAICS this is "approved method", not a hack: since this is _build_
property kind of output is hardcoded into 'htinp.c'.


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