source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: According to the tbl(7) manual, if a data cell contains only the
@ 2022-01-12  4:43 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2022-01-12  4:43 UTC (permalink / raw)
  To: source

Log Message:
-----------
According to the tbl(7) manual, if a data cell contains only the 
two character sequence "\_" or "\=", a single or double horizontal
line is supposed to be drawn inside the cell, not joining its
neighbours.  

I am not aware of any way to do that with HTML and/or CSS.  
Still, it seems closer to the intent of the document author to draw 
a horizontal line with <hr/>, even though that line will join the
neighbour cells, rather than printing a literal '_' or '=' character.

Formatting tweak inspired by a related question from
Ted Bullock <tbullock at comlore dot com>.

Modified Files:
--------------
    mandoc:
        tbl_html.c

Revision Data
-------------
Index: tbl_html.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/tbl_html.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -Ltbl_html.c -Ltbl_html.c -u -p -r1.38 -r1.39
--- tbl_html.c
+++ tbl_html.c
@@ -1,4 +1,4 @@
-/*	$Id$ */
+/* $Id$ */
 /*
  * Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2014,2015,2017,2018,2021 Ingo Schwarze <schwarze@openbsd.org>
@@ -247,7 +247,9 @@ print_tbl(struct html *h, const struct t
 		if (dp->layout->pos == TBL_CELL_HORIZ ||
 		    dp->layout->pos == TBL_CELL_DHORIZ ||
 		    dp->pos == TBL_DATA_HORIZ ||
-		    dp->pos == TBL_DATA_DHORIZ)
+		    dp->pos == TBL_DATA_NHORIZ ||
+		    dp->pos == TBL_DATA_DHORIZ ||
+		    dp->pos == TBL_DATA_NDHORIZ)
 			print_otag(h, TAG_HR, "");
 		else if (dp->string != NULL) {
 			save_font = h->metac;
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-12  4:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  4:43 mandoc: According to the tbl(7) manual, if a data cell contains only the schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).