소스 검색

ox-latex.el: Support for pgf files

* ox-latex.el (org-latex--inline-image): pgf is recognized as an
inline image and treated the same way tikz files.

Python matplotlib and pgfprint for Octave generates pgf plots
rather than TiKZ plots.  They need just be included via \input{.}.

TINYCHANGE
Rasmus 12 년 전
부모
커밋
bb9233ef8a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lisp/ox-latex.el

+ 2 - 2
lisp/ox-latex.el

@@ -420,7 +420,7 @@ environment."
   :type 'string)
   :type 'string)
 
 
 (defcustom org-latex-inline-image-rules
 (defcustom org-latex-inline-image-rules
-  '(("file" . "\\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\|tikz\\)\\'"))
+  '(("file" . "\\.\\(pdf\\|jpeg\\|jpg\\|png\\|ps\\|eps\\|tikz\\|pgf\\)\\'"))
   "Rules characterizing image files that can be inlined into LaTeX.
   "Rules characterizing image files that can be inlined into LaTeX.
 
 
 A rule consists in an association whose key is the type of link
 A rule consists in an association whose key is the type of link
@@ -1739,7 +1739,7 @@ used as a communication channel."
 		    (if (not (string-match "\\`\\[\\(.*\\)\\]\\'" opt)) opt
 		    (if (not (string-match "\\`\\[\\(.*\\)\\]\\'" opt)) opt
 		      (match-string 1 opt))))
 		      (match-string 1 opt))))
 	 image-code)
 	 image-code)
-    (if (equal filetype "tikz")
+    (if (member filetype '("tikz" "pgf"))
 	;; For tikz images:
 	;; For tikz images:
 	;; - use \input to read in image file.
 	;; - use \input to read in image file.
 	;; - if options are present, wrap in a tikzpicture environment.
 	;; - if options are present, wrap in a tikzpicture environment.