[R-wiki] found way to get headers, still need a little help
Philippe Grosjean
phgrosjean at sciviews.org
Thu Jun 29 22:43:04 CEST 2006
Paul Johnson wrote:
> I'm attaching "alltips3.R", on which I have worked pretty hard. This
> combines the "rawexport" feature to get the headings, with the newer
> getWikiIndex functions to do the dirty work. It breaks up the big
> functions in the alltips script that Phillipe posted and then shows at
> least one way to make all of the moving pieces fit together and
> produce a full tipsheet with headers.
>
> If tips:tips or the rawexport of it change, of course this will break.
> (sigh).
I haven't look at it yet, but as I said, I would not trust tips:tips
because it may change again in the future, although not until a couple
of months for sure. So, you are safe for nerar future :-)
> I'm baffled about a couple of things.
>
> 1. When I browse this page, it is a bit slow and I get this repeated error
>
> "Warning: Unresponsive Script" A script on this page may be busy, or
> it may have stopped responding. You can stop the script now, or you
> can continue to see if the script will continue"
Web sites based on html pages must be designed with a series of SHORT
pages LINKED together. The "alltips.html" page is so large (hundreds of
equivalently printed pages) that you reach limits web browsers designers
would never imagine someone would reach. The format for single, long
documents on the web is PDF, not HTML. I am afraid there is little we
can do here.
> I just have the HEAD information from the current alltips here, but
> I'm wondering why I need any javascript at all.
Footnotes and mathematical equations, are example of items that use
JavaScript on the wiki pages.
> 2. I Do NOT understand why some tip items are indented more than others.
Indentation reflect level of the headers (h1 = no indentation, h2 =
slight indentation, h3 = larger indentation, etc.)
> Take a look at the content under:
>
> Exchanging data between R and MS Windows apps (Excel, etc)
>
> Is the indentation happening because the author of the tip put special
> html into his entry?
It is a style decide on purpose.
> I'll figure out why minor headings don't show in the TOC. And I need
> to convert the titles of the tips themselves to <h3>.
In the function, I collect only the first H1 title. However, it is
possible to collect, let's say, all H1, H2 and H3 levels. You will end
up with a pretty large TOC, but why not? Just look at the code to
collect H1 titles and modify it to collect other title levels, if you like.
Best,
Philippe
More information about the R-sig-wiki
mailing list