[Vegan-commits] r1709 - pkg/vegan/inst/doc

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 10 17:48:21 CEST 2011


Author: jarioksa
Date: 2011-08-10 17:48:21 +0200 (Wed, 10 Aug 2011)
New Revision: 1709

Added:
   pkg/vegan/inst/doc/veganjss.sty
Modified:
   pkg/vegan/inst/doc/decision-vegan.Rnw
   pkg/vegan/inst/doc/diversity-vegan.Rnw
   pkg/vegan/inst/doc/intro-vegan.Rnw
Log:
add table of contents and use smaller font in examples

Modified: pkg/vegan/inst/doc/decision-vegan.Rnw
===================================================================
--- pkg/vegan/inst/doc/decision-vegan.Rnw	2011-08-10 12:44:14 UTC (rev 1708)
+++ pkg/vegan/inst/doc/decision-vegan.Rnw	2011-08-10 15:48:21 UTC (rev 1709)
@@ -1,8 +1,8 @@
 % -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
 %\VignetteIndexEntry{Design decisions and implementation}
 
-\documentclass[article,a4paper,10pt,nojss]{jss}
-
+\documentclass[article,nojss]{jss}
+\usepackage{veganjss} % package options and redefinitions
 \usepackage{amsmath}
 %\usepackage{ucs}
 %\usepackage[utf8x]{inputenc}
@@ -38,7 +38,7 @@
 require(vegan)
 @
 
-\maketitle
+\tableofcontents
 
 
 \section{Nestedness and Null models}

Modified: pkg/vegan/inst/doc/diversity-vegan.Rnw
===================================================================
--- pkg/vegan/inst/doc/diversity-vegan.Rnw	2011-08-10 12:44:14 UTC (rev 1708)
+++ pkg/vegan/inst/doc/diversity-vegan.Rnw	2011-08-10 15:48:21 UTC (rev 1709)
@@ -1,6 +1,7 @@
 % -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
 %\VignetteIndexEntry{Diversity analysis in vegan}
 \documentclass[article,nojss]{jss}
+\usepackage{veganjss} %% vegan setup
 \usepackage{ucs}
 \usepackage[utf8x]{inputenc}
 \usepackage[T1]{fontenc}
@@ -36,8 +37,11 @@
 options("prompt" = "R> ", "continue" = "+  ")
 @
 
+\tableofcontents
 
-\noindent The \pkg{vegan} package has two major components:
+\section*{~}
+
+The \pkg{vegan} package has two major components:
 multivariate analysis (mainly ordination), and methods for diversity
 analysis of ecological communities.  This document gives an
 introduction to the latter.  Ordination methods are covered in other

Modified: pkg/vegan/inst/doc/intro-vegan.Rnw
===================================================================
--- pkg/vegan/inst/doc/intro-vegan.Rnw	2011-08-10 12:44:14 UTC (rev 1708)
+++ pkg/vegan/inst/doc/intro-vegan.Rnw	2011-08-10 15:48:21 UTC (rev 1709)
@@ -1,6 +1,7 @@
 % -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
 %\VignetteIndexEntry{Introduction to ordination in vegan}
 \documentclass[article,nojss]{jss}
+\usepackage{veganjss} % vegan settings
 \usepackage{ucs} %% needed for R output: signif stars etc, quotes
 \usepackage[utf8x]{inputenc}
 \usepackage[T1]{fontenc}
@@ -52,8 +53,11 @@
 options("prompt" = "R> ", "continue" = "+  ")
 @
 
+\tableofcontents
 
-\noindent \pkg{vegan} is a package for community ecologists.  This
+\section*{~}
+
+\pkg{Vegan} is a package for community ecologists.  This
 documents explains how the commonly used ordination methods can be
 performed in \pkg{vegan}.  The document only is a very basic
 introduction.  Another document (\emph{vegan tutorial})

Added: pkg/vegan/inst/doc/veganjss.sty
===================================================================
--- pkg/vegan/inst/doc/veganjss.sty	                        (rev 0)
+++ pkg/vegan/inst/doc/veganjss.sty	2011-08-10 15:48:21 UTC (rev 1709)
@@ -0,0 +1,22 @@
+%% macros to typeset vegan vignettes with jss.cls
+
+%% jss.cls does not collect toc info, but we redefine jss section and
+%% subsection commands to add contents line. Line of pdfbookmark can
+%% be removed, since toc is used for the purpose.
+\renewcommand{\jsssec}[2][default]{\vskip \preXLskip%
+  %\pdfbookmark[1]{#1}{Section.\thesection.#1}%
+  \refstepcounter{section}%
+  \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}%
+  \centerline{\textbf{\Large \thesection. #2}} \nopagebreak
+  \vskip \postMskip \nopagebreak
+}
+\renewcommand{\jsssubsec}[2][default]{\vskip \preMskip%
+  %\pdfbookmark[2]{#1}{Subsection.\thesubsection.#1}%
+  \refstepcounter{subsection}%
+  \addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection}#1}%
+  \textbf{\large \thesubsection. #2} \nopagebreak
+  \vskip \postSskip \nopagebreak}
+
+%% smaller examples
+\renewenvironment{Schunk}{\small}{}
+



More information about the Vegan-commits mailing list