Write a shortcode to create tabs from a (nested) list.

make_tabs_shortcode(
  content,
  tabsets = content,
  chunkname,
  output_function = show,
  target_classes = c("ggplot", "kable"),
  depth
)

Arguments

content

List (of lists) containing content to include in a tab

tabsets

List (of lists) containing keys of the content list (not of lists)

chunkname

Character name of the output tabset

output_function

Function used to print/plot/etc

target_classes

Set of classes that cause output_function to run

depth

Number of elements to traverse before output_function is run

Value

A character vector for the shortcode to include in the markdown.

Details

It would be better to not use tabsets and convert a list's indexes into a nested list structure.