**Guest post by Andrew McGough**

When highlighting math in an equation in PTC Mathcad there is historically a confusion of terms used to refer to the functionality – highlighting itself, selecting, grouping, even scoping, though that last one doesn’t seem to have made it outside conversations of the PTC Mathcad team itself. All of those words effectively mean the same thing – identifying a portion of math in the equation editor so you can perform some action on that math. However, how it works and what actions you can perform has changed subtly over the years. In PTC Mathcad Prime 3.1 we’ve taken the opportunity to simplify things.

PTC Mathcad Prime 3.1 help documentation refers to this functionality as ‘grouping.’ To keep things simple I’ll talk about the functionality ‘grouping’ and the visual indication to the user as ‘highlighting.’ In a worksheet, you can place the cursor in an equation and then drag left or right to highlight a portion of the equation. This is similar to highlighting in a text document but where things differ in PTC Mathcad is that as the highlighted area is enlarged we include only valid math terms. For example, in the following simple equation, placing the cursor at the right of the 3 and then dragging to the left highlights first the 3 and then the whole right hand side of the definition:

By including only valid math terms allows us to apply operators to those terms that are grouped. For example, if we want to divide 1 by the right hand side of the above example we can highlight it as shown and then simply press the division operator keyboard shortcut or select the operator from the UI:

That applies the division operator to the highlighted terms. With the kinds of complex equations you can create using PTC Mathcad Prime 3.1, it becomes incredibly useful to be able to group multiple terms and apply an operator to those grouped terms.

This is a good point to talk about keyboard shortcuts that help with this functionality. You can drag highlight in PTC Mathcad Prime 3.1, but we offer a number of shortcuts to give you more control. Placing the cursor in an equation and pressing the spacebar will highlight first the value or identifier it’s placed by and continuing to press the spacebar will group terms until the whole equation is highlighted. Pressing down Ctrl and repeatedly pressing the spacebar will then un-group those terms.

The position of the cursor – to the left or right of the value or identifier – will affect what gets grouped. Placed to the left of it, repeated pressing of the spacebar will group terms to the right. Placed to the right of it, repeated pressing of the spacebar will group terms to the left. If you want to control what direction grouping occurs in you can press Shift and the left arrow to group to the left or Shift plus the right arrow to group to the right. If you want to swap that direction you can move the cursor to the other end of the highlighted portion by pressing Shift and either the Home or End keys. Using the keyboard gives you very close control on exactly what ends up highlighted in your math.

You can also delete or copy/paste highlighted math but for more control over editing you can also overwrite edit it. This can be performed on single values, so if you want to change the coefficient of a variable you can highlight it and type the new value. But like before you can also highlight a term and group multiple terms and overwrite edit those. For example, in the following equation, if you place the cursor to the right of the 4 and press the spacebar the matrix value itself will be highlighted and you can overwrite edit the value itself:

– overwrite with 9:

Instead of overwrite editing the value, if you place the cursor to the right of the 4 and press the spacebar three times the subtraction operator and its operands will be highlighted and you can overwrite those grouped terms instead:

– overwrite with 9:

So once highlighted:

- You can apply an operator to grouped terms.
- You can overwrite edit grouped terms.
- You can of course delete or copy/paste grouped terms.

In the past we’ve used multiple methods to perform multiple functionality using multiple terms so hopefully with PTC Mathcad Prime 3.1 we’ve made things a little easier.

New to PTC Mathcad? Try it out for free with PTC Mathcad Express?

Learn other tips and tricks from our Community or watch one of our video tutorials.