emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] elpa 4770a35 12/23: TikZ: Add prompting for TikZ's \node macro.


From: Tassilo Horn
Subject: [elpa] elpa 4770a35 12/23: TikZ: Add prompting for TikZ's \node macro.
Date: Wed, 30 Mar 2016 19:08:03 +0000

branch: elpa
commit 4770a356b8ce771b09c5ebd3286c15d0f20c2e17
Author: Matthew Leach <address@hidden>
Commit: Matthew Leach <address@hidden>

    TikZ: Add prompting for TikZ's \node macro.
    
    * style/tikz.el (TeX-TikZ-node-arg): New.
---
 style/tikz.el |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/style/tikz.el b/style/tikz.el
index a877cb8..d002811 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -167,11 +167,21 @@ functions.")
                                           "Coordinate point type: ")))
     (insert options " " name " at" point ";")))
 
+(defun TeX-TikZ-node-arg (optional)
+  "Prompt the user for the arguments to a TikZ node macro."
+  (let ((options (TeX-TikZ-arg-options t))
+        (name (TeX-TikZ-arg-name nil))
+        (point (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map
+                                          "Node point type: "))
+        (text (TeX-TikZ-arg-text nil)))
+    (insert options " " name  " at" point text ";")))
+
 (TeX-add-style-hook
  "tikz"
  (lambda ()
    (TeX-add-symbols
     '("draw" (TeX-TikZ-draw-arg))
-    '("coordinate" (TeX-TikZ-coordinate-arg)))
+    '("coordinate" (TeX-TikZ-coordinate-arg))
+    '("node" (TeX-TikZ-node-arg)))
    (LaTeX-add-environments
     '("tikzpicture"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]