How are graphics supposed to look like?

I have been using an appimage of Texmacs 2.1.1, but recently switched to version 2.1.2 from this link: specifically, texmacs-2.1.2.svn13867+extras-0-x86_64.pkg.tar.zst.

I’ve noticed that figures look blurry now.

Using the appimage (v 2.1.1):

Using the version from the link:

What’s going on?

Does this happen with all graphics formats?

I tried a png image; that displayed fine (no blur). It seems that pdf images (vector graphics) are the ones affected.

Better to report it in the texmacs-user mailing list, maybe TeXmacs has been build without Ghostscript, or something in this direction. Alternative explanation: PDF files are externally converted to PNG with the wrong resolution. This should not happen. What is the result of exporting to PDF the document?

Exporting to pdf is fine. It is blurry during editing. As I mentioned, this was not the case in version 2.1.1 (at least, the appimage I was using).

I don’t see this on the my build of the most recent SVN. Could you try to

  1. run TeXmacs from the terminal
  2. Turn on Tools->Debugging tool
  3. Turn on Debug->convert
  4. Insert an image
  5. Check the terminal for output

For me pdf gets converted using gs. Perhaps Ghostscript is missing on your system or TeXmacs can’t find it.

The link is a build of mine, and I guess the Appimage was too. In the 2.1.2 builds, I applied which modifies a bit image handling and that could be the (unexpected) cause of what you see. Specifically, external image converters called from scheme were modified, and details may depend on the converters TeXmacs finds on your machine – I did not observe your issue during my tests, but I cannot test all configurations. In any case, running with debug-convert as Jeroen suggests will probably explain why the images look different.

Note that there are also Appimages for 2.1.2 (two of them actually, a qt4 and a qt5 version, see You could perhaps check if they have the same issue as the arch package? (I expect they do)

1 Like

Thanks for writing this nice patch, @pjoyez! I have applied your patch to the latest svn and I get clear images. debug-convert tells me gs is being used. It would good to know what output @hamorabi is getting.

I do get an error from the line (test-version-num "inkscape -V" "Inkscape " 0.92). Executing inkscape -v returns 1.2 (dc2aedaf03, 2022-05-15), which doesn’t work with the function.

Perhaps something like this could work?

 (define (all-ints? l)
  (if (null? l) #t
      (and-with f (string->number (car l))
          (if (integer? f) (all-ints? (cdr l)) #f))))

(define (test-version-num cmd key minv1 minv2)
  (with a (eval-system cmd)
    (if (string-null? a)
      (with st (if (string-null? key) 
               0 (string-search-forwards key 0 a))
        (if (== st -1)
            ((a (string-split (substring a st) #\space))
             (a (map (lambda s (string-split (car s) #\.)) a))
             (a (filter all-ints? a))
             (v1 (string->number (first (car a))))
             (v2 (string->number (second (car a)))))
               (or (> v1 minv1)
                 (and (== v1 minv1) (>= v2 minv2)))))))))

Thank you Jeroen, for pointing to the fragility of the version checking and for your proposed fix. I’ll update the patch to make it work with Inkscape 1.2.

1 Like