Documentation

  • Demos
  • Visit our website
  • Contact us
  • MathType

    • Wiris Quizzes

      • Learning Lemur

        • CalcMe

          • MathPlayer

            • Store FAQ

              • VPAT for the electronic documentation

                • MathFlow

                  • BF FAQ

                    • Home
                    • MathFlow
                    • Tutorials
                    • Tutorials

                    Setting sticky properties

                    Reading time: 2min

                    Sticky properties are set by applying font properties to the individual tokens* in an expression.

                    In order to accomplish this, select the characters you want to set a property on and then choose 'Font Properties' on the 'Properties' menu. This will pull up the Font Properties dialog box.

                    *Token element

                    Recall that in MathML, the elements listed below are considered token elements, that is, the smallest units of mathematical notation which carry meaning. According to the MathML spec, "Tokens are roughly analogous to words in text."

                    • identifiers: <mi>
                    • numbers: <mn>
                    • operators: <mo>
                    • text: <mtext>
                    • strings: <ms>
                    • spacing: <mspace>

                    Styles

                    There are two ways to control font styles, allowing you to define font type, weight and slant. The first way is to use a mathvariant attribute, choosing from one of the supported values of that attribute. The second way is to create your own. If you create your own, you can choose the font, weight, and slant from the Manage Custom Font Styles dialog:

                    Font Size

                    This property allows you to select a specific size for the characters. Valid entries are numerical sizes with units, and the keywords 'small', 'normal' and 'big'. The valid units are as follows:

                    em — em (font-relative unit traditionally used for horizontal lengths) ex — ex (font-relative unit traditionally used for vertical lengths) px — pixels, or pixel size of the current display in — inches (1 inch = 2.54 centimeters) cm — centimeters mm — millimeters pt — points (1 point = 1/72 inch) pc — picas (1 pica = 12 points) % — percentage of default value

                    "Font Color" and "Font Background"

                    These two properties take RGB color values, which consist of three pairs of hexadecimal digits (for example #5599dd) which define proportions of red, green and blue on a scale of 00 through ff (not case-sensitive). Certain named color values can also be used (aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow).

                    "Apply to each token…" or "Set as defaults…"

                    The final radio buttons control whether or not the font properties are sticky or non-sticky for the selected expression. To make the font properties sticky, select the first radio button, Apply to each token element in selection. Select Set as defaults for selected expression to store the settings you've made as the defaults for this expression only.

                    Caution

                    If the descriptions of those radio buttons seem confusing, remember to key in on the phrase token element, recalling our opening sentence on this page: Sticky properties are set by applying font properties to the individual tokens in an expression. Since the first radio button in this dialog mentions token element, that's the one that sets sticky properties.

                    As mentioned previously, sticky properties are set on the token elements. This means that they cannot be set on any mathematical constructs like <mfrac>, <mroot> and the like. The following images show what happens when the font color is set on an entire expression using sticky properties and non-sticky properties.

                    <p>Sticky properties (Apply to each token):</p><p><pre><math> <mfrac> <msqrt> <mn mathcolor='red'>2</mn> </msqrt> <mn mathcolor='red'>2</mn> </mfrac> </math></pre></p> <img></img>
                    <p>Non-sticky properties (Set as defaults…):</p><p><pre><math> <mstyle mathcolor='red'> <mfrac> <msqrt> <mn>2</mn> </msqrt> <mn>2</mn> </mfrac> </mstyle> </math></pre></p>

                    Was this article helpful?

                    Yes
                    No
                    Give feedback about this article

                    Related Articles

                    • String substitution command
                    • Square root
                    • Overview, MathML markup styles
                    • Setting Non-sticky Properties

                    Setting sticky properties

                    *Token element Styles Font Size "Font Color" and "Font Background" "Apply to each token…" or "Set as defaults…" Caution

                    Making people’s STEM work more meaningful

                    MathType

                    • MathType for Office Tools
                    • MathType for Mac
                    • MathType for Microsoft 365
                    • MathType for Google Workspace
                    • MathType for LMS
                    • MathType for XML Editors
                    • Arabic notation
                    • Our products accessibility
                    • MathType is online

                    WirisQuizzes

                    Learning Lemur

                    Solutions for Education

                    • Blackboard Learn
                    • Brightspace by D2L
                    • Canvas
                    • Google Classroom
                    • Moodle
                    • Schoology

                    Solutions for Publishing Houses

                    Solutions for Technical Writers

                    Solutions for Chemistry

                    Integrations

                    • HTML Editors
                    • MathType in WordPress

                    Pricing

                    Company

                    Careers

                    Blog

                    Contact Us

                    Buy Now

                    Plugin Downloads

                    © Wiris 2025

                    • Cookie Settings
                    • Cookie Policy
                    • Terms of Use
                    • Privacy Policy / GDPR
                    • Student Data Privacy
                    • Compliance
                    • Powered by Helpjuice
                    Expand