[Cjk] Re: [pdftex] SGML output fails with pdflatex
Taco Hoekwater
taco at elvenkind.com
Wed Nov 15 20:30:20 CET 2006
Hi,
I've posted this to pdftex-devel:
---
Hi,
This turned out to be something completely different from what
I thought initially, and does not seem related to a font number
limit at all ?
My current analysis is that the internal base font defined in the
vf file is not initialized yet (so pdf_font_size[f] is still
zero) at the moment output_one_char() is called on it.
I am surprised because if that really is the problem, should
it not have happened earlier and more often?
The attached patch makes the test document run without error
on my machine. However, I am not sure whether this fixes the
problem or just makes the message disappear while still generating
wrong output.
The important line is the 'if font_used[f]' test, the other change
is just to avoid confusion (do_vf_packet used to assign to its 'f'
argument).
Best,
Taco
Danai SAE-HAN (韓達耐) wrote:
> Hi!
>
> From: Werner LEMBERG <wl at gnu.org>
>
>>>Problem now is that latex and dvipdfmx work, but pdflatex doesn't.
>>>And the PDF documents in all other languages are made with pdflatex.
>>>Strange thing as well is that it worked before with CJK v4.5.2.
>>
>>Apparently, you've found a fatal bug in pdftex. I was able to reduce
>>it to the attached document. Using the TeXLive SVN from today (which
>>contains pdfeTeX 3.141592-1.30.4-2.2), the first run of
>>
>> pdflatex zzzz.tex
>>
>>works fine, but a second run crashes with
>>
>> ! pdfTeX error (arithmetic): divided by zero.
>>
>>This is on a GNU/Linux box, BTW.
>
>
> Hmm, your example file works on my computer though.
> But the error you get is exactly the same that I get with
> reference.zh-tw.tex.
>
> I tried running latex first, and then pdflatex, and it only produces
> the following warning:
>
>
> % start
>
> (/usr/share/texmf-tetex/tex/latex/wasysym/uwasy.fd) [1{/home/danai/.texmf-var/f
> onts/map/pdftex/updmap/pdftex.map}] [2] (./zzzz.toc)
> ! pdfTeX warning (ext4): destination with the same identifier (name{page.1}) ha
> s been already used, duplicate ignored
> <to be read again>
> \penalty
> l.62 \chapter
> {^^?�^^?199^^?^^?�^^?165^^?} [1]
> ! pdfTeX warning (ext4): destination with the same identifier (name{page.2}) ha
> s been already used, duplicate ignored
> <to be read again>
> \penalty
> l.62 \chapter
> {^^?�^^?199^^?^^?�^^?165^^?} [2]
> Chapter 1.
> ! pdfTeX warning (ext4): destination with the same identifier (name{page.1}) ha
> s been already used, duplicate ignored
> <to be read again>
> \penalty
> l.76 \chapter
> {Debian ^^?�^^?242^^?^^?�^^?166^^?} [1]
> ! pdfTeX warning (ext4): destination with the same identifier (name{page.2}) ha
> s been already used, duplicate ignored
> <to be read again>
> \penalty
> l.76 \chapter
> {Debian ^^?�^^?242^^?^^?�^^?166^^?}
>
> LaTeX Font Warning: Font shape `C00/bsmi/m/sl' undefined
> (Font) using `C00/bsmi/m/n' instead on input line 76.
>
>
> % end
>
>
> Nothing serious. Using pdflatex on your zzzz.tex file doesn't fail on
> my distribution, and the resulting PDF works.
>
> Running pdflatex twice (after having deleted all the files except
> *.tex) works as well.
>
> My system: teTeX3 from Debian/unstable GNU/Linux.
>
> $ latex --version
> pdfeTeX using libpoppler 3.141592-1.21a-2.2 (Web2C 7.5.4)
> kpathsea version 3.5.4
>
> Is it because I'm using an older version of poppler (0.4.5)?
>
> I'll contact the Debian TeX maintainers to see whether Debian TeXlive
> is unaffected as well when pdflatex'ing your zzzz.tex file.
>
>
> Best regards
>
>
>
> Danai SAE-HAN
> 韓達耐
>
-------------- next part --------------
--- pdftex.web.org 2006-10-17 15:24:02.000000000 +0200
+++ pdftex.web 2006-11-15 14:40:20.818656564 +0100
@@ -17603,7 +17603,7 @@
packet_scaled := s;
end;
-procedure do_vf_packet(f: internal_font_number; c: eight_bits); {typeset the \.{DVI} commands in the
+procedure do_vf_packet(ff: internal_font_number; c: eight_bits); {typeset the \.{DVI} commands in the
character packet for character |c| in current font |f|}
label do_char, continue;
var save_vf, k, n: internal_font_number;
@@ -17612,7 +17612,9 @@
char_move: boolean;
w, x, y, z: scaled;
s: str_number;
+ f: internal_font_number;
begin
+ f := ff;
incr(vf_cur_s);
if vf_cur_s > vf_max_recursion then
overflow("max level recursion of virtual fonts", vf_max_recursion);
@@ -17622,6 +17624,8 @@
vf_replace_z;
save_vf := f;
f := vf_i_fnts[vf_default_font[save_vf]];
+ if not font_used[f] then
+ pdf_init_font(f);
save_v := cur_v;
save_h := cur_h;
w := 0; x := 0; y := 0; z := 0;
More information about the Cjk
mailing list