% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/styles.R
\name{indentation}
\alias{indentation}
\title{Set paragraph indents}
\usage{
indentation(
  x,
  i = NULL,
  j = NULL,
  first_line = NULL,
  hanging = NULL,
  part = "body"
)
}
\arguments{
\item{x}{a 'flextable' object, see \link{flextable-package} to learn how to create
'flextable' object.}

\item{i}{row selector, see section \emph{Row selection with the \code{i} parameter}
in <\code{\link[=flextable_selectors]{Selectors in flextable}}>.}

\item{j}{column selector, see section \emph{Column selection with the \code{j} parameter}
in <\code{\link[=flextable_selectors]{Selectors in flextable}}>.}

\item{first_line}{first-line indent in pts (points). Use NA to unset.}

\item{hanging}{hanging indent in pts (points). Use NA to unset. If both
\code{first_line} and \code{hanging} are provided, \code{hanging} wins.}

\item{part}{part selector, see section \emph{Part selection with the \code{part}
parameter} in <\code{\link[=flextable_selectors]{Selectors in flextable}}>.
Value 'all' can be used.}
}
\description{
Change the first-line or hanging indent of paragraphs in
selected rows and columns of a flextable.

A \emph{first-line} indent moves only the first line of the paragraph to the
right. A \emph{hanging} indent moves all lines \strong{but} the first one to the
right; the indented lines start at the paragraph left padding plus the
hanging value, so \code{hanging} should not exceed the left padding
(see \code{\link[=padding]{padding()}}).
}
\examples{
ft_1 <- flextable(head(iris))
ft_1 <- mk_par(
  x = ft_1, i = 1, j = 1, part = "header",
  value = as_paragraph("A rather long header that will wrap on two lines")
)
ft_1 <- padding(ft_1, i = 1, j = 1, padding.left = 30, part = "header")
ft_1 <- indentation(ft_1, i = 1, j = 1, hanging = 20, part = "header")
ft_1 <- width(ft_1, j = 1, width = 1.2)
ft_1
}
\seealso{
Other formatting shortcuts:
\code{\link[=align]{align()}},
\code{\link[=bg]{bg()}},
\code{\link[=bold]{bold()}},
\code{\link[=color]{color()}},
\code{\link[=empty_blanks]{empty_blanks()}},
\code{\link[=font]{font()}},
\code{\link[=fontsize]{fontsize()}},
\code{\link[=highlight]{highlight()}},
\code{\link[=italic]{italic()}},
\code{\link[=keep_with_next]{keep_with_next()}},
\code{\link[=line_spacing]{line_spacing()}},
\code{\link[=padding]{padding()}},
\code{\link[=rotate]{rotate()}},
\code{\link[=style]{style()}},
\code{\link[=tab_settings]{tab_settings()}},
\code{\link[=valign]{valign()}}
}
\concept{formatting_shortcuts}
