SubfigureGenerator: Generate LaTeX subfigure code

View source: R/latex.R

SubfigureGeneratorR Documentation

Generate LaTeX subfigure code

Description

Generate LaTeX subfigure code for a bunch of supplied image paths, subcaptions, label and subfigure layout. Supports splitting the figures over several pages or using landscape layout.

Usage

SubfigureGenerator(
  images,
  subcaptions,
  mainlabel = "fig:mainfig",
  perpage = 6,
  ncol = 2,
  landscape = FALSE
)

Arguments

images

vector with full paths to images (png-files or other LaTeX-compatible format) to be put in a LaTeX subfigure environment

subcaptions

vector with subcaptions for each subfigure

mainlabel

string with LaTeX label for the main figure environment should be set individually if SubfigureGenerator() is called more than once from the same document

perpage

maximum number of images on one page, one A4 page fits six images with subcaptions

ncol

LaTeX subfigure is setup with ncol columns

landscape

set this to TRUE if pages are set in landscape mode

Value

a string with LaTeX code


chepec/R-common documentation built on July 27, 2023, 11:33 a.m.