bugGNU TeXmacs - Bugs: bug #30570, Images with size in px are not...


You are not allowed to post comments on this tracker with your current authentication level.

bug #30570: Images with size in px are not printed WYSIWYG (scaled by shrinking factor)

Submitted by:  Sam Liddicott <samjam>
Submitted on:  Wed 28 Jul 2010 06:47:44 AM UTC  
Category: NonePriority: 5 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: Release: None
Fixed Release: NoneFixed Release: 

Wed 13 Feb 2013 06:11:43 PM UTC, comment #3:

This bug has been fixed, probably when arbitrary zoom factors were implemented.

Philippe Joyez <pjoyez>
Project Member
Wed 21 Mar 2012 09:47:51 PM UTC, comment #2:

I confirm the problem reported initially but change the summary to better reflect the problem.

When you insert a bitmap image (e.g. png), the default size of the image is given in px. When you output this to ps or pdf, the image looks much larger than on screen compared to the surrounding text. Therefore, the WYSIWYG-ness of the document is lost.

See the attached files (source and pdf).

The problem is not specific to bitmaps : if you specify the size of an eps image in px, it will have the same problem. The problem is just more likely to occur with bitmaps.

(file #25438, file #25439)

Philippe Joyez <pjoyez>
Project Member
Thu 28 Jul 2011 10:16:55 PM UTC, comment #1:

I think this is a feature, not a bug. The documentation of TeXmacs lengths states:

px One screen pixel, the meaning of this unit is affected by
the shrinking factor.

So, this unit is especially made so that it is a constant size on screen.

Now, there is a complicated question of what this means for the printed document. I think the solution taken is pretty good, in that it'll print the same way it looks.

Michael Lachmann Tamarlin <ghostwheel>
Project Member
Wed 28 Jul 2010 06:47:44 AM UTC, original submission:

images imported with a pixel size:


are not re-sized with everying else in the editor according to shrinking factor.

Even worse, the larger the shrinking factor (and eveything else is shrunk on-screen) and the larger the image looks in comparison means the larger the image is actually generated in the PS or PDF output.

In other words the shrinking factor is also operating as a growing factor in PDF and PS output when operating against graphics whose size is given in pixels.

This also affects pagination

This might not be such a problem if pixel units weren't automatically chosen when linking to an image - so as it is, by default, an image import will be wrong.

At least the pixel size should be internally converted to mm using the dpi setting (but I don't think so as that is for rendering

The reason I'm using pixel size is because I get better scaling for screen-shots (where text is often one pixel wide) otherwise the screen-shots are not very readable in PDF

Sam Liddicott <samjam>
Project Member


Attached Files
file #25438:  sample-png.tm added by pjoyez (13KiB - text/texmacs)
file #25439:  sample-png.pdf added by pjoyez (557KiB - application/pdf)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by pjoyez (Updated the item)
  • -unavailable- added by ghostwheel (Posted a comment)
  • -unavailable- added by samjam (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 13 Feb 2013 06:11:43 PM UTCpjoyezStatusConfirmed=>Fixed
    Wed 21 Mar 2012 09:47:51 PM UTCpjoyezAttached File-=>Added sample-png.tm, #25438
      Attached File-=>Added sample-png.pdf, #25439
      Summarypdf generation affected by shrinking factor=>Images with size in px are not printed WYSIWYG (scaled by shrinking factor)

    Back to the top

    Powered by Savane 3.1-cleanup1