Update of bug #64454 (project groff): Status: In Progress => Need Info
_______________________________________________________ Follow-up Comment #9: Hi наб, I think the problem is more that I made a dumbass mistake and forgot to make the downward half-line spacing _conditional on the table cell being staggered in the first place_. Duh. Here's a new diff. I'm also attaching a tar archive of inputs, your base64-encoded one and changes I made to it to explore other possibilities. diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp index bf4167303..c288a65af 100644 --- a/src/preproc/tbl/table.cpp +++ b/src/preproc/tbl/table.cpp @@ -59,6 +59,7 @@ const int DEFAULT_COLUMN_SEPARATION = 3; #define NEEDED_REG PREFIX "needed" #define REPEATED_MARK_MACRO PREFIX "rmk" #define REPEATED_VPT_MACRO PREFIX "rvpt" +#define TEXT_BLOCK_STAGGERING_MACRO PREFIX "sp" #define SUPPRESS_BOTTOM_REG PREFIX "supbot" #define SAVED_DN_REG PREFIX "dn" #define SAVED_HYPHENATION_MODE_REG PREFIX "hyphmode" @@ -677,7 +678,7 @@ void block_entry::position_vertically() " CENTER, or BOTTOM"); } if (mod->stagger) - prints(".sp -.5v\n"); + prints("." TEXT_BLOCK_STAGGERING_MACRO " -.5v\n"); } int block_entry::divert(int ncols, const string *mw, int *sep, int do_expand) @@ -777,6 +778,8 @@ void left_block_entry::print() { printfs(".in +\\n[%1]u\n", column_start_reg(start_col)); printfs(".%1\n", block_diversion_name(start_row, start_col)); + if (mod->stagger) + prints("." TEXT_BLOCK_STAGGERING_MACRO " .5v\n"); prints(".in\n"); } @@ -793,6 +796,8 @@ void right_block_entry::print() span_width_reg(start_col, end_col), block_width_reg(start_row, start_col)); printfs(".%1\n", block_diversion_name(start_row, start_col)); + if (mod->stagger) + prints("." TEXT_BLOCK_STAGGERING_MACRO " .5v\n"); prints(".in\n"); } @@ -809,6 +814,8 @@ void center_block_entry::print() span_width_reg(start_col, end_col), block_width_reg(start_row, start_col)); printfs(".%1\n", block_diversion_name(start_row, start_col)); + if (mod->stagger) + prints("." TEXT_BLOCK_STAGGERING_MACRO " .5v\n"); prints(".in\n"); } @@ -833,6 +840,8 @@ void alphabetic_block_entry::print() span_width_reg(start_col, end_col), span_alphabetic_width_reg(start_col, end_col)); printfs(".%1\n", block_diversion_name(start_row, start_col)); + if (mod->stagger) + prints("." TEXT_BLOCK_STAGGERING_MACRO " .5v\n"); prints(".in\n"); } @@ -1847,6 +1856,10 @@ void table::init_output() ".nr " NEED_BOTTOM_RULE_REG " 1\n" ".nr " SUPPRESS_BOTTOM_REG " 0\n" ".eo\n" + ".de " TEXT_BLOCK_STAGGERING_MACRO "\n" + ". ie !'\\n(.z'' \\!.3sp \"\\$1\"\n" + ". el .sp \\$1\n" + "..\n" ".de " REPEATED_MARK_MACRO "\n" ". mk \\$1\n" ". if !'\\n(.z'' \\!." REPEATED_MARK_MACRO " \"\\$1\"\n" Does this work better for you? (file #55013) _______________________________________________________ Additional Item Attachment: File name: savannah-64454.tar Size:40 KB <https://file.savannah.gnu.org/file/savannah-64454.tar?file_id=55013> _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?64454> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/