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

Package: mlreportgen.dom
Superclasses:

Margin between bounding box and its surroundings

Description

Specifies the margin between the bounding box of an object and adjacent document objects. A bounding box of an object includes the border of the object (if it has a border), the inner margin, and the object content.

Construction

marginObj = OuterMargin() creates an unspecified margin between the bounding box of an object and its surroundings.

marginObj = OuterMargin(all) creates the specified margin on all sides between the bounding box of an object and its surroundings.

marginObj = OuterMargin(left,right) creates the specified margins between the left and right sides of the bounding box of an object and its surroundings.

marginObj = OuterMargin(left,right,top,bottom) creates the specified margins between sides of the bounding box of an object and its surroundings.

Input Arguments

expand all

Margin on all sides between the bounding box of an object and its surroundings in the form valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Left margin between the bounding box of an object and its surroundings. See the all argument for description of valid values.

Right margin between the bounding box of an object and its surroundings. See the all argument for description of valid values.

Top margin between the bounding box of an object and its surroundings. See the all argument for description of valid values. Word reports ignore the Top margin setting of a table.

Bottom margin between the bounding box of an object and its surroundings. See the all argument for description of valid values. Word reports ignore the Bottom margin setting of a table.

Output Arguments

expand all

A mlreportgen.dom.OuterMargin object specifying the margin between bounding box and surroundings.

Properties

expand all

Bottom margin in the form valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • +

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Note

Tables in Word reports ignore the Bottom property. To control the spacing between a table and the succeding content, insert an invisible table or paragraph below the table. For example, to create two successive tables one inch apart, insert an invisible one-inch high table. Alternatively, insert an empty paragraph with a setting for line height setting of 0 and a setting for spacing before of 1 inch.

Left margin size. See the Bottom property for description of valid values.

Right margin size. See the Bottom property for description of valid values.

Top margin size. See the Bottom property for description of valid values.

Note

Tables in Word reports ignore the Top property. To control the spacing between a table and the preceding content, insert an invisible table or paragraph above the table. For example, to create two successive tables one inch apart, insert an invisible one-inch high table. Alternatively, insert an empty paragraph with a setting for line height setting of 0 and a setting for spacing before of 1 inch.

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.

Examples

expand all

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

p = Paragraph('Hello World');
p.Style = {Border('solid','Red'), ...
   HAlign('center'),...
   OuterMargin('0pt','0pt','0pt','24pt')};
append(d,p);

p = Paragraph('Greetings from MATLAB');
p.Style = {Border('solid','green'), ...
   HAlign('center')};
append(d,p);

p = Paragraph('End of report');
p.Style = {Border('solid','blue'),...
   HAlign('center'),...
   OuterMargin('0pt','0pt','0pt','12pt')};
append(d,p);

close(d);
rptview('test',doctype);
Was this topic helpful?