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.Hyphenation class

Package: mlreportgen.dom
Superclasses:

Enable hyphenation

Description

Specifies whether to hyphenate text and, optionally, the hyphenation character to use.

Construction

h = Hyphenation(type) specifies whether to hyphenate or the hyphenation character to use.

Input Arguments

expand all

Type of hyphenation, specified as:

  • Boolean for on or off, using a hyphen as the hyphenation character

  • A hyphenation character in the form of a character vector, for example, '-' for hyphen or ' ' for space

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.

Type of hyphenation, specified as:

  • Boolean for on or off using a hyphen as the hyphenation character

  • A hyphenation character in the form of a character vector, for example, '-' for hyphen or ' ' for space

Examples

expand all

Set the Hyphenation property on the page layout to enable hyphenation in a PDF page layout.

import mlreportgen.dom.*

d = Document('myreport','pdf');

open(d);
playout = d.CurrentPageLayout; 
playout.Hyphenation = true; 

data = '/mylongpath/hyphenation/example/myveryveryveryverylongpathname.doc';
table = Table({data});
table.Width = '2in'; 
table.entry(1,1).Hyphenation = ' ';

append(d,table);

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