1 Pages (9 items)
Math expression or variable in text area ? - How do I........ - Messages
#1 Posted: 3/26/2019 5:31:48 AM
Hi all,
I'm trying to construct a block of text as a summary to a worksheet.
I want to include some of the calculated values (and their UoM).
Previously I've done this by padding the text with spaces and putting the variable 'over' the space.
This works to a certain extent but it can look a little scruffy as I have to leave space incase the varible is long.
All suggestions are welcome
Regards
Peter J Francis
Thermal Design Consultants Ltd
Thermal-Design.Net
I'm trying to construct a block of text as a summary to a worksheet.
I want to include some of the calculated values (and their UoM).
Previously I've done this by padding the text with spaces and putting the variable 'over' the space.
This works to a certain extent but it can look a little scruffy as I have to leave space incase the varible is long.
All suggestions are welcome
Regards
Peter J Francis
Thermal Design Consultants Ltd
Thermal-Design.Net
Peter J Francis
Twitter: @PeterJFrancis
Thermal Engineer , Maker , Pilot
#2 Posted: 3/26/2019 6:09:07 AM
You can use "Writer Region" plugin by Davide Carpi.
With the command CTRL + SHIFT + M (or the Edit Marh icon) and pasting into, the mathematical expression that you previously copied from a mathematical area.
sergio
With the command CTRL + SHIFT + M (or the Edit Marh icon) and pasting into, the mathematical expression that you previously copied from a mathematical area.
sergio
#3 Posted: 3/26/2019 9:24:23 AM
Hi Sergio,
Unfortunatley "Writer Region" doesn't evaluate the formula it just displays it.
I'll continue searching for a solution , if I find one I'll post it here
Thanks
Peter
Unfortunatley "Writer Region" doesn't evaluate the formula it just displays it.
I'll continue searching for a solution , if I find one I'll post it here
Thanks
Peter
Peter J Francis
Twitter: @PeterJFrancis
Thermal Engineer , Maker , Pilot
#4 Posted: 3/26/2019 9:57:46 AM
Hi Peter. This helps?: https://en.smath.com/forum/yaf_postst2060_Snapshot-Region.aspx
Actually, MS Excel have a similar function: paste as linked image. I use this for show summaries in excel.
Best regards.
Alvaro.
Actually, MS Excel have a similar function: paste as linked image. I use this for show summaries in excel.
Best regards.
Alvaro.
#5 Posted: 3/26/2019 10:50:31 AM
WroteI'm trying to construct a block of text as a summary to a worksheet.
I want to include some of the calculated values (and their UoM).
Smath is ultimate for best publishing in several preferences.
As a summary, insert the text and the maths in an image region.
Done SS 6179 ... if red => report.
In short: Smath is equivalent/superior to maths book style.
Jean
Image Formated LABEL examples Martin Bar.sm (31 KiB) downloaded 105 time(s).
#6 Posted: 3/10/2022 11:24:24 AM
Sorry to resurrect this thread, but I recently found what I think is the solution and wanted to post it here since this thread is the first result on Google for this question:
Here are the steps I follow to embed live variables into a text field:
Let me know if there are questions or if these steps don't work for people. I'm curious if there are corner cases where this trick does not work, as I've only tried it thus far with very simple variables and units.
Edit: Here are two screenshots of the live variable in action. The first shows how the text field with embedded variable appears normally, and the second shows them highlighted to demonstrate the variable is truly embedded into the text field.


Here are the steps I follow to embed live variables into a text field:
- Click anywhere in empty space on the worksheet
- Press 'Shift+"' as if you are typing an open quotation mark. This starts a text field.
- Type some placeholder text with a space in between two words, like "test test"
- Go to the variable that you want to insert into the text field and make sure it is evaluated, i.e. it shows an equal sign after it with some valid value & units. For example, I might evaluate the variable Vin such that it appears as "Vin = 5V" in the worksheet.
- Now, highlight the entire contents of that variable field (Vin = 5V) and copy it (CTRL + C)
- Now, go back to the text field you created in step 2 and place your cursor in the middle of the two words "test" and "test". In that place, paste (CTRL + V) the variable that you just copied.
- At this point, you should have a live variable that is evaluated in the middle of your text field. The evaluated result and units may be unexpected, so just delete the result and the "=" sign, then re-type the = sign to get the correct format of your answer and units.
Let me know if there are questions or if these steps don't work for people. I'm curious if there are corner cases where this trick does not work, as I've only tried it thus far with very simple variables and units.
Edit: Here are two screenshots of the live variable in action. The first shows how the text field with embedded variable appears normally, and the second shows them highlighted to demonstrate the variable is truly embedded into the text field.
#7 Posted: 3/12/2022 3:40:59 AM
WroteLet me know if there are questions or if these steps don't work for people.
The steps above work, nothing is wrong with those items.
And now there is a simpler way to write formulas in text regions.
If equation replacement is enabled for that particular text region,
you can insert > formula and directly write anything math involded.
And it will be evaluated and changed according to variable value.
So you won't need to copy/paste everything.
Regards
2 users liked this post
#8 Posted: 3/12/2022 12:10:16 PM
Excellent, thank you overlord!
#9 Posted: 3/12/2022 1:59:12 PM
That feature is amazing! For how long has it been available? Brand new stuff for me.
1 Pages (9 items)
-
New Posts
-
No New Posts