[Top][All Lists]

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

[bug #63749] [tbl] available line length mismeasured when box option or

From: G. Branden Robinson
Subject: [bug #63749] [tbl] available line length mismeasured when box option or vertical lines used
Date: Fri, 3 Feb 2023 16:50:56 -0500 (EST)

Update of bug #63749 (project groff):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 


Follow-up Comment #1:

commit ad70899cb0c4dcf28fc95447ccc33bd8660cf719
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 3 12:55:23 2023 -0600

    [tbl]: Fix Savannah #63640 and #63749.
    [tbl]: Fix bugs using boxes or vertical rules at table edges on nroff
    devices, particularly when combined with region or column expansion.
    * src/preproc/tbl/table.h (class table): Add `GAP_EXPAND` enumeration
      constant.  James Clark seems to have designed GNU tbl carefully to
      avoid distinguishing region expansion from column expansion in a
      categorical way, but I needed a way for formatting-time logic to know
      which was in use.  (Column expansion, the "x" modifier, expands
      columns--i.e., text.  Region expansion expands [or compresses] the
      _gaps_ between columns.)
    * src/preproc/tbl/main.cpp (process_options): Set `GAP_EXPAND` flag in
      table if "expand" region option seen.
    * src/preproc/tbl/table.cpp: Add new macro `LEFTOVER_FACTOR_REG` to name
      a new roff register for the remainder of gap-expansion space when the
      amount of space available for expansion is divided by the number of
      (table::compute_overall_width): If _not_ expanding a table in
      either respect and in nroff mode, reduce line length by 1n for each of
      any left and right border (because the vertical lines eat character
      cells).  This prevents bordered or boxed tables from being overset
      even when they use neither expansion feature.
      (table::compute_separation_factor): If gap-expanding a table, store
      any remainder from the division used to compute the separation factor
      into the new `LEFTOVER_FACTOR_REG`.
      (table::compute_column_positions): Insert that remainder into the gap
      before the last (rightmost) column of the table.  This _could_ be done
      more elegantly by spreading each en in a symmetric way across a subset
      of the gaps.  (It is necessarily a subset by the pigeonhole
      principle.)  But it didn't seem worth the effort for a feature (region
      expansion) that few users employ.  (Usually what you want is the "x"
      column modifier.)  Alternatively, "forget it, Jake--it's a terminal
    * src/preproc/tbl/tbl.am (tbl_XFAIL_TESTS): Remove now-passing tests.
    Fixes <https://savannah.gnu.org/bugs/?63640> and


Reply to this item at:


Message sent via Savannah

reply via email to

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