At Tue, 11 Feb 2003 17:41:42 +0100 Hans Hagen wrote:
At 04:36 PM 2/11/2003 +0100, Martin Schroeder wrote:
On 2003-02-07 19:51:27 +0100, Thomas Esser wrote:
also on the todo list:
What about the things that Heiko Oberdieck has proposed: http://omnibus.uni-freiburg.de/~oberdiek/pdftex.html
The map files need a bit more thinking.
indeed, esp since the optimization only looks at the first 8 chars of a filename if i remember right;
No, you have already given that hint last year and I have changed
the patch using all chars.
To make it clear, the patch improves the performance of
the *current* map file handling of pdfTeX. It saves me
*much* time in comparison to the binary of TeXLive 7.
But for *future* versions we should find an agreement
about the behaviour of pdfTeX regarding map files,
eg:
* Map files:
* Where can they specified?
* config file (pdftex.cfg)
* support of other config files
* config files given on command line
* map files given on command line
* config files given by command
* map files given by command
* ...
* When they are evaluated?
* static, first use
* dynamic changes possible?
* Which order?
* default, if no map file is given?
* adding mapfiles
* replacing mapfiles
* order ...
* ...
* Map entries:
* later entries are ignored with warning (current)
* later entries replaces older ones silently
* syntax ...
* ...
I hope I will find some time next days to give a suggestion for a
specification. One aim can be to make the behaviour similar to
dvips.
Yours sincerely
Heiko
At 12:46 PM 2/17/2003 +0100, Heiko Oberdiek wrote:
No, you have already given that hint last year and I have changed the patch using all chars.
ok, thanks
To make it clear, the patch improves the performance of the *current* map file handling of pdfTeX. It saves me *much* time in comparison to the binary of TeXLive 7.
sure, apart from being slow, the double loop was kind of strange (even searching in a quick sorted list was problably faster -)
But for *future* versions we should find an agreement about the behaviour of pdfTeX regarding map files, eg: * Map files: * Where can they specified? * config file (pdftex.cfg) * support of other config files * config files given on command line * map files given on command line * config files given by command * map files given by command * ... * When they are evaluated? * static, first use * dynamic changes possible? * Which order? * default, if no map file is given? * adding mapfiles * replacing mapfiles * order ... * ... * Map entries: * later entries are ignored with warning (current) * later entries replaces older ones silently * syntax ... * ...
sure, even cooking up a better map file syntax makes sense; also we can use more prefixes (+filename, -filename, ++filename)
I hope I will find some time next days to give a suggestion for a specification. One aim can be to make the behaviour similar to dvips.
forget about dvips, as far as i know, pdftex things made it back into dvips, so that can happen again this time; let's not carry the burden from the past Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On Mon, Feb 17, 2003 at 01:08:14PM +0100, Hans Hagen wrote:
forget about dvips, as far as i know, pdftex things made it back into dvips, so that can happen again this time; let's not carry the burden from the past
Dream:
Good ideas of dvips + good ideas of pdfTeX + other good ideas,
and the result is used both in pdfTeX and dvips, so that
map files can be shared without changes.
Yours sincerely
Heiko
forget about dvips, as far as i know, pdftex things made it back into dvips, so that can happen again this time; let's not carry the burden from the past
I am not aware of many things that dvips has taken over from pdftex. The only thing I know is the font subsetting module which origins from dvips. It was improved for pdftex and put back into dvips. Clearly, this was painless for dvips. As for other new stuff, I suggest that you don't just assume that dvips will follow everything. Better get in touch with Tomas Rokicki before doing that. Thomas
At 09:13 PM 2/17/2003 +0100, you wrote:
forget about dvips, as far as i know, pdftex things made it back into dvips, so that can happen again this time; let's not carry the burden from the past
I am not aware of many things that dvips has taken over from pdftex. The only thing I know is the font subsetting module which origins from dvips. It was improved for pdftex and put back into dvips. Clearly, this was painless for dvips.
right, i was indeed refering to this part
As for other new stuff, I suggest that you don't just assume that dvips will follow everything. Better get in touch with Tomas Rokicki before doing that.
i'm not that familiar with dvips; how different are the map files? Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
i'm not that familiar with dvips; how different are the map files?
pdftex has a numeric "bit" field that is rarely used (dvips does not have it) pdftex can omit the ps-fontname (for dvips, you can't) That's it (at least afaik). So, most files are well perfectly sharable. Users of teTeX can just drop dvips-style map files into updmap and it generates a fine map for pdftex out of it (updmap automatically omits the ps-fontname if Slant/Extend is used; pdftex should be fixed to make this unnesessary). Thomas
At 11:03 PM 2/17/2003 +0100, Thomas Esser wrote:
i'm not that familiar with dvips; how different are the map files?
pdftex has a numeric "bit" field that is rarely used (dvips does not have it) pdftex can omit the ps-fontname (for dvips, you can't)
That's it (at least afaik).
So, most files are well perfectly sharable. Users of teTeX can just drop dvips-style map files into updmap and it generates a fine map for pdftex out of it (updmap automatically omits the ps-fontname if Slant/Extend is used; pdftex should be fixed to make this unnesessary).
so, how about something -"fontname" which tells pdftex to ignore the fontname (which sometimes is handy) andis ignores by dvips? also, dvips can ignore the numeric bit, which brings them close together Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
Let us not forget "/PaintType 2 def" in a dvips fontmap, which places
that entry in the Type 1 dictionary and Type 1 rasterizers understand.
Not so with PDF files. The outline paint type has to be set with a text
state operator in a PDF file -- the Type 1 dictionary value is ignored.
Tom
On 2003/02/18 at 08:55, Hans Hagen
At 11:03 PM 2/17/2003 +0100, Thomas Esser wrote:
i'm not that familiar with dvips; how different are the map files?
pdftex has a numeric "bit" field that is rarely used (dvips does not have it) pdftex can omit the ps-fontname (for dvips, you can't)
That's it (at least afaik).
So, most files are well perfectly sharable. Users of teTeX can just drop dvips-style map files into updmap and it generates a fine map for pdftex out of it (updmap automatically omits the ps-fontname if Slant/Extend is used; pdftex should be fixed to make this unnesessary).
so, how about something -"fontname" which tells pdftex to ignore the fontname (which sometimes is handy) andis ignores by dvips?
also, dvips can ignore the numeric bit, which brings them close together
On 2003-02-17 12:46:06 +0100, Heiko Oberdiek wrote:
indeed, esp since the optimization only looks at the first 8 chars of a filename if i remember right;
No, you have already given that hint last year and I have changed the patch using all chars.
It's in (#2878). Porting this to hash.h is left as an exercise for those who know kpathsea. I must confess I hate the lack of comments in mapfile.c ... Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
On 2003-02-17 14:47:23 +0100, Martin Schröder wrote:
It's in (#2878). Porting this to hash.h is left as an exercise
Any open bugs left? Major changes since 1.10a ------------------------- - Bugfix: When setting the /Producer, /Creator or /CreationDate keys with /pdfinfo pdfTeX would also insert default values which caused duplicate keys in the info dict (see http://tug.org/pipermail/pdftex/2003-February/003524.html). - The reading of mapfiles is much faster (see http://tug.org/pipermail/pdftex/2002-July/002843.html). - Bugfix: AR5 had problems with the CTM when displaying in "fit visible" mode (see http://tug.org/pipermail/pdftex/2002-May/002688.html). - Bugfix: str_in_str had wrong indices (see http://tug.org/pipermail/pdftex/2002-March/002367.html). - Bugfix: decimal_digits defaulted to 0, which caused problems with included images when including pdfs (see http://tug.org/pipermail/pdftex/2003-February/003518.html). It now defaults to 4. - Bugfix: the type of included images was decided based only on the extensions; now pdfTeX looks for magic bytes at the start of files (see http://tug.org/pipermail/pdftex/2003-February/003519.html) -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
On Mon, Feb 17, 2003 at 03:26:04PM +0100, Martin Schroeder wrote:
On 2003-02-17 14:47:23 +0100, Martin Schröder wrote:
It's in (#2878). Porting this to hash.h is left as an exercise
Any open bugs left?
Yes, "Bug LiteralSpaceFirstSpace", see my posting in the
pdfTeX mailing list of 2002/02/16. But I do not have a
good fix (only a wild and quite untested guess).
Yours sincerely
Heiko
On 2003-02-17 15:45:51 +0100, Heiko Oberdiek wrote:
On Mon, Feb 17, 2003 at 03:26:04PM +0100, Martin Schroeder wrote:
Any open bugs left?
Yes, "Bug LiteralSpaceFirstSpace", see my posting in the pdfTeX mailing list of 2002/02/16. But I do not have a good fix (only a wild and quite untested guess).
I'd like to release 1.10b tomorrow. Anything that must be fixed till then? For LiteralSpaceFirstSpace I'd like to have Thanh's blessing for a fix. Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
On Mon, Feb 24, 2003 at 04:34:37PM +0100, Martin Schroeder wrote:
On 2003-02-17 15:45:51 +0100, Heiko Oberdiek wrote:
On Mon, Feb 17, 2003 at 03:26:04PM +0100, Martin Schroeder wrote:
Any open bugs left?
Yes, "Bug LiteralSpaceFirstSpace", see my posting in the pdfTeX mailing list of 2002/02/16. But I do not have a good fix (only a wild and quite untested guess).
I'd like to release 1.10b tomorrow. Anything that must be fixed till then? For LiteralSpaceFirstSpace I'd like to have Thanh's blessing for a fix.
this fix must be tested very well -- otherwise it can break everything. Thanh
On 2003-02-25 06:58:18 +0700, The Thanh Han wrote:
this fix must be tested very well -- otherwise it can break everything.
Which is why I haven't included any patch yet. Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
On 2003-02-24 16:34:37 +0100, Martin Schröder wrote:
I'd like to release 1.10b tomorrow. Anything that must be fixed
I've moved the version to 1.10b (#2932). Sebastian, would you please integrate it and update source.tar.bz2? Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
On 2003-02-26 13:09:06 +0100, Martin Schröder wrote:
I've moved the version to 1.10b (#2932). Sebastian, would you please integrate it and update source.tar.bz2?
Not yet -- Hartmut just found a potential overflow in the non-pdf-inclusion. Stay tuned. :-( Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
On 2003-02-26 15:50:45 +0100, Martin Schröder wrote:
Not yet -- Hartmut just found a potential overflow in the non-pdf-inclusion. Stay tuned. :-(
#2933 should fix this. if not is_pdf_image(image) then begin pdf_print_real(ext_xn_over_d(pdf_width(p), 10000, one_bp), 4); {1000000,6 leads to overflows with large images} pdf_print(" 0 0 "); pdf_print_real(ext_xn_over_d(pdf_height(p) + pdf_depth(p), 10000, one_bp), 4); {1000000,6 leads to overflows with large images} pdf_out(" "); pdf_print_bp(pdf_x(cur_h)); pdf_out(" "); pdf_print_bp(pdf_y(cur_v)); end Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
Hi Martin, Can you also add a primitive \pdftrailer which acts like the catalog but adds content to the trailer object? We may need this for reaching pdf/x compatibility. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
On 2003-02-26 19:01:18 +0100, Hans Hagen wrote:
Can you also add a primitive \pdftrailer which acts like the catalog but adds content to the trailer object? We may need this for reaching pdf/x compatibility.
Will do in 1.11a Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Grazer Straße 8, D-28359 Bremen Voice +49 421 20419-44 / Fax +49 421 20419-10
On 2003-02-26 20:34:46 +0100, Martin Schröder wrote:
On 2003-02-26 19:01:18 +0100, Hans Hagen wrote:
Can you also add a primitive \pdftrailer which acts like the catalog but adds content to the trailer object? We may need this for reaching pdf/x compatibility.
Will do in 1.11a
#3321: - New command \pdftrailer analogue to \pdfcatalog whose argument end up in the trailer dictionary. Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
On Wed, Feb 26, 2003 at 01:09:06PM +0100, Martin Schroeder wrote:
I've moved the version to 1.10b (#2932). Sebastian, would you please integrate it and update source.tar.bz2?
TeX Live source is now in sync in this area, along with teTeX 2.0.2 -- Sebastian Rahtz OUCS Information Manager 13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
Hi pdftex fans,
function convertNumToPDF() has the feature, that if it gets numbers with
6 nonzero digits after the decimal point, it will not append a '\0' to
the number string in the buffer. Then you get more than 6 digits after
the point: whatever is left in the buffer until the next '\0'. And the
rounding isn't clear. In the patched version below the rounding is at
+/- 1/2 eps; the check for small numbers can be omitted by the way.
Here is the output from the test program below for some numbers:
input <orig> <patched>
10.00005000 <10.000049> <10.00005>
2.12345600 <2.1234569> <2.123456>
0.00000040 <0> <0>
0.00000050 <0> <0.000001>
0.00000100 <0.0000019> <0.000001>
9.00000000 <9> <9>
9.99999940 <9.9999999> <9.999999>
9.99999950 <9.9999999> <10>
9.99999990 <9.9999999> <10>
10.00000040 <10> <10>
10.00000050 <10> <10.000001>
10.00000100 <10> <10.000001>
10.00000200 <10.000002> <10.000002>
9.99999990 <9.9999992> <10>
9.49999949 <9.4999992> <9.499999>
9.49999950 <9.4999992> <9.5>
9.49999951 <9.4999992> <9.5>
Below is the program for producing this list with the patch. Have fun.
Greetings Hartmut
#include
On 2003-02-17 23:00:16 +0100, Hartmut Henkel wrote:
Below is the program for producing this list with the patch. Have fun.
Thanks. It's in (#2896). Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
Hi pdfTeX fans, in the last few days I have fiddled around with application of AVL trees, and as an experiment replaced the linked list PdfDocuments in file pdftoepdf.cc by an AVL search tree. It was quite straight-forward. Once the coredumps go away, it works :-) The patch you find on my homepage: w w w . c i r c u i t w i z a r d . d e I use the nice AVL implementation GNU libavl by Ben Pfaff, it is compact, looks very mature/stable, extremely well documented, and it's unter the GNU Public License, Good. These AVL trees give a pretty high lookup speed, so one probably might give them a try for other dictionary lookup tasks within pdfTeX. (However I already failed miserably before, when trying to replace the fm_tab list for mapfile entries by such an AVL tree. The fm_tab list stuff is so widely scattered over many places within the pdftex sources, that a replacement by a search tree would be a major overhaul; but it seems to be possible. Anyway we have the nice hashing by Heiko.) The patch is still rather raw, but as it basically does the wanted, I thought I should push it out for discussion. Greetings Hartmut
Hi, I would prefer using consistent structure. Thus if we consider using libavl reasonable, we should use it everywhere when possible. I think apart from a few typographic extensions which are rarely used, the only strength of pdftex is speed, so yes we need to pay attention to this. For average users it doesn't make much sense, but for some applications it might be quite a plus. Thanh On Thu, Feb 20, 2003 at 12:11:51AM +0100, Hartmut Henkel wrote:
Hi pdfTeX fans,
in the last few days I have fiddled around with application of AVL trees, and as an experiment replaced the linked list PdfDocuments in file pdftoepdf.cc by an AVL search tree. It was quite straight-forward. Once the coredumps go away, it works :-) The patch you find on my homepage:
w w w . c i r c u i t w i z a r d . d e
I use the nice AVL implementation GNU libavl by Ben Pfaff, it is compact, looks very mature/stable, extremely well documented, and it's unter the GNU Public License, Good.
These AVL trees give a pretty high lookup speed, so one probably might give them a try for other dictionary lookup tasks within pdfTeX.
(However I already failed miserably before, when trying to replace the fm_tab list for mapfile entries by such an AVL tree. The fm_tab list stuff is so widely scattered over many places within the pdftex sources, that a replacement by a search tree would be a major overhaul; but it seems to be possible. Anyway we have the nice hashing by Heiko.)
The patch is still rather raw, but as it basically does the wanted, I thought I should push it out for discussion.
Greetings Hartmut
_______________________________________________ ntg-pdftex mailing list ntg-pdftex@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-pdftex
Hi, there's another _experimental_ patch: I have replaced the fm_tab array for fontmaps in pdftex by two AVL trees, and modified the fmlookup(), tfmoffm() etc. functions accordingly. Now the pdffontmap list in pdftex.ch contains pointers (instead of indices) to the fm_entry entries. The mapfile reading speed then is great: 100000 lines of mapfile need a fraction of a second on my 400 MHz PC. AVL in principle allows to replace fm_entry entries while filling the tree. Beware: The patch is buggy, most likely around reading TT fontmaps, as I need to understand things around the mk_ext_fm() function; never came along TTFs. For the curious, the patch is at w w w . c i r c u i t w i z a r d . d e Greetings Hartmut On Thu, 20 Feb 2003, The Thanh Han wrote:
Hi,
I would prefer using consistent structure. Thus if we consider using libavl reasonable, we should use it everywhere when possible.
At 07:19 PM 2/23/2003 +0100, Hartmut Henkel wrote:
Hi,
there's another _experimental_ patch: I have replaced the fm_tab array for fontmaps in pdftex by two AVL trees, and modified the fmlookup(), tfmoffm() etc. functions accordingly. Now the pdffontmap list in pdftex.ch contains pointers (instead of indices) to the fm_entry entries.
The mapfile reading speed then is great: 100000 lines of mapfile need a fraction of a second on my 400 MHz PC. AVL in principle allows to replace fm_entry entries while filling the tree. Beware: The patch is buggy, most likely around reading TT fontmaps, as I need to understand things around the mk_ext_fm() function; never came along TTFs.
interesting, i wonder how complicated it is to have such trees accessible by primitives (\newhash, \sethash, \gethash) in order to store strings (later to be processed by scantokens or so). Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
It seems that currently pdftex deletes/re-reads documents when they are to be multiply included, see the log for a 4-page pdf file, its page 1 included by: \pdfximage width \hsize page 1 {prod_brochure.pdf} \hbox{\pdfrefximage\pdflastximage} \vfill\eject \pdfximage width \hsize page 1 {prod_brochure.pdf} \hbox{\pdfrefximage\pdflastximage} \vfill\eject \end See the log below. Shouldn't such a request include the file only once, and later only make a reference to the first page object? When I uncomment the (pdf_doc->occurence)--; line, I get much smaller file size, 120278 bytes in this case. Is the occurence stuff broken, or do I do something wrong? Greetings Hartmut Log (with #define DEBUG): This is pdfTeX, Version 3.14159-1.10a (Web2C 7.4.5) (./y.tex{/usr/local/teTeX/share/texmf/pdftex/config/pdftex.cfg} Creating ./prod_brochure.pdf (0) Reading information on ./prod_brochure.pdf [1{/usr/local/t eTeX/share/texmf/dvips/config/pdftex.map} <./prod_brochure.pdf Decrementing ./prod_brochure.pdf (-1)
Deleting ./prod_brochure.pdf ] Creating ./prod_brochure.pdf (0) Reading information on ./prod_brochure.pdf [2 <./prod_bro chure.pdf Decrementing ./prod_brochure.pdf (-1)
Deleting ./prod_brochure.pdf ] ){/usr/local/teTeX/share/texmf/dvips/tetex/f7b6d320.enc} Output written on y.pdf (2 pages, 229447 bytes). Transcript written on y.log.
On 2003-02-20 00:32:05 +0100, Hartmut Henkel wrote:
\pdfximage width \hsize page 1 {prod_brochure.pdf} \hbox{\pdfrefximage\pdflastximage} \vfill\eject \pdfximage width \hsize page 1 {prod_brochure.pdf} \hbox{\pdfrefximage\pdflastximage} \vfill\eject \end
See the log below. Shouldn't such a request include the file only once, and later only make a reference to the first page object? When I
No. That would work if you commented out line 3 in the example (with pdftex.def that happens automagically). You tell pdftex to include prod_brochure.pdf twice. :-) Best regards Martin -- Martin Schröder, MS@ArtCom-GmbH.DE ArtCom GmbH, Lise-Meitner-Str 5, 28359 Bremen, Germany Voice +49 421 20419-44 / Fax +49 421 20419-10
participants (8)
-
Hans Hagen
-
Hartmut Henkel
-
Heiko Oberdiek
-
Martin Schroeder
-
Sebastian Rahtz
-
The Thanh Han
-
Thomas Esser
-
Tom Kacvinsky