Formatting of variables

Formatting of variables - Messages

#1 Posted: 7/31/2021 1:10:44 PM
Jason McCool

Jason McCool

9 likes in 78 posts.

Group: User

I generally like SMath better than Mathcad (especially since they went to the "Prime" version), and I've even found some things that SMath will do that Mathcad Prime won't. but in trying to replicate formulas from the American National Design Standard (NDS) for wood design, I am running into more and more examples of variable names and subscript characters used in the NDS publications that aren't allowed in SMath. The biggest advantage that Mathcad seems to have over SMath at this point is in formatting (their fonts in math regions seem more legible) and in allowing more variability in variable declarations (e.g. characters not allowed in SMath, or characters combined in ways not allowed in SMath). Are there any options for workarounds in SMath that I'm not aware of? I'm teaming up with another author to write a design guide for wood design, so the formatting is more critical in this published work than it would be for my normal calcs at the office. If it were just my own calcs, I'd just use alternate notation, but I'd like to match up as closely to the national standard's notation as possible when publishing a book related to it.

Below is an example of a variable used in wood shear wall calcs where 2 values for shear modulus (Gv) and thickness (tv) have been combined into 1 tabulated value of Gvtv with the "v" in subscript. SMath doesn't allow getting in and out of subscript entry in one variable definition, as far as I know.

The vs.asd entry below that is one that neither SMath or Mathcad will accept as NDS shows it, since NDS uses "s(ASD)" in the subscript, and neither program recognizes parentheses as part of a variable name, even in a subscript. So for that one, I may just have to use a period or underscore or some other alternate notation from what the published standard uses. Another case that I see used a lot in published engineering calcs is the use of a comma in a subscript, such as "P1,y" where the 1,y" would be in subscript. I don't think either Mathcad or SMath allow that, but it is a common notation from what I've seen.
Mathcad notation.jpg
The Fc⟂ entry is one I figured out I can insert from Windows Character Map, although it comes out somewhat tilted in SMath, like it's italicized.
File not found.File not found.
Finally, the last picture is from Mathcad of how NDS represents the adjusted design value for allowable compressive stress perpendicular to the grain. They put the apostrophe after the subscript. But similar to the Gvtv variable, I can't leave subscript entry to put the apostrophe at the normal text level in SMath. I can put it in at that level before the subscript, but then it doesn't quite look the same. Has anyone else used SMath for published works where you wanted to match a particular formatting like this? Is there a workaround?
Perp Compr Stress Adjusted.jpg

Thanks much everyone,
Jason
Jason McCool Robbins Engineering Little Rock, AR, USA
#2 Posted: 7/31/2021 3:15:45 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi Jason. Some notes.

Clipboard01.jpg

SomeFormats.sm (3 KiB) downloaded 59 time(s).

Best regards.
Alvaro.
2 users liked this post
Jason McCool 8/1/2021 7:16:00 PM, Erick Valentino 10/1/2021 7:27:00 PM
#3 Posted: 7/31/2021 8:39:32 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Has anyone else used SMath for published works where you wanted to match a particular formatting like this? Is there a workaround?


Smath supports decorations ... no maths execute decoration(s).
The work around is to redefine your decoration.

Decorate.PNG
#4 Posted: 7/31/2021 9:53:40 PM
churichuro

churichuro

28 likes in 79 posts.

Group: User

Razonar what is ctrl+Shift+K ?

I already know what he does for the example that you gave,
but what does that trick for notation refer to or where does it come from?
#5 Posted: 7/31/2021 11:21:03 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Razonar what is ctrl+Shift+K ?

I already know what he does for the example that you gave,
but what does that trick for notation refer to or where does it come from?



Hi churichuro.

It comes from mathcad, I don't know from which version or even which one is valid. It is used to use characters that are usually operators in the definition of variable names. That is, to write things like "a/b" or "a+b" as variable names, or variables with spaces "a b", and some others cases.

I suppose that somewhere here it must be documented, but I don't know where. For instance, not here: https://smath.com/wiki/Keyboard%20shortcuts.ashx . The line describing it could be:

Ctrl+Shift+K - For type characters that usually insert operators.

