Check-in by ben on 2022-12-24 20:02:39
Fix format of ingredient section headings. OLD: Single cell
extra wide. NEW: Three cells merged. LibreOffice works okay
either way, but not Microsoft Word 5.5. It's better form to have
the same number of cells in each row.
INSERTED DELETED
6 2 mmrtf.awk
6 2 TOTAL over 1 changed file
Index: mmrtf.awk
==================================================================
--- mmrtf.awk
+++ mmrtf.awk
@@ -118,13 +118,17 @@
printf "\\pard\\intbl{\\b{Unit}}\\cell\n"
printf "\\pard\\intbl{\\b{Ingredient}}\\cell\n"
printf "\\row\n"
for (gsection in gsections) {
- printf "\\trowd\\trgaph%d\\trleft%d\\cellx%d\n",
- table_gap, table_left, cell3
+ printf "\\trowd\\trgaph%d\\trleft%d\n", table_gap, table_left
+ printf "\\clmgf\\cellx%d\n", cell1
+ printf "\\clmrg\\cellx%d\n", cell2
+ printf "\\clmrg\\cellx%d\n", cell3
printf "\\pard\\intbl{\\i{%s}}\\cell\n", rtf_encode(gsection)
+ printf "\\pard\\intbl{}\\cell\n"
+ printf "\\pard\\intbl{}\\cell\n"
printf "\\row\n"
ingredient_count = gsections[gsection]
for (i = 1; i <= ingredient_count; i++) {
amount = amounts[gsection, i]
unit = units[gsection, i]