bug-groff
[Top][All Lists]
Advanced

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

[bug #42978] tbl does not restore the tab settings


From: Bjarni Ingi Gislason
Subject: [bug #42978] tbl does not restore the tab settings
Date: Tue, 14 Nov 2017 20:49:31 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #2, bug #42978 (project groff):


  The example in the former contributions can not be used unaltered as the
tabs were changed to spaces, both in the web page and the e-mails.

>From b99c35f5ecd0518677fa53706807a61df01ed789 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason <address@hidden>
Date: Wed, 15 Nov 2017 01:37:37 +0000
Subject: [PATCH] src, tbl, table.cpp: Save the ".tabs" register to restore it
 later

  When "tbl" changes the tab-settings, the inital settings are not stored and
can thus not be restored at the end of its processing.

Signed-off-by: Bjarni Ingi Gislason <address@hidden>
---
 src/preproc/tbl/table.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index ad2a3064..41daed67 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -62,6 +62,7 @@ const int DEFAULT_COLUMN_SEPARATION = 3;
 #define ROW_MAX_LINE_REG PREFIX "lnmx"
 #define REPEATED_NM_SET_MACRO PREFIX "rlns"
 #define REPEATED_NM_SUS_MACRO PREFIX "rlnx"
+#define SAVED_TABS_REG PREFIX "tabs"
 
 // this must be one character
 #define COMPATIBLE_REG PREFIX "c"
@@ -1762,11 +1763,13 @@ void table::init_output()
         ".ie \\n[.u] .fi\n"
         ".el .nf\n"
         ".ce \\n[.ce]\n"
+        ".ta \\\\*[" SAVED_TABS_REG "]\n"
         "..\n"
         ".nr " SAVED_INDENT_REG " \\n[.i]\n"
         ".nr " SAVED_FONT_REG " \\n[.f]\n"
         ".nr " SAVED_SIZE_REG " \\n[.s]\n"
         ".nr " SAVED_FILL_REG " \\n[.u]\n"
+        ".ds " SAVED_TABS_REG " \\n[.tabs]\n"
         ".nr T. 0\n"
         ".nr " CURRENT_ROW_REG " 0-1\n"
         ".nr " LAST_PASSED_ROW_REG " 0-1\n"
-- 
2.15.0




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42978>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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