[rkward-cvs] SF.net SVN: rkward:[4150] trunk/rkward/rkward/rbackend/rpackages/rkward/R/ rk.print-functions.R

m-eik at users.sourceforge.net m-eik at users.sourceforge.net
Mon Jan 9 23:13:40 UTC 2012


Revision: 4150
          http://rkward.svn.sourceforge.net/rkward/?rev=4150&view=rev
Author:   m-eik
Date:     2012-01-09 23:13:40 +0000 (Mon, 09 Jan 2012)
Log Message:
-----------
given that TOC entries can now be collaped as desired, h1 to h4 (if those are ever used) headers will all be added to it. if that should turn out te be too much for the default view, some levels (perhaps h3 & h4 or only h4) should rather be set invisible by default with CSS.

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R

Modified: trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R	2012-01-09 18:18:42 UTC (rev 4149)
+++ trunk/rkward/rkward/rbackend/rpackages/rkward/R/rk.print-functions.R	2012-01-09 23:13:40 UTC (rev 4150)
@@ -39,7 +39,7 @@
 #' @param parameters a list, preferably named, giving a list of "parameters" to
 #'   be printed to the output
 #' @param toc If \code{NULL}, the default, \code{rk.header()} will automatically
-#'   add h1 and h2 headers to the TOC menu of the output document. \code{TRUE} will always
+#'   add headers h1 to h4 to the TOC menu of the output document. \code{TRUE} will always
 #'   add the header, and \code{FALSE} will suppress it.
 #' @param titles a character vector, giving the column headers for a html
 #'   table.
@@ -112,7 +112,7 @@
 	# if 'toc' is true, also add a javascript function call to add this header to the TOC menu
 	# the function addToTOC() will be defined in the document head
 	# see rk.set.output.html.file() in rk.filename-functions.R
-	if (isTRUE(toc) || (is.null(toc) && level <= 2)){
+	if (isTRUE(toc) || (is.null(toc) && level <= 4)){
 		cat("<script>\n\t<!--\n\t\taddToTOC('",header.id,"','",level,"');\n\t-->\n</script>\n", sep="")
 	}
 	if (length (parameters)) {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list