From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 2f46dab9 for ; Sat, 24 Nov 2018 11:00:40 -0500 (EST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 78E121045; Sat, 24 Nov 2018 11:00:39 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 24 Nov 2018 11:00:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.net; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type; s=fm3; bh=GPGfZB7FNwswy5szCmHPuil0ZCS FbHk3cBlkxR51HOM=; b=PowOPqVLyV/Uy5u2DxitExCPGv1c4bEVwa4CVn7pjJV uP6BfFjQ1tyz2C5iQvxDr2Fc80+YVSAxwGb40jAh+i2lArUPyDVzsjqueaOj8fvm NbxhpDFdBhk46RJRgOGJUxmsBfuo+QfK+jf64PjlYA0ceYGtNFwKUcpywm8JGKK2 i73ya+KPYwrpwbxcGfISLiTJ4zLLdiqAbaDGVh3j6I8jFic/On95TyAG7J4KDXeE KF+0g9Pi5LGfjDxCVdyn3Ao7N75/A1u/UQXnjGl8E6RT8YCwshxwhWuX/0L07fG4 ED4JzXb93HYaBHy8kCC691OXZnW38eARfUM3TephG/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=GPGfZB 7FNwswy5szCmHPuil0ZCSFbHk3cBlkxR51HOM=; b=U/Qdvz0Fub+fwcdbWZZ/0w Z7AxJ6BnGlWSHYvS9tzcOIRWKhsHsaJLaj6VHlO3S+XhvKJv+QrT08PaCdnp38Sf 4MhOY5o7I8m1E22YPoOy131Hx1sbethIBz3shIPQxKPDG7xBV+huFMY2t5o6IqDa enHUFKylsFdLSdwShUChpHJpglHJVVFUJdEs1zOJoce8pSVDKIhGAHyd33B9EjPL 2WVC//AlWKin84FIjlM/1cEmC0JEUEDh7vYCEIla6oMJ6PCTTYN4uLjLv8wkYb4H 9gzcIDnQT/mUyRYO/SuXIQTBoiowMx0v+WIx6tRPG0cG83xMuvqJtuh8t5gL5W3w == X-ME-Sender: X-ME-Proxy: Received: from thor.yuripv.net (unknown [62.183.125.179]) by mail.messagingengine.com (Postfix) with ESMTPA id 6522A102F2; Sat, 24 Nov 2018 11:00:37 -0500 (EST) Subject: Re: two spaces after a period, closing bracket, and a newline To: Ingo Schwarze Cc: mandoc-discuss , Mateusz Piotrowski <0mp@FreeBSD.org>, Benjamin Kaduk References: <8e6d76be-ac90-bef5-91ec-276481f754cc@yuripv.net> <20181123224217.GC7177@athene.usta.de> From: Yuri Pankov Openpgp: preference=signencrypt Autocrypt: addr=yuripv@yuripv.net; keydata= xsBNBFu8u6IBCADB11gP0QwnorrHjqAtKLHKHNHskhy0s7jqJKfx0YqXgVBKGLJ9/mjLAz0F CBNvemHSDDTs0mEZ9cBKKi6cmsav6+UQgr//yai6hvXLBJqKchSFO4MhmdvBtsGFq1yKz5Zi uhjmimKyIpgBgvMdbgGbGq6cnSB2uEPmZuJr419SVRODOkXukU+F5WHgaHzDdHAIu1asCt2B +6msxqIqlFWcXyZyTGicTGGvC/PFIsVRUtD1dIJANTC876g7DTb7LZXWiWwJpSJ4GKMXMHVX Ct9BoQ4i3nhKbOxb6Io1wsy+NFyWsTJ9KYrxKKPJP3oG8BWb/cqlFqnE4eNSsiq2q7krABEB AAHNIFl1cmkgUGFua292IDx5dXJpcHZARnJlZUJTRC5vcmc+wsCUBBMBCgA+FiEE+Gq3PsPe LT4tL/9wk4vgf7Eq4WwFAlu9Cn0CGwMFCQWjmoAFCwkIBwMFFQoJCAsFFgMCAQACHgECF4AA CgkQk4vgf7E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WGMs9r2Rw QehNbYf5f/2QuW/Q5NGaRSNW2HS/cpp62XtTKmxj5wwk6EMbtNE/6WQpumfdmK2UGLjcJQ== Message-ID: <6f1ff2e0-8ec1-ea2c-dd2d-1ef979570c46@yuripv.net> Date: Sat, 24 Nov 2018 19:00:29 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 X-Mailinglist: mandoc-discuss Reply-To: discuss@mandoc.bsd.lv MIME-Version: 1.0 In-Reply-To: <20181123224217.GC7177@athene.usta.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sZH3IcmRaFvcTVAiKFQPzlsOQ9ZmsARGD" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --sZH3IcmRaFvcTVAiKFQPzlsOQ9ZmsARGD Content-Type: multipart/mixed; boundary="oebybI85QrUEBfFAJHWrgbwrhisiWALWM"; protected-headers="v1" From: Yuri Pankov To: Ingo Schwarze Cc: mandoc-discuss , Mateusz Piotrowski <0mp@FreeBSD.org>, Benjamin Kaduk Message-ID: <6f1ff2e0-8ec1-ea2c-dd2d-1ef979570c46@yuripv.net> Subject: Re: two spaces after a period, closing bracket, and a newline References: <8e6d76be-ac90-bef5-91ec-276481f754cc@yuripv.net> <20181123224217.GC7177@athene.usta.de> In-Reply-To: <20181123224217.GC7177@athene.usta.de> --oebybI85QrUEBfFAJHWrgbwrhisiWALWM Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Ingo Schwarze wrote: > Hi Yuri, Mateusz, Benjamin, >=20 > Yuri Pankov wrote on Fri, Nov 23, 2018 at 11:35:41PM +0300: >=20 >> Reported by Mateusz Piotrowski in >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232779: >> >> A simple >=20 > This is very far from simple. ;-) >=20 >> rendering issue -- two spaces are displayed after a period and >> closing bracket, >=20 > Brackets would behave differently in this respect - we are talking > about a closing parenthesis here. Indeed, sorry. >> *and* there's a new line, i.e. `printf "foo.)\nbar" | >> mandoc` displays "foo.) bar". >=20 > Yes, that is a feature. Thanks for the detailed (as always) answer. > Mandoc does some heuristics to guess where sentences end, and so > does groff, traditionally, even though the behaviour of both is not > completely identical. When these programs detect the (likely) end > of a sentence, they insert a double space into the output, > conforming to traditional typewriter conventions, even though > this is no longer common practice in proportional-font typesetting. > But i do think the double space after the end of a sentence still > makes reading text in monospace fonts easier. >=20 > The basic idea is to assume the end of a sentence when a full stop, > an exclamation mark, or a question mark appears at the end of an > input line. If that character is preceded by an alphanumeric > character (assumed to be the end of a word), it is even assumed > to be the end of a sentence when followed by one or more closing > delimiters. They said, "Like in this case." >=20 > There are many subtleties, in particular when macros are involved. >=20 > That said, in your minimal example "foo.)\nbar", the double space > is unambigously correct. >=20 > The case reported by Mateusz, "port...)\ncan be used" is slightly > less clear. Then again, an ellipsis often marks the end of a > sentence, like in this case... So mandoc treats it just like the > full stop when it appears at the end of an input line. >=20 >=20 > Benjamin Kaduk wrote: >=20 >> The rendering changes if you put a space before the ellipsis, FWIW. >=20 > Yes, in that case, mandoc no longer feels sure whether this is a > sentence, because in English text, the punctuation marking the end > end of a sentence is supposed to follow the last word without > intervening whitespace. >=20 >> Escaping the '.'s with backslashes also works. >=20 > Do *NOT* do that, if "\." appears in a manual page, that is almost > always wrong and rarely has the effect intended by the author. >=20 > If you need to escape a delimiter (including a dot) such that it > is not treated as a delimiter, put a zero-width space "\&" next > to it - conventionally, it is put before the dot in trailing > macro arguments (e.g. .Sq \&.) and after the dot to prevent end > of sentence detection (e.g. e.g.\&), but either order works. > For details, see >=20 > https://man.openbsd.org/mdoc.7#Delimiters > https://man.openbsd.org/roff.7#Sentence_Spacing >=20 > So if you really want to prevent end of sentence detection here, > you would say >=20 > Any netmap port type (physical interface, > VALE switch, pipe, monitor port...\&) > can be used. >=20 > While i admit there are some weird cases and some groff-mandoc > differences in this area, i don't see anything to fix in the specific > case you report. Also, groff and mandoc behave identically for > this input file: >=20 > .Dd November 23, 2018 > .Dt TEST 1 > .Os > .Sh NAME > .Nm test > .Nd test > .Sh DESCRIPTION > Any netmap port type (physical interface, VALE switch, pipe, monitor po= rt...) > can be used. >=20 > Both emit the double space. >=20 > Yours, > Ingo >=20 --oebybI85QrUEBfFAJHWrgbwrhisiWALWM-- --sZH3IcmRaFvcTVAiKFQPzlsOQ9ZmsARGD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE+Gq3PsPeLT4tL/9wk4vgf7Eq4WwFAlv5dZ0ACgkQk4vgf7Eq 4Wyc1wf8D6lX85u6HDmsFRUig4rKOahjMZ2kBa0a64OIZDLSOyTouMmJAJ2pM27Q H+x6PH6JX98M89txhugwwLcUR4H5qnJNCMIy68W+NxVCCs3k8QGsF8ItxiNlltkx 8U98NTN09ILj9J6uTNDxZeHTVGtFsXlb5cbDaUVJlcjNSoGhGL7KBnSrJdjWwyL9 KezOmxDI/05zOy2IDbqVy1DVEBR4C5cqv91Hgckm9fOgKruBaoSMkUk2AArn0Mae zesH3gf98YZGDNhH/EBPOxh/YD13zDG37rGD/1P3tNKoWHh/irMlAN+cHYk0dIvx K/ejxLQ7Ev4wFxI6XA7ncfYVOsbFgw== =oSHn -----END PGP SIGNATURE----- --sZH3IcmRaFvcTVAiKFQPzlsOQ9ZmsARGD-- -- To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv