bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64454] [tbl] 'u' column modifier ("stagger") does not affect text


From: G. Branden Robinson
Subject: [bug #64454] [tbl] 'u' column modifier ("stagger") does not affect text block
Date: Fri, 4 Aug 2023 17:55:04 -0400 (EDT)

Update of bug #64454 (project groff):

                  Status:               Confirmed => In Progress            
             Assigned to:                    None => gbranden               

    _______________________________________________________

Follow-up Comment #1:

I believe I have a fix.


diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index bf4167303..f709996e5 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,7 @@ 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));
+  prints("." TEXT_BLOCK_STAGGERING_MACRO " .5v\n");
   prints(".in\n");
 }
 
@@ -793,6 +795,7 @@ 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));
+  prints("." TEXT_BLOCK_STAGGERING_MACRO " .5v\n");
   prints(".in\n");
 }
 
@@ -809,6 +812,7 @@ 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));
+  prints("." TEXT_BLOCK_STAGGERING_MACRO " .5v\n");
   prints(".in\n");
 }
 
@@ -833,6 +837,7 @@ 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));
+  prints("." TEXT_BLOCK_STAGGERING_MACRO " .5v\n");
   prints(".in\n");
 }
 
@@ -1847,6 +1852,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"




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64454>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]