From maechler at stat.math.ethz.ch  Tue Jan 20 13:05:35 2015
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Tue, 20 Jan 2015 13:05:35 +0100
Subject: [Rd] Link to NEWS.2 in NEWS is broken
In-Reply-To: <CANdJ3dWehs9T79z_DfHLGt6tan5ffi4w7mfXgaKA+8tbowz9NQ@mail.gmail.com>
References: <CANdJ3dWehs9T79z_DfHLGt6tan5ffi4w7mfXgaKA+8tbowz9NQ@mail.gmail.com>
Message-ID: <21694.17551.505636.348829@stat.math.ethz.ch>

>>>>> Tal Galili <tal.galili at gmail.com>
>>>>>     on Tue, 20 Jan 2015 00:30:56 +0200 writes:

    > I am not sure where to post this.

Maybe you could try to contact the CRAN maintainer by e-mail.
(E-mail: you know the thing people did before they "posted" everything :-) ;-))
but I agree that it is not easy to find e-mail addresses nowadays..

More seriously:  Thank you, Tal!

    > I am looking at the NEWS file here:
    > http://cran.r-project.org/bin/windows/base/NEWS.R-3.1.2.html
    > And the links at the bottom seem to be broken.
    > This link:
    > http://cran.r-project.org/bin/windows/NEWS.2

    > Should be this:
    > http://cran.r-project.org/doc/manuals/NEWS.2

well, there yes.

If you look at the more typical place of the NEWS,
which you get to quickly from the Main CRAN or R-project web
page, namely
      http://www.r-project.org/news.html
and its bottom link
    http://cran.r-project.org/src/base/NEWS.html

then on the bottom of that pakage, there, even the ...../NEWS.2.html fails.


    > CHANGES in previous versions
    > -
    > Older news can be found in text format in files NEWS.0
    > <http://cran.r-project.org/bin/windows/NEWS.0>, NEWS.1
    > <http://cran.r-project.org/bin/windows/NEWS.1> and NEWS.2
    > <http://cran.r-project.org/bin/windows/NEWS.2> in the ?doc? directory.
    > News in HTML format for *R* versions from 2.10.0 to 2.15.3 is in
    > NEWS.2.html <http://cran.r-project.org/bin/windows/base/NEWS.2.html>.

As you probably know these are all autogenerated from the
source file  <Rsrc>/doc/NEWS.Rd

  ((and so there is some reason why posting to R-devel may be somewhat ok))

and the relevant part of that is

\section{CHANGES in previous versions}{
  \itemize{
    \item Older news can be found in text format in files
    \ifelse{html}{\href{../NEWS.0}{NEWS.0}, \href{../NEWS.1}{NEWS.1}
      and \href{../NEWS.2}{NEWS.2}}{\file{NEWS.0}, \file{NEWS.1} and
      \file{NEWS.2}}
    in the \file{doc} directory.  News in HTML format for
    \R versions from 2.10.0 to 2.15.3 is in
    \ifelse{html}{\url{NEWS.2.html}}{\file{doc/html/NEWS.2.html}}.
  }
}

*and* that source produces a NEWS.html which works correctly in
the important use of R's "builtin HTML help",
i.e. for me what I get after help.start(),  I presume that's
also the toplevel help page Rstudio users see.
And there, the "../NEWS.O" (relative link) *is* the correct location.

Using relative links is a very good idea here, as all that
should work completely offline.

The task here is to adapt all the other "published" versions of the
generated NEWS.html files to point to a web (as opposed to
local/relative) URL.

Yes ``just another'' tweak for the CRAN web page generation
scripts...

Martin



[Rd] Link to NEWS.2 in NEWS is broken
Martin Maechler