diff yatexadd.el @ 587:c6a26b422d30 draft

Add-in for wraptable added
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 21 Sep 2022 21:34:29 +0900
parents 907de32064c9
children e3b7e199a87d
line wrap: on
line diff
--- a/yatexadd.el	Wed Sep 21 11:08:21 2022 +0900
+++ b/yatexadd.el	Wed Sep 21 21:34:29 2022 +0900
@@ -1,6 +1,6 @@
 ;;; yatexadd.el --- YaTeX add-in functions -*- coding: sjis -*-
 ;;; (c)1991-2019 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sat Dec  4 07:11:07 2021 on firestorm
+;;; Last modified Wed Sep 21 21:22:37 2022 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -193,15 +193,22 @@
 
 
 ;; wrapfig.sty
-(defun YaTeX:wrapfigure ()
-  (YaTeX-help "wrapfigure")
-  (concat
-   (let ((lines (YaTeX-read-string-or-skip "Wrap Lines(Optional): ")))
-     (if (string< "" lines)
-	 (concat "[" lines "]")))
-   "{" (YaTeX:read-oneof "rlioRLIO" t) "}"
-   "{" (YaTeX:read-length "Image width: ") "}"))
- 
+(defun YaTeX:wrapfigure (&optional kind)
+  (setq kind (or kind "figure"))
+  (YaTeX-help (concat "wrap" kind))
+  (prog1
+      (concat
+       (let ((lines (YaTeX-read-string-or-skip "Wrap Lines(Optional): ")))
+	 (if (string< "" lines)
+	     (concat "[" lines "]")))
+       "{" (YaTeX:read-oneof "rlioRLIO" t) "}"
+       "{" (YaTeX:read-length (concat (capitalize kind) " width: ")) "}")
+    (setq YaTeX-section-name "includegraphics")))
+
+(defun YaTeX:wraptable ()
+  (prog1
+      (YaTeX:wrapfigure "table")
+    (setq YaTeX-env-name "tabular")))
 
 ;;;
 ;;Sample functions for section-type command.

yatex.org