Rev 13753 | Rev 25118 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{formatDL}\alias{formatDL}\title{Format Description Lists}\description{Format vectors of items and their descriptions as 2-columntables or LaTeX-style description lists.}\usage{formatDL(x, y, style = c("table", "list"),width = 0.9 * getOption("width"), indent = NULL)}\arguments{\item{x}{a vector giving the items to be described. Will be coercedto a character vector.}\item{y}{a vector of the same length as \code{x} with thecorresponding descriptions. Will be coerced to a character vector.}\item{style}{a character string specifying the rendering style of thedescription information. If \code{"table"}, a two-column table withitems and descriptions as columns is produced (similar to Texinfo's\code{@table} environment. If \code{"list"}, a LaTeX-style taggeddescription list is obtained.}\item{width}{a positive integer giving the target column for wrappinglines in the output.}\item{indent}{a positive integer specifying the indentation of thesecond column in table style, and the indentation of continuationlines in list style. Must not be greater than \code{width/2}, anddefaults to \code{width/3} for table style and \code{width/9} forlist style.}}\value{a character vector with the formatted entries.}\details{In table style, items with more than \code{indent - 3} characters aredisplayed on a line of their own.}\examples{## Use R to create the `INDEX' for package `eda' from its `CONTENTS'x <- read.dcf(file = system.file("CONTENTS", package = "eda"),fields = c("Entry", "Description"))x <- as.data.frame(x)writeLines(formatDL(x$Entry, x$Description))## Same information in tagged description list style:writeLines(formatDL(x$Entry, x$Description, style = "list"))}\keyword{print}