[Rd] Addition of a meta viewport tag to HTML manuals

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Mon Jul 15 11:51:53 CEST 2019


>>>>> Bob Rudis 
>>>>>     on Tue, 9 Jul 2019 14:24:24 -0400 writes:

    > The addition of a single line:
    > <meta name="viewport" content="width=device-width, initial-scale=1.0">

    > at in the <head> of the R HTML generated manuals would make them much easier to read on mobile devices.

    > texi2any (which generates the HTML files) is based on long-working Perl code that includes many modern HTML elements but does not include this one.

    > A Perl one-liner in the install-html: Makefile directive in Makefile.in:

    > install-html: installdirs
    > @for f in $(OBJECTS_HTML); do \
    > if test -f $${f} ; then \
    > $(INSTALL_DATA) $${f} "$(DESTDIR)$(rdocdir)/manual"; \
    > perl -pi -e 's/\<meta name="desc/<meta name="viewport" content="width=device-width, initial-scale=1.0">\n<meta name="desc/' "$(DESTDIR)$(rdocdir)/manual/*.html"; \
    > fi \
    > done

    > would insert this (I still need to read Makefile.win to see where it should go there) and I'd be glad to create a PR unless folks do not think better accessibility on mobile is a good idea.

To the contrary.
Thank you very much, Bob, for bringing this up, here!

    > $(PERL) does not seem to be defined but Perl itself is a requirement for texi2any so it is definitely something that would work in the current installation process. 

    > -Bob

Hmm,.. a very long time ago,  perl was an absolute requirement
for building R from the sources, but in the mean time, it's not
been required anymore strictly *).  AFAIK, there are alternative versions
of versions/alternatives to texi2any  (say on Windoze .. or
bizarre Linux distros or non-linux unices), and I'm almost sure
we do not want to require perl explicitly.

We are using R itself in many places for installation things,
but here, it should be possible to use smaller unix tools (such
as 'sed' and 'grep' say) instead.

If you (or someone else) provided a small patch for using those
instead of perl, I don't see a reason not to be grateful and
apply it to the sources.

Thank you once more
Martin


--
*)  perl is mentioned twice in the "R Administration and
    Installation" manual:
    1. maybe needed for 'install-info'  *if* there's no
      'install-info' command on the system [but on my Fedora and
       probably most "math-y" Linux dist there is a binary]

    2. On Windoze, the texinfo 5.x package needs perl



More information about the R-devel mailing list