diff s4-funcs.sh @ 1038:b8b1b8356b94 draft

Add translation of |>| for colspan, |^ for rowspan
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 06 Apr 2024 18:03:05 +0900
parents ae88ca565d08
children 78e904f9be34
line wrap: on
line diff
--- a/s4-funcs.sh	Wed Mar 06 09:55:20 2024 +0900
+++ b/s4-funcs.sh	Sat Apr 06 18:03:05 2024 +0900
@@ -693,7 +693,31 @@
   sed -n '
 	/^|.*|/ {;	# If the line begin with "|" and has 2 or more "|"
 	 s,|$,,;				# Remove trailing "|" first
+	 s,|\* *&gt;&gt;&gt;&gt;&gt;&gt;|\([^|]*\) *,<th colspan="7">\1</th>,g;
+	 s,|\* *&gt;&gt;&gt;&gt;&gt;|\([^|]*\) *,<th colspan="6">\1</th>,g;
+	 s,|\* *&gt;&gt;&gt;&gt;|\([^|]*\) *,<th colspan="5">\1</th>,g;
+	 s,|\* *&gt;&gt;&gt;|\([^|]*\) *,<th colspan="4">\1</th>,g;
+	 s,|\* *&gt;&gt;|\([^|]*\) *,<th colspan="3">\1</th>,g;
+	 s,|\* *&gt;|\([^|]*\) *,<th colspan="2">\1</th>,g;
+	 s,|\* *^^^^^^\([^|]*\) *,<th rowspan="7">\1</th>,g;
+	 s,|\* *^^^^^\([^|]*\) *,<th rowspan="6">\1</th>,g;
+	 s,|\* *^^^^\([^|]*\) *,<th rowspan="5">\1</th>,g;
+	 s,|\* *^^^\([^|]*\) *,<th rowspan="4">\1</th>,g;
+	 s,|\* *^^\([^|]*\) *,<th rowspan="3">\1</th>,g;
+	 s,|\* *^\([^|]*\) *,<th rowspan="2">\1</th>,g;
 	 s,|\* *\([^|]*\) *,<th>\1</th>,g;	# "|*..." to "<th>...</th>"
+	 s,| *&gt;&gt;&gt;&gt;&gt;&gt;|\([^|]*\) *,<td colspan="7">\1</td>,g;
+	 s,| *&gt;&gt;&gt;&gt;&gt;|\([^|]*\) *,<td colspan="6">\1</td>,g;
+	 s,| *&gt;&gt;&gt;&gt;|\([^|]*\) *,<td colspan="5">\1</td>,g;
+	 s,| *&gt;&gt;&gt;|\([^|]*\) *,<td colspan="4">\1</td>,g;
+	 s,| *&gt;&gt;|\([^|]*\) *,<td colspan="3">\1</td>,g;
+	 s,| *&gt;|\([^|]*\) *,<td colspan="2">\1</td>,g;
+	 s,| *^^^^^^\([^|]*\) *,<td rowspan="7">\1</td>,g;
+	 s,| *^^^^^\([^|]*\) *,<td rowspan="6">\1</td>,g;
+	 s,| *^^^^\([^|]*\) *,<td rowspan="5">\1</td>,g;
+	 s,| *^^^\([^|]*\) *,<td rowspan="4">\1</td>,g;
+	 s,| *^^\([^|]*\) *,<td rowspan="3">\1</td>,g;
+	 s,| *^\([^|]*\) *,<td rowspan="2">\1</td>,g;
 	 s,| *\([^|]*\) *,<td>\1</td>,g;	# "|..."  to "<td>...</td>"
 	 s,^,<tr>,; s,$,</tr>,;		# Enclose with "<tr>" and "</tr>"
 	 H;				# Concat this line to HoldSpace

yatex.org