Math Styles

Math Styles - Сообщения

#1 Опубликовано: 13.03.2023 20:34:05
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

In older versions of mathcad there was the possibility to define a few user styles to display the variables (like in "Applying Math Styles" in the Mathcad 2000 Professional User's Guide, page 41 of this pdf).

I think that in the first instance a few new styles could also be added to SMath, with some restrictions, to those that already exist, which as far as I know there are 5: variables (black italics), functions (black normal), units (bold blue), global variables (black bold) and strings (red bold). That is to say: the restrictions would only be to vary the style of the font (between the normal, italic, bold and bold italic styles) and the color, within a limited series of colors, since it does not seem to represent the introduction of many lines of code to implement this functionality, where neither the font nor its size are changed.

The way to differentiate between the different styles in SMath are: internal, when it is a predefined function, with ' for units, with " for strings and with ~ for global variables.

As a practical way to implement it, since no variable can start with a number, it could be that ~3A would be drawn as A and in the SMath file there would be a table in XML saying that for that worksheet there is a style called 'Vector' and it would be specified that it would be bold, italic and black, unlike the 'Global' style, in which the font is in normal style. In this way one could write things such as that A = norme(~3A) showed as A = norme(A), since 'A' and ~3A are different variables.

Another way would be the one that mathcad has in the most recent versions, which is to have a few, too few, in this case, and that can be implemented cycling between labels with Ctrl+Q ( see here )

Styles that come to mind are Symbolic, for variables intended to be left undefined, Vector for variables that are supposed to host vectors in black, bold and italics, or Matrix in bold italics and darkgreen, Strings in darkred, among the main ones.

Going one step further, it could be a way to introduce truly local variables via the "Local" style, to be used within the body of the function definition.

Best regards.
Alvaro
#2 Опубликовано: 14.03.2023 10:49:11
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

74 сообщений из 164 понравились пользователям.

Группа: User

Greetings,

There is a file that you can edit to some effect:
C:\Program Files (x86)\SMath Studio\representation\settings.prop

You can define style/font for the following:

  • "Default"
  • type="number"
  • type="string"
  • type="variable" condition="built-in"
  • type="variable" condition="user-defined"
  • type="function" condition="built-in"
  • type="function" condition="user-defined"
  • type="unit"
  • type="special"
  • type="operator"


Here is some syntax:

Показать спойлер



You also have control over subscripts.


May this be of Good Help;
Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#3 Опубликовано: 14.03.2023 11:39:18
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Hi Kenny, thanks for the information. But what I want is that, but for few more user defined styles. Like this in Mathcad 11

Clipboard04.png

Best regards.
Alvaro.
#4 Опубликовано: 14.03.2023 13:18:32
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

From recollection, Mathcad Ctrl+k was added in Smath,
since version ... ?

Styles.sm (18 КиБ) скачан 49 раз(а).
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений