Thanks for both the support & sage advice, Martin! And, aye, tis straightforward to convert the perl one-liner to a shell/sed idiom. A kind soul from the list has also offered to walk me through the "provide a patch" process and I'll do my best to get it right on Par 1 :-) -Bob On Mon, Jul 15, 2019 at 5:54 AM Martin Maechler <maechler at stat.math.ethz.ch> wrote:> > >>>>> 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
>>>>> Bob Rudis writes:> Thanks for both the support & sage advice, Martin! > And, aye, tis straightforward to convert the perl one-liner to a > shell/sed idiom.> A kind soul from the list has also offered to walk me through the > "provide a patch" process and I'll do my best to get it right on Par 1 > :-)When building HTML from the Texinfo sources, we already have a sed script in place: we can easily teach it to also add the HTML5 viewport meta tag as suggested. I'll do so after more checking ... -k> -Bob> On Mon, Jul 15, 2019 at 5:54 AM Martin Maechler > <maechler at stat.math.ethz.ch> wrote: >> >> >>>>> 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> ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
>>>>> Kurt Hornik writes:>>>>> Bob Rudis writes: >> Thanks for both the support & sage advice, Martin! >> And, aye, tis straightforward to convert the perl one-liner to a >> shell/sed idiom.>> A kind soul from the list has also offered to walk me through the >> "provide a patch" process and I'll do my best to get it right on Par 1 >> :-)> When building HTML from the Texinfo sources, we already have a sed > script in place: we can easily teach it to also add the HTML5 viewport > meta tag as suggested.> I'll do so after more checking ...Done now: r76856 | hornik | 2019-07-22 08:56:41 +0200 (Mon, 22 Jul 2019) | 2 lines Add HTML5 viewport meta tags to the HTML manuals. Suggested by Bob Rudis <bob at rud.is>. Thanks again! Best -k> -k>> -Bob>> On Mon, Jul 15, 2019 at 5:54 AM Martin Maechler >> <maechler at stat.math.ethz.ch> wrote: >>> >>> >>>>> 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>> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel> ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
Reasonably Related Threads
- Addition of a meta viewport tag to HTML manuals
- Addition of a meta viewport tag to HTML manuals
- Addition of a meta viewport tag to HTML manuals
- TEXINFO error when building R-3.4.0
- Building rinstaller using R-devel (3.2.0-to-be) halts when trying to copy html files