Equation
The Equation () form object can display LaTeX-rendered symbols, such as equations.
Enter the name of the equation object in the Name field.
The Settings window contains the following sections.
Equation
Enter the equation or mathematical expression to show in the Enter equation in LaTeX syntax field. The program displays a preview of the rendered LaTeX syntax after leaving the text field. Otherwise, preview it manually by clicking the Refresh Equation Preview button (). The default expression is -\nabla \cdot (k \nabla u), which displays as:
In the Equation section header, use the Insert Expression () and Replace Expression () buttons to select predefined LaTeX expressions for vector operations, Greek letters, big operators, sets, logic, and text formatting that you can insert into the equation or add as the start of a new equation.
For information about available LaTeX symbols and characters, see Mathematical Symbols and Special Characters in the COMSOL Multiphysics Reference Manual.
Position and Size
This section contains all layout settings for an equation in the grid of the parent form.
In the grid mode, you can control the horizontal and vertical alignment of the equation using the following lists:
From the Horizontal alignment list, choose Left, Center, Right, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
From the Vertical alignment list, choose Middle, Top, Bottom, or Fill, which automatically expands the form object to fill the cell in the horizontal or vertical direction (where applicable).
The need to specify the alignment is most obvious when working in the grid mode, as it controls how the form object is aligned in its grid cell. Aligning the form object can be useful in the sketch mode too, and you can then use the alignment tools on the Arrange menu in the Form toolbar’s Sketch section. When running the application in any client other than the Windows client, the form objects may not be positioned exactly as seen in the Application Builder. This is because the form objects may have a different size in other clients, giving them a slightly different positioning. Specifying the alignment ensures that the form objects are aligned as you want them to be in all clients.
The Width and Height fields are unavailable because the dimensions of the equation are determined by the software.
Additionally, in the sketch mode, you can specify the absolute position of the equation using the Position x and Position y fields. In the grid mode, you can position the object in the grid and see the grid position as the Row, Column, Row span, and Column span values.
Cell Margin
Under Cell margin (in grid mode only), you can control the margins around the form object. By default, the margins are taken from the parent form. From the Cell margin list, choose:
None, for no margin around the form object. This setting can be useful when displaying an equation inside of a sentence to avoid excessive whitespace margins.
From parent form (the default), to use the margins set for the parent form.
Custom, to specify the margins for the form object in the Horizontal and Vertical text fields.
Appearance
In this section, you can control the appearance of the equation.
From the Text color list, select Inherit (the default) to use the setting from the form it is located in. You can also select one of the predefined colors or select Custom to choose a custom text color from the color palette.
The default font size for the equation text is Default size, which uses the font size from the Forms node. If needed, choose or enter a font size (in points) in the Font size combo box.
Under State, you can control the initial state of the equation when users run the application. By default, the equation is visible and enabled. Clear the Visible or Enabled check box if you want to make the initial state of the equation hidden or unavailable. You can then make it visible or enable it using a method. In the Form Editor, the state of the form object is indicated by a change in its appearance. Objects that are hidden become visible when selected in the Form Editor.