changeset 587:c6a26b422d30 draft

Add-in for wraptable added
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 21 Sep 2022 21:34:29 +0900
parents 91a6b97d01fa
children 44c9b313c68d
files help/YATEXHLP.eng help/YATEXHLP.jp yatexadd.el
diffstat 3 files changed, 31 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/help/YATEXHLP.eng	Wed Sep 21 11:08:21 2022 +0900
+++ b/help/YATEXHLP.eng	Wed Sep 21 21:34:29 2022 +0900
@@ -1765,6 +1765,12 @@
  \caption{foo image}\label{foo-jpg}
 \end{wrapfigure}
 
+wraptable
+\begin{wraptable}[LINES]{POS}[OVH]{WIDTH} ...TABULAR... \end{wraptable}
+Create floating tabular.
+Usage is the same as wrapfigure environment except enclosing tabular.
+
+<refer wrapfigure>
 
 abstract
 \begin{abstract} ... \end{abstract}
--- a/help/YATEXHLP.jp	Wed Sep 21 11:08:21 2022 +0900
+++ b/help/YATEXHLP.jp	Wed Sep 21 21:34:29 2022 +0900
@@ -1771,6 +1771,7 @@
 OVH(省略可)	画像の張り出しマージン(\wrapoverhang 通常0)
 WIDTH		回り込みする(画像込みの)幅
 
+
 【使用例】
 % プリアンブル
 \usepackage{wrapfig}
@@ -1780,6 +1781,13 @@
  \caption{ほげほげ}\label{hoge-jpg}
 \end{wrapfigure}
 
+wraptable
+\begin{wraptable}[LINES]{POS}[OVH]{WIDTH} ...表... \end{wraptable}
+左右回り込みの表を出力する(table環境と同様のフロート作成)。
+内部にtabular系を入れる点以外についてはwrapfigureと同様。
+
+<refer wrapfigure>
+
 abstract
 \begin{abstract} ... \end{abstract}
 抄録(アブストラクト)を出力する。
--- 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