Best regards.
Alvaro.
3 users liked this post
churichuro 7/31/2021 11:32:00 PM, sergio 8/1/2021 12:44:00 PM, Jason McCool 8/20/2021 3:05:00 PM
#6 Posted: 8/1/2021 8:54:55 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Razonar what is ctrl Shift K ?

I already know what he does for the example that you gave,
but what does that trick for notation refer to or where does it come from?


...in Mathcad 11 [maybe 8 Pro. but not tutored]
Ctrl+Shift+K ... to open
ρ[kg/m³]
Ctrl+Shift+K ... to close
is dead text memo mostly to highlight unit(s)

Stolz.png
#7 Posted: 8/1/2021 10:14:56 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... of different style, as explicit.

Stolz6179.PNG
#8 Posted: 8/1/2021 11:38:15 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... otherwise never use units in Engineering document.

Stolz6179QED.PNG
#9 Posted: 8/20/2021 3:01:34 PM
Ruben Sidranski

Ruben Sidranski

17 likes in 463 posts.

Group: User

Wrote

... otherwise never use units in Engineering document.



Been on this horse since MathSoft Forum . It can help to debug, but most of us use SMath/MathCAD because it handles the units for us.
I remember asking Andrey for "Ctrl+Shift+K" many years ago ... Maybe with the new NOTEBOOK feature, this may spur him to add it. I've been out of doing CALCS for a bit but I don't see it implemented yet.

EDIT: In the features area of the forum, request "Ctrl+Shift+K" feature from Mathcad
#10 Posted: 8/20/2021 3:16:07 PM
Jason McCool

Jason McCool

9 likes in 78 posts.

Group: User

ElSid, Ctrl+Shift+K does already work in SMath... are you talking about just adding that to the documentation so it's not a secret anymore? It does kind of remind me of playing video games as a kid and having to discover and memorize the different undocumented "cheat codes" that each game had.

Jason
Jason McCool Robbins Engineering Little Rock, AR, USA
#11 Posted: 10/2/2021 8:53:57 PM
Jason McCool

Jason McCool

9 likes in 78 posts.

Group: User

Adding on to this topic, I just came across something surprising that I can't get either Mathcad Prime or SMath to do: write a single dot or a "hat" (or caret, or circumflex accent) above a variable. This is really surprising given how common these symbols are in math from high school and college up to various engineering disciplines, and both programs exist to allow us to solve math in its symbolic "native language" as opposed to a bunch of obfuscated cell references in a spreadsheet. I've tried using the diacritical combining marks from Windows Character Map in both programs, and some of them work and some don't. I've looked through different fonts, and some, like Courier New, have more combined letters like u with a double dot or j with a caret, but I would really like to be able to match up my variables with the textbook examples for ease of debugging and for standardization for peer review. On a side note, Mathcad 15 would allow several of these characters. Any chance that this is possible in SMath with some workaround I'm not aware of, or that it could be someday? It seems like PTC really took a step backwards in going from Mathcad to Mathcad Prime in that there's a lot of things Prime can't do that Mathcad had always been able to do. This might be an area where SMath could be better than Mathcad Prime, for what it's worth.
File not found.File not found.
Thanks!
Jason
Jason McCool Robbins Engineering Little Rock, AR, USA
#12 Posted: 10/2/2021 9:16:50 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Smath, Mathcad ... are productive numerical CAS.
They are not gyzma decorative creators at will.

Gyzma.PNG
#13 Posted: 10/2/2021 9:38:28 PM
Jason McCool

Jason McCool

9 likes in 78 posts.

Group: User

I have no idea what that's even supposed to mean, but then I haven't been able to make any sense of any of your previous comments on this thread either. Like when you posted about not using units in engineering documents... that's one of the main reasons engineers like using programs like Mathcad and SMath. If I didn't care about units, I'd just use a crummy spreadsheet and be done with it. If I didn't care about the form of the equations and using commonly recognized symbols for them that makes the work easily readable and comprehensible, I'd use a crummy spreadsheet and not bother with SMath (or Mathcad). You seem to miss one of the main points of using a program like this.

Jason
Jason McCool Robbins Engineering Little Rock, AR, USA
2 users liked this post
fedeghi 10/3/2021 7:09:00 AM, overlord 10/3/2021 11:48:00 AM
#14 Posted: 10/2/2021 11:47:17 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Hi Jason. You're absolutely right. Without a right notation, it's very difficult to solve and share the result. It is also quite frustrating to spend time and intellectual resources in the management of the units when what one wants is to ensure a reliable result that allows its review and traceability.

Try to search "comb" or "combi" in charmap, copy and paste in SMath. If doesn't work, try to open the attached SMath file, if your system doesn't fully support unicode maybe you can't see this, like what happen in my virtual windows 7.

Clipboard01.jpg

OverDot.sm (2 KiB) downloaded 56 time(s).

Best regards.
Alvaro.

Addendum: Apparently no character that has "accent" in its name can be combined with consonants. This is à ä â but x` x¨ x ^.
2 users liked this post
sergio 10/3/2021 1:01:00 PM, Jason McCool 10/3/2021 11:38:00 AM
#15 Posted: 10/3/2021 9:24:03 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

My guidance is about the reconciliation of Engineering works
in both styles from formulas and results at will.
Unless you trick solvers, they are unitless plugins.

Productive_Units.PNG
#16 Posted: 10/3/2021 9:50:50 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Damned Cold.PNG
#17 Posted: 10/3/2021 11:44:09 AM
overlord

overlord

552 likes in 1332 posts.

Group: Moderator

Wrote

Damned Cold.PNG


You are writing temperatures wrong.
That was discussed before in the forum.
And you are completely wrong about units.
No one will follow your unitless crusade, even you don't.
You just create your own unnecessary "silent units".

Math is unitless, science/engineering is not.

2021-10-03_17-42.png
2 users liked this post
Oscar Campo 10/3/2021 3:41:00 PM, Jason McCool 10/3/2021 12:02:00 PM
#18 Posted: 10/3/2021 12:01:43 PM
Jason McCool

Jason McCool

9 likes in 78 posts.

Group: User

Wrote

Addendum: Apparently no character that has "accent" in its name can be combined with consonants. This is à ä â but x` x¨ x ^.



Thanks, Alvaro. That explains the mystery of the not being able to combine F^ and k^ would both be consonants. Interestingly, while I can get x to combine with a single dot above or a double dot above, the vowel "u" will only combine with a double dot and not a single dot in any of the fonts I've tried. And I have been using the "Combining Diacritical Marks" as it's labeled on my English system, same as your "combi". It does make me wonder what my various physics and engineering mechanics books over the years were using to write out their equations since they commonly used the notation of i,j,k with the circumflex accent (hat) over them to denote unit vectors in the x,y, and z axes. I guess maybe the publisher used a custom font that had those symbols in it.

And I agree, overlord, science and engineering are definitely not unitless. Ask me if a beam can support a 10 lbf concentrated load and I won't think twice; ask me if it can support 10 kip, and that may be a different story! Units make all the difference in the world.

Thank you both for your helpful comments.

Jason
Jason McCool Robbins Engineering Little Rock, AR, USA
#19 Posted: 10/3/2021 12:21:41 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

It does make me wonder what my various physics and engineering mechanics books over the years were using to write out their equations since they commonly used the notation of i,j,k with the circumflex accent (hat) over them to denote unit vectors in the x,y, and z axes. I guess maybe the publisher used a custom font that had those symbols in it.



LaTeX is at least an option, it makes compound symbols out of basic characters and decoration symbols. Having an x-umlaut character is just a poor replacement for \ddot x. So I rather accept that SMath can't handle well decorations instead of font-mining for look-alikes.

Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#20 Posted: 10/3/2021 2:20:17 PM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

...
LaTeX is at least an option, ...



Hi. True, but then the point is how to write those expressions in latex within SMath.

Wolfram's Mathematica solution, where everything are expressions, is to use functions, like OverDot, OverVector, OverHat, etc. Here is a listing.

It can be quite practical, since you can define notations such as OverHat[x]:=x/Norme[x] or OverDot[x]:=Diff[x,t].

The EES solution is smaller, but much more practical. From the help of the program:

"A dot, bar, hat, or tilde can be positioned over the variable name by adding _dot, _bar, _hat, or _tilde to the name. ... X_ddot will display with a double-dot centered above the X. X_infinity will display as X subscripted with the infinity symbol. X_prime will display as X 'and X_dprime will display as X''"

I suppose that the latter is a solution that can be implemented in SMath without many problems.

Best regards.
Alvaro.
  • New Posts New Posts
  • No New Posts No New Posts