From e49bff397dae0b55e91ab9d79c3d7870be9063d6 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Wed, 30 Aug 2017 00:06:57 +0430 Subject: [PATCH] tmac.tbl: tblrow should be called for each row --- demo_fa/fa.ms | 3 +++ tmac/tmac.tbl | 27 +++++++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/demo_fa/fa.ms b/demo_fa/fa.ms index 5699e74..c51cc7e 100644 --- a/demo_fa/fa.ms +++ b/demo_fa/fa.ms @@ -51,16 +51,19 @@ . tblmac fa.tblhd fa.tblhd . tblrow "توصیف" "عنوان" . tblmac fa.tblfb fa.tblfb +. tblrow . tblcol 1 برای جزئیات بیشتر، به یکی از منابعی که استفاده از این پیش‌پردازشگر را شرح می‌دهند، مراجعه کنید. . tblcol 2 جدول با پیش‌پردازشگر \*[en tbl] +. tblrow . tblcol 1 برای اطلاعات بیشتر در مورد ماکروهای این بسته، به پیاده‌سازی آن )\*[en neatroff_make/tmac/tmac.tbl]( مراجعه نمایید. . tblcol 2 جدول با استفاده از بسته‌ی \*[en tbl] +. tblrow . tblcol 1 با استفاده از \*[en tab] و درخواست \*[en ta] می‌توان داده‌هایی را به صورت منظم نمایش داد. این diff --git a/tmac/tmac.tbl b/tmac/tmac.tbl index 6b0ed9b..6bbf1cc 100644 --- a/tmac/tmac.tbl +++ b/tmac/tmac.tbl @@ -14,12 +14,12 @@ .\" col is 1). .\" .\" .tblrow "column #1" "column #2" ... -.\" The compact way of specifying the contents of a table row (instead -.\" of calling .tblcol for every column). +.\" Starts a new row. Parameters provide a compact way of +.\" specifying the contents of a table row (instead of calling +.\" .tblcol for every column). .\" .\" .tblcol col -.\" Begins column number col for the current row. With an argument of -.\" 1, a new row is inserted. +.\" Begins column number col for the current row. .\" .\" .tblmac mac1 mac2 ... .\" Before writing the contents of each column, the corresponding @@ -38,7 +38,9 @@ .nr tblboxall 0 .nr tblboxrow 0 .nr tblboxcol 0 -.nr tblrowaut 1 +.nr tblbrdrsz 30 \" border point size +.nr tblvertsz 16 \" vertical line point size +.nr tblhorisz 16 \" horizontal line point size .de tblrst . in 0 .. @@ -80,12 +82,13 @@ . ll -\\n[tblgap]u .. .de tblcolend +. br . nr tblcol.ok 0 . if \\n(.d>\\n[tblrow.bot] .nr tblrow.bot \\n(.d .. .de tblrowbeg . tblrst -. if (\\n[tblboxall]+\\n[tblboxrow])&(\\n[tblrow.one]) \D'l \\n[tblwid]u 0' +. if (\\n[tblboxall]+\\n[tblboxrow])&(\\n[tblrow.one]) \s[\\n[tblbrdrsz]]\D'l \\n[tblwid]u 0'\s[] . br . nr tblrow.ok 1 . nr tblrow.one 0 @@ -100,18 +103,25 @@ . nr tblht \\n[tblrow.bot]u-\\n[tblrow.top]u+.5v . sp -.5v . if \\n[tblboxall]:\\n[tblboxcol] \{\ +. ps \\n[tblbrdrsz] \h'|0'\D'l 0 -\\n[tblht]u'\v'\\n[tblht]u'\ \h'|\\n[tblwid]u'\D'l 0 -\\n[tblht]u'\v'\\n[tblht]u' +. ps . sp -1 . \} . if \\n[tblboxcol] \{\ +. ps \\n[tblvertsz] \h'|\\n[tblwid1]u'\D'l 0 -\\n[tblht]u'\v'\\n[tblht]u'\ \h'|\\n[tblwid1]u+\\n[tblwid2]u'\D'l 0 -\\n[tblht]u'\v'\\n[tblht]u'\ \h'|\\n[tblwid1]u+\\n[tblwid2]u+\\n[tblwid3]u'\D'l 0 -\\n[tblht]u'\v'\\n[tblht]u' +. ps . sp -1 . \} . if \\n[tblboxrow]:(\\n[tblboxall]&\\$1) \{\ +. ie \\$1 .ps \\n[tblbrdrsz] +. el .ps \\n[tblhorisz] \h'|0'\D'l \\n[tblwid]u 0' +. ps . sp -1 . \} . sp @@ -119,11 +129,12 @@ .de tblcol . br . if \\n[tblcol.ok] .tblcolend \\$1 -. if \\$1=1&\\n[tblrowaut] .if \\n[tblrow.ok] .tblrowend 0 -. if \\$1=1&\\n[tblrowaut] .tblrowbeg . tblcolbeg \\$1 +. if \\n(.$>=2 \\$2 .. .de tblrow +. if \\n[tblrow.ok] .tblrowend 0 +. tblrowbeg . if \\n(.$>=1 .tblcol 1 . if \\n(.$>=1 \\$1 . if \\n(.$>=2 .tblcol 2 -- 2.11.4.GIT