From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from scc-mailout-kit-02.scc.kit.edu (scc-mailout-kit-02.scc.kit.edu [129.13.231.82]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTP id 9b6b581b for ; Tue, 23 Apr 2019 15:40:18 -0500 (EST) Received: from asta-nat.asta.uni-karlsruhe.de ([172.22.63.82] helo=hekate.usta.de) by scc-mailout-kit-02.scc.kit.edu with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from ) id 1hJ2DA-0002Nj-GL; Tue, 23 Apr 2019 22:40:17 +0200 Received: from donnerwolke.usta.de ([172.24.96.3]) by hekate.usta.de with esmtp (Exim 4.77) (envelope-from ) id 1hJ2D9-0006bS-6l; Tue, 23 Apr 2019 22:40:15 +0200 Received: from athene.usta.de ([172.24.96.10]) by donnerwolke.usta.de with esmtp (Exim 4.84_2) (envelope-from ) id 1hJ2D9-00045t-1K; Tue, 23 Apr 2019 22:40:15 +0200 Received: from localhost (athene.usta.de [local]) by athene.usta.de (OpenSMTPD) with ESMTPA id 972508db; Tue, 23 Apr 2019 22:40:15 +0200 (CEST) Date: Tue, 23 Apr 2019 22:40:14 +0200 From: Ingo Schwarze To: Stephen Gregoratto Cc: tech@mandoc.bsd.lv Subject: Re: [PATCH mandoc] Add lang attribute to Message-ID: <20190423204014.GK64114@athene.usta.de> References: <20190415081414.duabfe6bua65lypb@BlackBox> X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190415081414.duabfe6bua65lypb@BlackBox> User-Agent: Mutt/1.8.0 (2017-02-23) Hi Stephen, Stephen Gregoratto wrote on Mon, Apr 15, 2019 at 06:14:14PM +1000: > This patch sets the lang attribute to "en" for all HTML output. > This is required for CSS hyphenation, which is supported by all > modern browsers[1]. Actually, i consider that a downside rather than an advantage. For technical documents, automatic hyphenation provides no benefit but risks introducing technical ambiguities. In a browser, the very minor gain in beauty matters even less than on a terminal because browser windows are almost always wider than terminals. I know that HTML standards recommend specifying the language. But neither man-cgi(8) nor mandoc -T html can know the language (at least so far, i don't see any good way to find out), and sometimes specifying the wrong language is clearly worse than never specifying any language at all. > Given your comments about non-english manpages[2], I do think that maintaining manual pages in non-English languages is currently riddled with many problems. Consequently, when significant gain for English manual pages can be achieved at small expense for non-English pages, that would probably be the way to go for now, to be revisited once the more significant problems are better under control. However, if very minor (or even irrelevant) gain for English manual pages would cause substantial problems for non-English languages, that's not good. For some languages, translating manual pages might make sense. The tools shouldn't gratuitously obstruct reading of non-English manual pages. > I decided that "en" is a good default. Your patch does not change a default. It hardcodes "en" with no possibility to get anything else, or to even leave it out. That seems excessive to me. On the other hand, i doubt the lang attribute is important enough to make it optional or configurable. So i tend to reject the patch, and i'm not asking for an improved version. I don't see how it could be improved - which doesn't mean it cannot, i just don't see how. > I didn't add it to the stylesheet in this patch, but if you think this > could be added in the future I recommend reading this comprehensive > walkthrough[3] on CSS hyphenation and its fine-grained settings. I wrote an automatic hyphenation system for the German language as a part of a text editor that i wrote at the time for use by myself and by my father when i was 13 or 14 years old, and the hyphenation system worked reasonably well even though it needed less than hundred lines of code - but i lost interest in the topic before even coming of age... :-) And i would certainly be opposed to switching on hyphenation by default, or to accept any downsides in order to make hyphenation configurable. Yours, Ingo > [1] https://caniuse.com/#feat=css-hyphens > [2] https://lists.gnu.org/archive/html/groff/2018-12/msg00181.html > [3] http://clagnut.com/blog/2395 -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv