From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 22918 invoked from network); 13 Aug 2020 22:38:57 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 13 Aug 2020 22:38:57 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id ecd77239 for ; Thu, 13 Aug 2020 17:38:52 -0500 (EST) Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 290c530c for ; Thu, 13 Aug 2020 17:38:51 -0500 (EST) Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=krj.st; s=key1; t=1597358329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gX/XUagSyKfwAKEph6uRW7Q1YhT+HnBErxuE2e0SMfA=; b=WXBxsVIh+oc7znvt2lgoTget9AitpLC+0d4wKo5k94n77lqGkk++pY73Q+xwbz9X7clfqX WeDv3rcwxoCRtVN4oY+b0Jw3vJjsFJMDHn4s0ZvZEPk1PtpAVAVjTYrn9LPqoysq/l5VUg umZK0pz7GeBV6lGTNRZFybpXrt2L/KVbxDkqrNkIUZbZbKAGM2+AIIaOfknYZelpydzBNM sUIFxxtUVnZpza/io0Y1X8uxIpiRKCmzKujKjOUcqHxv5Qbmgt97kp+Nx+rVOQGrtx19hH sdhzWjfsgDZ4X5KDXskpeYVmP3Wrn0wyLeVT+X0qEXosROsGFBXJXQG7ZFeckQ== Content-Type: text/plain; charset=UTF-8 To: Subject: Option to disable sentence spacing in tty output? X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "k.st" Date: Thu, 13 Aug 2020 22:12:44 +0000 Message-Id: X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv Hi Ingo, Is there currently an option in mandoc to disable sentence spacing, i.e. 2 spaces after end-of-sentence character, in tty outputs? I noticed that many man page authors either do not follow semantic line-breaking or convert man pages from other formats such as asciidoc, pandoc, and scdoc. All of them has some problems handling sentence spaces and lead to inconsistent spacing in man pages. For example, in git-push(1), --prune Remove remote branches that don=E2=80=99t have a local counterpart. Fo= r example a remote branch tmp will be removed if a local branch with the same name doesn=E2=80=99t exist any more. This also respects refsp= ecs, e.g. git push --prune remote refs/heads/*:refs/tmp/* would make sure that remote refs/tmp/foo will be removed if refs/heads/foo doesn=E2=80=99t exist. it uses 1 space after period, but 2 spaces after 'e.g.'. Git uses asciidoc to convert man pages, which does not handle sentence spacing very well. Since sentence spacing can lead to inconsistent spacings, I think it is reasonable to have an option to disable sentence spacing entirely and let user choose which convention to use. groff uses `.ss` request to control it, but in mandoc this seems to be hardcoded in `term.c`: if ((p->flags & TERMP_NOSPACE) =3D=3D 0) { if ((p->flags & TERMP_KEEP) =3D=3D 0) { bufferc(p, ' '); if (p->flags & TERMP_SENTENCE) bufferc(p, ' '); } else bufferc(p, ASCII_NBRSP); } We essentially only need to add a check before printing the second space. Since mandoc deals with man pages only, maybe it would make sense to implement this as a command-line argument, similar to --nj and --nh flags from man-db's man(1)? Best, kst -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv