Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Razonar  
#1 Posted : 14 March 2023 02:34:05(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
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

Edited by user 14 March 2023 02:37:09(UTC)  | Reason: Not specified

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Kenny Lemens  
#2 Posted : 14 March 2023 16:49:11(UTC)
Kenny Lemens


Rank: Advanced Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 132
Man
United States
Location: Wisconsin

Was thanked: 58 time(s) in 37 post(s)
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. ᵂᴵ

Edited by user 14 March 2023 16:54:07(UTC)  | Reason: Original Post was incomplete;

"No matter where you go, there you are." -Buckaroo Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
Offline Razonar  
#3 Posted : 14 March 2023 17:39:18(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
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.
Offline Jean Giraud  
#4 Posted : 14 March 2023 19:18:32(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
From recollection, Mathcad Ctrl+k was added in Smath,
since version ... ?

Styles.sm (19kb) downloaded 22 time(s).
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.