[tex-k] Problem with "mf" online display in GNOME
igor.liferenko at gmail.com
Wed May 24 08:58:05 CEST 2017
Hi Paul (and Karl and all),
Let's suppose that somebody would like to read MetaFont Book and learn
MetaFont without having online display functionality. What would be
the mechanism to get the output from the computer? (After all, it
is not assumed in MetaFont Book that online-display functionality
exists in "mf".)
> I think that the problem is that mf is not handling expose events correctly
> (or at all?).
Quote from x11-Xlib.c:
We don't handle Expose events in general. This means that the window
cannot be moved, resized, or obscured.
> 1. Without using a file test.mf, type mf, \relax at the ** prompt, and
> drawdot(35,70); showit; at the * prompt. Then, try drawing other dots
> (for example drawdot(20,20); showit; ). Do they appear?
The first dot does not appear, but when I issue one more "drawdot",
the dot appears, together with the preceding one. If I draw more dots,
they all appear. So, the conclusion is that the dot does not appear
only when the graphics window has not been already existing.
Something is going wrong during initialization...
I recall that when I tried to use GNU Emacs 24 in server mode in GNOME about half a year
ago, I had a problem that when "emacsclient -n" was run, there appeared
'Window is ready' notification for emacs, instead of bringing it to the front.
I was able to work around this by using "(setq server-raise-frame nil)"
in .emacs to disable its 'raise-frame' internal function, and making the following
alias for emacsclient, which would call wmctrl to bring emacs window to front before executing
alias em='wmctrl -a emacs24 at debian; emacsclient -n'
I recalled this case, because it seems similar, as the stuff
goes wrong during initialization. Maybe I'm wrong. Is it possible to do some
similar hack, or perhaps change MF source that it will sleep a bit (for example)
before drawing things?
> 2. If you are able to draw additional dots, are they redrawn on the screen
> if you cover them with another window and then uncover them?
Everything is fine here in GNOME.
> First, for your original question: it's probably either
> Build/source/texk/web2c/window/x11-Xlib.c or
> Build/source/texk/web2c/window/x11-Xt.c .
> Probably the former, given the short output of "ldd .../mf"
Attached is the output of "ldd /usr/bin/mf" on my machine. Does it
imply that x11-Xlib.c is used, or x11-Xt.c?
Are those alternative implementations, or they are just different elements
of one implementation?
In x11-Xlib.c it is said:
I could never have done this without David Rosenthal's Hello World
program for X. See $X/mit/doc/HelloWorld.
Does anybody know where to get this file? Googling does not bring anything useful.
I would like to compile MF from source. I run the following commands:
sudo apt-get install libkpathsea-dev
mkdir mydir && cd mydir
rsync -a --delete --exclude=.svn --exclude=Work tug.org::tldevsrc/Build/source/ .
mkdir Work && cd Work
../configure --disable-all-pkgs --enable-shared --with-system-kpathsea --disable-native-texlive-build
But "make" does not compile anything after these steps.
Please say what I'm doing wrong. Following is the configuration summary:
** Configuration summary for TeX Live 2016-05-23 (2017):
compiling for x86_64-pc-linux-gnu
from sources in /home/user/mydir
C compiler (CC): gcc (gcc (Debian 6.3.0-18) 6.3.0 20170516)
C++ compiler (CXX): g++ (g++ (Debian 6.3.0-18) 6.3.0 20170516)
** Next run `make' to configure and build each library and program.
More information about the tex-k