Red Hat Bugzilla – Bug 470942
xdvik ignores zeros in page movement commands
Last modified: 2008-11-22 11:56:07 EST
Description of problem:
After typing '<page_number>g' in xdvi window a page <page_number> is supposed to be displayed. This does happen if a number is something like 5, 11 or 37. OTOH if you will try to type '20g' or '50g' then you will find yourself looking at pages 2 or 5 respectively.
/usr/share/texmf/doc/latex/refman/refman.dvi from texlive-texmf-doc package gives and example with a lot of pages to look at. :-)
Version-Release number of selected component (if applicable):
A similar effect can be seen with an 'S' command. That means that '30S' is undistinguishable from '3S' and quite distinct from '31S' with a difference between '99S' and '100S' likely the most dramatic. OTOH '0G' and '1G' seem to work as expected.
This has been reported upstream as well:
there's a workaround there as well - I'll look at adding in the binding to the fedora package.
Thanks! For others checking this bug the workaround in followups to the reference quoted in comment #1 is:
"... a workaround would be to put the
following into your X resources (e.g. ~/.Xdefaults):
As a matter of fact I added that to /etc/texmf/xdvi/XDvi, to make it available system-wide, and it works. It resolves also issues with 'S' command. ~/.xdvirc would be a good place for a "private" modification too.
BTW - strace seems to show that xdvi attempts to read the following (in my case) files:
but /usr/share/texmf/xdvi/XDvi from xdvik-22.84.14-3.fc9 package is not on that list. That because /etc/texmf/xdvi/XDvi read succeeded?
These packages should fix the issue:
Would be a great help if you could test them (remember to remove/comment those lines you added to .Xdefaults first).
xdvik-22.84.14-4.fc10 has been submitted as an update for Fedora 10.
xdvik-22.84.14-4.fc9 has been submitted as an update for Fedora 9.
I tested xdvik-22.84.14-4.fc10 and numbers used with 'g' and 'S' commands worked in an expected way while before this update they were misbehaving like described in the original report. Thanks!
Thanks for testing Michal.
xdvik-22.84.14-4.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
Note! The fix consist of translation lines, like those quoted in a comment #2, added to /usr/share/texmf/xdvi/XDvi. If a customized /etc/texmf/xdvi/XDvi happens to exist then this is not effective as only the later file is read and not the former (it looks like 'kpathsea' library in operation) so in such case the change needs to be applied to /etc/texmf/xdvi/XDvi too.
Thinking a bit more about comment #9 maybe a %post section of xdvik package could apply the required fix automatically? Something there along these lines:
if [ -f /etc/texmf/xdvi/XDvi ] ; then
grep -q '<Key>0: digit(0)' /etc/texmf/xdvi/XDvi || echo '
<Key>0: digit(0)' >> /etc/texmf/xdvi/XDvi
Actually, Michal, you raise a good point. I think though that the right fix is to move our configuration file to /etc in any case - that's where configuration files are meant to live. Debian does this as well. I'll do that in a subsequent update.
Reopening bug to remind me to move the configuration file to the right place.
> I think though that the right fix is to move our configuration file to /etc ...
Maybe, maybe not. You would need to check if that will work as expected with texconfig-sys adjusting, say, a paper size or a printer type for xdvi. Quite possibly yes, as kpathsea should help here, but something to think about.
Also files under /etc/texmf/ may be heavily customized for an installation so
they would have to be "config noreplace". It means that "a fix by a new configuration file" would not work anyway without doing something in %post. Just clobbering an old /etc/texmf/xdvi/XDvi would get you angry bug reports in no time at all.
(In reply to comment #11)
> Actually, Michal, you raise a good point. I think though that the right fix is
> to move our configuration file to /etc in any case - that's where configuration
> files are meant to live. Debian does this as well. I'll do that in a subsequent
I don't think so. Files in /etc are for system-wide local customization. Config files for upstream and fedora packagers are in /usr/share/texmf/
xdvik-22.84.14-4.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.