{"id":2250,"date":"2009-02-08T18:05:42","date_gmt":"2009-02-08T09:05:42","guid":{"rendered":"http:\/\/yasu2.prosou.nu\/blog\/index.php\/2009\/02\/08\/tgif_embed_eps\/"},"modified":"2009-02-08T18:05:42","modified_gmt":"2009-02-08T09:05:42","slug":"tgif_embed_eps","status":"publish","type":"post","link":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/2009\/02\/08\/2250\/","title":{"rendered":"Tgif + embed EPS"},"content":{"rendered":"<p>While I&#8217;m writing a document of <a href=\"http:\/\/murasaki.dna.bio.keio.ac.jp\/gmv.html\">GMV<\/a>, I&#8217;ve found that I need to draw boxes, circles, arrows and text on screenshot. I love drawing figures with <a href=\"\">Tgif<\/a>, but Tgif isn&#8217;t good at handling pixel images (of course, it can import XPM, PNG and other image files, but I&#8217;m not satisfied with the result&#8230;). The best solution may be:<br \/>\n1. Convert the underlying image to EPS by ImageMagick (the &#8220;convert&#8221; command)<br \/>\n2. Then import it to a Tgif figure by &#8220;Embed EPS File&#8221; command<br \/>\nBecause ImageMagick does good conversion and Tgif doesn&#8217;t touch the embedded EPS itself. However, Tgif doesn&#8217;t recognize the size of EPS correctly by default. This is because Tgif calls GhostScript directly and this can be fixed by setting X resource for Tgif:<br \/>\nTgif.PsToXbm: convert &#8220;%s&#8221; xbm:-<br \/>\nTgif.AutoEPSPreviewBitmap: true<br \/>\nThis is what I wrote in my ~\/.Xresources. Tgif detects the right geometry, and the EPS preview to draw overlying figure is much better than that from GS \ud83d\ude42<br \/>\nAnyway&#8230; I have to go back to documentation \ud83d\ude41 \ud83d\ude41 \ud83d\ude41<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While I&#8217;m writing a document of GMV, I&#8217;ve found that I need to draw boxes, circles, arrows and tex &hellip; <a href=\"https:\/\/yasu2.prosou.nu\/blog\/index.php\/2009\/02\/08\/2250\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Tgif + embed EPS&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-2250","post","type-post","status-publish","format-standard","hentry","category-unix-"],"_links":{"self":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2250"}],"version-history":[{"count":0,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2250\/revisions"}],"wp:attachment":[{"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yasu2.prosou.nu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}