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

Package: mlreportgen.dom
Superclasses:

Hyperlink to a location in same document

Description

Hyperlink to a location in the same document that contains the hyperlink. Use this kind of link to provide internal navigation within a document.

Construction

internalLinkObj = InternalLink(targetName,linkText) creates a hyperlink to the specified link target object and uses the specified link text.

internalLinkObj = InternalLink(targetName,linkText,linkTextStyleName) creates a hyperlink to the specified link target and uses the specified style name for the link text.

internalLinkObj = InternalLink(targetName,textObj) creates a hyperlink to the specified target using the specified Text object.

Input Arguments

expand all

Link target name, specified as character vector. The character vector is the value in the Name property of an mlreportgen.dom.LinkTarget object or a URL.

The text to use for the link text.

Name of style to use for the link text.

Text object containing link text, specified by an mlreportgen.dom.Text object.

Output Arguments

expand all

Internal link, represented by an mlreportgen.dom.InternalLink object.

Properties

expand all

This read-only property lists child elements of this object.

The output format must support the custom attributes of this document element.

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.

This read-only property lists the parent of this document element.

Name of link style defined in the template, specified as a character vector. The style specified by styleName must be defined in the template used to create the document to which the link is appended.

Format objects that specify the format of a document element.

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.

This read-only property displays the link target of this hyperlink.

Methods

Method

Purpose

append

Use InternalLink.append in a similar way to how you use ExternalLink.append.

Append text or a Text, Image, or CustomElement object.

clone

Use InternalLink.clone in a similar way to how you use Paragraph.clone.

Copy the internal link.

Examples

expand all

import mlreportgen.dom.*
d = Document('mydoc');

append(d, InternalLink('bio','About the Author'));
h = Heading(1,LinkTarget('bio'));
append(h,'Author''s Biography');
append(d,h);

close(d);
rptview('mydoc','html');
Was this topic helpful?