source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: According to the tbl(7) manual, if a data cell contains only the
Date: Tue, 11 Jan 2022 23:43:56 -0500 (EST)	[thread overview]
Message-ID: <3363fcefcf30deb1@mandoc.bsd.lv> (raw)

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


                 reply	other threads:[~2022-01-12  4:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3363fcefcf30deb1@mandoc.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).