Mercurial > hgrepos > hgweb.cgi > yatex
comparison yatexadd.el @ 600:6061dd3a6dec draft dev
PNG bb should be taken via extractbb
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 03 Nov 2022 10:38:02 +0859 |
parents | e3b7e199a87d |
children | cd375a3d7a29 |
comparison
equal
deleted
inserted
replaced
599:e73e41509124 | 600:6061dd3a6dec |
---|---|
1 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- | 1 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*- |
2 ;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org] | 2 ;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org] |
3 ;;; Last modified Thu Sep 22 11:41:04 2022 on firestorm | 3 ;;; Last modified Thu Nov 3 10:36:55 2022 on firestorm |
4 ;;; $Id$ | 4 ;;; $Id$ |
5 | 5 |
6 ;;; Code: | 6 ;;; Code: |
7 ;;; | 7 ;;; |
8 ;;Sample functions for LaTeX environment. | 8 ;;Sample functions for LaTeX environment. |
2130 (and (string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\|pdf\\)$" imgfile) | 2130 (and (string-match "\\.\\(jpe?g\\|png\\|gif\\|bmp\\|pdf\\)$" imgfile) |
2131 (file-exists-p imgfilepath) | 2131 (file-exists-p imgfilepath) |
2132 (or (fboundp 'yahtml-get-image-info) | 2132 (or (fboundp 'yahtml-get-image-info) |
2133 (progn | 2133 (progn |
2134 (load "yahtml" t) (featurep 'yahtml))) ;(require 'yahtml nil t) | 2134 (load "yahtml" t) (featurep 'yahtml))) ;(require 'yahtml nil t) |
2135 (if (string-match "\\.pdf" imgfile) | 2135 (if (string-match "\\.\\(pdf\\|png\\)" imgfile) |
2136 (and | 2136 (and |
2137 (setq info (YaTeX::get-boundingbox imgfilepath)) | 2137 (setq info (YaTeX::get-boundingbox imgfilepath)) |
2138 (stringp info) | 2138 (stringp info) |
2139 (string< "" info) | 2139 (string< "" info) |
2140 (setq bb (format "bb=%s" info))) | 2140 (setq bb (format "bb=%s" info))) |