mlreportgen.dom.HorizontalRule class
Package: mlreportgen.dom
Superclasses:
Horizontal line between report content
Description
Horizontal line to visually separate report content in a report.
You can append a HorizontalRule
object to these
objects:
mlreportgen.dom.Document
mlreportgen.dom.DocumentPart
mlreportgen.dom.TableEntry
mlreportgen.dom.Group
mlreportgen.dom.Container
Construction
creates
an unspecified horizontal line.horizontalRuleObj
= HorizontalRule()
Output Arguments
horizontalRuleObj
— Horizontal line
mlreportgen.dom.HorizontalRule
object
Horizontal line, returned as an mlreportgen.dom.HorizontalRule
object.
Properties
Border
— Line style for horizontal rule
character vector
Line style for horizontal rule, specified as one of these values.
Value | Applies To | |
---|---|---|
DOCX | HTML and PDF | |
'dashed' | ![]() | ![]() |
'dashdotstroked' | ![]() | |
'dashsmallgap' | ![]() | |
'dotted' | ![]() | ![]() |
'dotdash' | ![]() | |
'dotdotdash' | ![]() | |
'double' | ![]() | ![]() |
'doublewave' | ![]() | |
'inset' | ![]() | ![]() |
'none' | ![]() | ![]() |
'outset' | ![]() | ![]() |
'single' | ![]() | |
'solid' | ![]() | |
'thick' | ![]() | |
'thickthinlargegap' | ![]() | |
'thickthinmediumgap' | ![]() | |
'thickthinsmallgap' | ![]() | |
'thinthicklargegap' | ![]() | |
'thinthickmediumgap' | ![]() | |
'thinthicksmallgap' | ![]() | |
'thinthickthinlargegap' | ![]() | |
'thinthickthinmediumgap' | ![]() | |
'thinthickthinsmallgap' | ![]() | |
'threedemboss' | ![]() | |
'threedengrave' | ![]() | |
'triple' | ![]() | |
'wave' | ![]() |
BorderColor
— Color of line
character vector
Color of the line, specified as a character vector. You can specify:
The name of a color. The name must be a CSS color name. See https://www.w3.org/wiki/CSS/Properties/color/keywords.
A hexadecimal RGB (truecolor) value as
#RRGGBB
. For example,#0000ff
is a shade of blue.
BorderWidth
— Width of line (in HTML report)
character vector
Width of line (in an HTML report), specified in the format valueUnits
where Units
is
an abbreviation for the units. Valid abbreviations are:
px
— pixels (default)cm
— centimetersin
— inchesmm
— millimeterspc
— picaspt
— points
BackgroundColor
— Background color of line (in HTML report)
character vector
Background color of the line, specified as a character vector. You can specify:
The name of a color. The name must be a CSS color name. See https://www.w3.org/wiki/CSS/Properties/color/keywords.
A hexadecimal RGB (truecolor) value as
#RRGGBB
. For example,#0000ff
is a shade of blue.
This property applies only to HTML reports.
Id
— ID for this document element
character vector | string scalar
ID for this document element, specified as a character vector or string scalar. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.
Style
— Format specification for line
array of format objects
Format specification for the line, specified as an array of format objects.
StyleName
— Style sheet style for line
character vector
Style sheet style for line, specified as a character vector.
The name of a style must be specified in the style sheet of the document
or document part to which this element is appended. The specified
style defines the appearance of this element in the output document
where not overridden by the formats specified by the Style
property
of this element.
Tag
— Tag for line
character vector
Tag for line, 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.
To make it easier to identify where an issue occurred during document generation, you can Specify your own tag value.
Methods
Method | Purpose |
---|---|
Use | Copy horizontal line. |
Examples
Add a Horizontal Rule
import mlreportgen.dom.*; doctype = 'html'; d = Document('horizontalRule',doctype); p1 = Paragraph('Top content'); append(d,p1); hr = HorizontalRule(); hr.Border = 'dotted'; hr.BorderColor = 'blue'; append(d,hr); p2 = Paragraph('Bottom content'); append(d,p2); close(d); rptview(d.OutputPath);
Version History
Introduced in R2015bR2021a: Background Color Not Supported for PDF Reports
Behavior changed in R2021a
Starting in R2021a, you cannot specify the background color of a horizontal rule in a PDF report.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)