tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: Stephen Gregoratto <dev@sgregoratto.me>
Cc: tech@mandoc.bsd.lv
Subject: Re: [PATCH mandoc] Add lang attribute to <html>
Date: Tue, 23 Apr 2019 22:40:14 +0200	[thread overview]
Message-ID: <20190423204014.GK64114@athene.usta.de> (raw)
In-Reply-To: <20190415081414.duabfe6bua65lypb@BlackBox>

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

      parent reply	other threads:[~2019-04-23 20:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15  8:14 Stephen Gregoratto
2019-04-23 14:20 ` Stephen Gregoratto
2019-04-23 20:40 ` Ingo Schwarze [this message]

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=20190423204014.GK64114@athene.usta.de \
    --to=schwarze@usta.de \
    --cc=dev@sgregoratto.me \
    --cc=tech@mandoc.bsd.lv \
    --subject='Re: [PATCH mandoc] Add lang attribute to <html>' \
    /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

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).