Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Betadiversity (v 2.0)

Compare
Choose a tag to compare
@adletaw adletaw released this 30 Jan 22:24
· 157 commits to master since this release

Version 2.0 introduces hierarchical numbering.

If you want figure numbers with more depth, say if you have a figure with subfigures, or have figure numbers attached to sections, you can implement hierarchical numbering. This will give you, for example, "Figure 1.1.1".

Three new parameters tell captioner 1. how many subsets of numbers you want (levels), 2. whether you want a number or a character for each (type), and 3. what you want separating them (infix). For type, the choices are "n" - a number, "c" - a lowercase character, or "C" - an uppercase character. If your type vector is too short, or if you choose not to supply any type, captioner will automatically fill in the missing types with numbers. The default infix is ., but you can choose anything you want.

Normally, a call to your captioner-generated function will only increment the final number or character in your figure number. If you want to increment an earlier value, there are two ways. First, you can set the parameter level inside the function. level gives the number corresponding to which value you want incremented. For example, if you want to bump up from 1.1.1 to 1.2.1: figs("B", level = 2)

The second way to do this is to use the function bump, introduced in this version. If you have a document with many chapters or sections, bump may be more convenient because it is not connected to a specific figure. Instead, you can place it after your section heading, and all subsequent figures will have the bumped up numbering.

bump takes as parameters your captioner function, and a number indicating which level you want bumped: bump(figs2, level = 1)