BTW, Iād like to customize the background color and zoom level of the tooltip. I looked up the definition of the package and find the relevant definition for preview-reference:
(tm-define (preview-reference body body*)
(:secure #t)
(and-with ref (tree-up body)
(with (x1 y1 x2 y2) (tree-bounding-rectangle ref)
(and-let* ((id (and (tree-atomic? body*) (tree->string body*)))
(tip (and id (ref-preview id))))
(show-tooltip id ref tip "auto" "auto" "default" 0.6)))))
Then I looked up the definition of show-tooltip and find 0.6 should be related to the zoom level. But set the value to 1.0 is not 100% zoom level. I didnāt find a place to customize the background color.
I see the preview works if using absolute path. How to make absolute path the default when we insert the image through system file browser?
This is not always what you want. Usually images are in the same directory as the document. I think is a problem of the preview package. Preview does not limit itself to show you the part of the document which is references, but essentially retypeset that part in the pop-up window (which is a separate document). It seems that at that stage the typesetter does not have access to the path of the original document, so cannot figure out where the image is. I think it should be fixable (and to be fixed).Preformatted text
I encountered another problem. Some pictures are cropped no matter what size I use, or I use it inside figure or not. But the exported (printed) pdf document displays the correct images.
No problem at all if inserting image not by link. My pictures are all in pdf format.
Probably there is something wrong in the conversion to bitmap of the PDF, can you file a bug in savannah (https://savannah.gnu.org/projects/texmacs) with one of problematic images? Thanks!
BTW, the pdf is created in MATLAB by the āexportgraphicsā command. The problem occurs only if I choose āimageā as the value for the option āContentTypeā in this command. If I choose āvectorā, then the image is displayed correctly. Of course, the pdf opens correctly in any pdf viewer in both cases. The pdf file can become very large if I choose the āvectorā option.
I canāt reproduce the issue here. Could you please tell us the OS, TeXmacs version and origin of the build (texmacs.org, distro repo, OBS, self-build, otherā¦)
Apple M2 Max, OS 13.4.1 (22F82). TeXmacs 2.1.2, installed from the latest build in github.
Sometimes the images are not cropped but padded with more a big white space, and the issue can get fixed by restarting TeXmacs.
I can reproduce the problem now. I turned on the debug menu and activate debug->convert. The error message says something like āimage size blahblah in cache 1000x300ā, which is wrong, because my image is 1000x400. My previous image in this Figure was 1000x300.
Once I closed and reopen the editor, the problem is gone. So the reason is the cache is not cleared after the image is changed? I tried update everything, but no luck. How do I clear cache manually?
BTW, the bug was closed by Joris. How can I reopen it?