CountNumberOfSections: CountNumberOfSections

Description Usage Arguments Details Value See Also

View source: R/AnswerSheets.R


It counts the number of subparts in each section and outputs the result as a table. It doesn't act recursively, it only does the outermost layer.





Document, as defined in StructureDocument. Remember however that the function StructureDocument returns the document and the preamble together in a list.


The regular expression that defines this methods behaviour is the following


The replacement is simply "\1".

It tries to first find whether there exist attributes command and section that explain the command and section, before starting to use regexs on the names.


A table, counting the number of "\cmdName" items in which the document was divided when parsed for every begin-end section. It doesn't act resursively.

It will return a table with an integer that identifies the section, and a count, with how many items it found on that section. If it doesn't find any items or sections, it will return an empty table.

See Also

Other Extracting information: ConstructAnswerSheet, FindExamAnswers, GenerateShortAnswerSheet

TexExamRandomizer documentation built on May 2, 2019, 3:18 a.m.