This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Package: mlreportgen.dom

Create numbering stream


streamOut = createAutoNumberStream(docObj,streamName)
streamOut = createAutoNumberStream(docObj,streamName,streamType)
streamOut = createAutoNumberStream(docObj,streamName, streamType, initialValue)


streamOut = createAutoNumberStream(docObj,streamName) creates a numbering stream using Arabic numbers and an initial value of 0.


streamOut = createAutoNumberStream(docObj,streamName,streamType) creates a numbering stream using the specified type of characters (Arabic numbers, alphabetic, or Roman numerals) and an initial value corresponding to 0 (for example, a or i).

streamOut = createAutoNumberStream(docObj,streamName, streamType, initialValue) creates a numbering stream using the specified type of characters (Arabic numbers, alphabetic, or Roman numerals) and specified initial value.


collapse all

import mlreportgen.dom.*;
myReport = Document('mydoc','html');

chapStream = createAutoNumberStream(myReport,'chapter','I');
for i=1:5
    p = Paragraph('Chapter ');
    p.Style = {CounterInc('chapter')};
    p.WhiteSpace = 'pre';


Input Arguments

collapse all

Document to apply numbering stream to, specified as an mlreportgen.dom.Document object.

Consider using a name that indicates the kinds of document element (for example, a chapter heading) that you expect to apply the stream to.

Use one of these letters to specify the type of characters to use for the numbering values.

  • 'n' — Arabic numerals (you can also use 'N')

  • 'a'— Lowercase alphabetic letters (a, b, c,...)

  • 'A' — Uppercase alphabetic letters (A, B ,C,...)

  • 'i' — Lowercase Roman numerals (i, ii, iii,...)

  • 'I' — Uppercase Roman numerals (I, II, III,...)

Use a number, regardless of the type of stream. The initial value used by the stream depends on the type of stream. For example, if you set initialValue to 0:

  • Arabic numeral stream — 0

  • Alphabetic stream — a or A

  • Roman numerals stream — i or I

Data Types: double

Output Arguments

collapse all

A numbering stream, represented by an mlreportgen.dom.AutoNumberStream object.


When you append an mlreportgen.dom.AutoNumber object, specify a numbering stream.

Introduced in R2014b