Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.FlowDirection class

Package: mlreportgen.dom
Superclasses:

Direction of text or table column flow

Description

Specifies the direction for text to flow across a page or the order of columns.

Construction

flowDirectionObj = FlowDirection() causes text to flow from left to right and for the first column to be on the left side of a table.

flowDirectionObj = FlowDirection(flow) causes text to flow or column to appear in the specified direction (left-to-right or right-to-left).

Input Arguments

expand all

Direction for text to flow or for table columns to appear, specified as one of these values:.

  • 'ltr' — text flow or table column order is from left to right

  • 'rtl' — text flow or table column order is from right to left

Output Arguments

expand all

Text flow or table column order, represented by an mlreportgen.dom.FlowDirection object.

Properties

expand all

ID for this document element, specified as a character vector. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.

Tag for document element, specified as a character vector.

A session-unique ID is generated as part of document element creation. The generated tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value of the Id property of the object. You can specify a tag to replace the generated tag.

For example, to make it easier to identify where an issue occurred during document generation, you can specify your own tag value.

Text flow direction or column order direction, specified as one of these values:

  • 'ltr' — text flow or table column order is from left to right

  • 'rtl' — text flow or table column order is from right to left

Examples

expand all

In this example, changing the text flow direction changes “stressed” into “desserts”.

import mlreportgen.dom.*;
doctype = 'docx';
d = Document('test',doctype);

p = Paragraph('desserts');
p.Style = {FlowDirection('rtl')};
append(d,p);

q = clone(p);
q.Style = {FlowDirection('ltr')};
append(d,q);

close(d);
rptview(d.OutputPath);
Was this topic helpful?