Sunday, 15 April 2012

Loading drawing program through emacs -



Loading drawing program through emacs -

i'm looking way integrate drawing programme emacs. write lecture notes in latex using emacs. problem when presenter draws diagram start scramble draw out diagram, save it, , type location tex file in reasonable time.

is possible set emacs such when press key combination drawing programme load (e.g. pinta) , 1 time draw diagram, file automatically save in folder of emacs file , name of file inserted emacs through

\includegraphics{file_name}

if feature hard implement please allow me know (i'm more happy seek out variations of idea).

edit in response comments: operating scheme ubuntu 14.04 , absolute path drawing programme /usr/bin/pinta

initial draft -- not tested -- prototype (june 22, 2014):  the next first rough draft / not tested protype of concept function thought outlined in comment beneath question original poster. because @lawlist not have ubantu os set-up, or pinta installed, lastly part of function untested -- i.e., (start-process "open-in-pinta" nil "/usr/bin/pinta" my-new-filename). if there additional command-line arguments needed start-process statement work on ubantu, please allow me know. variable form-graphic-file needs have absolute path already existing blank file created pinta programme -- file should saved in forms directory somewhere chosen user. function copy-graphic modification of function dired-do-create-files.

todo:

verify functionality of start-process statement.

convert variable form-file-graphic list string format , revise copy-graphic function accordingly.

class="lang-lisp prettyprint-override">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; \includegraphics{file_name} (defvar form-file-graphic "~/forms/my-empty-image.ora" "absolute path existing blank graphic file created `pinta'.") (defun copy-graphic (target) "this function modification of `dired-do-create-files'." (interactive (list (expand-file-name (read-file-name "copy to: " nil "diagram.ora")))) (copy-file form-file-graphic target) (insert "\\includegraphics{" (file-relative-name target) "}\n") (start-process "open-in-pinta" nil "/usr/bin/pinta" target)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

emacs drawing latex

No comments:

Post a Comment