Text attributes in iFormula
Brought to you by:
jrheinlaender
iMath can recognize text attributes for print, but treats them as variables in calculations (or Vice versa).
There are three variables in the example, which I want to find: f_1, f_2 and f_3. And I would like to highlight, that I use the value of y_1 for all of them instead of y_2 and y_3. I tried with the "bold" attribute.
The behaviour depends on how I use it: "bold y_1" or "bold {y_1}".
Anonymous
I think this is not really a bug. It just works different than you expect.
So, if I've printed once "bold y_1" to highlight this variable, I should then create "bold y_1 = <something>", right? Ok</something>
Should we close the ticket or maybe move it to feature request?
Yes thats right. Just think of your variable being called "bold y_1", not "y_1".
What feature would you want to request?
bold y_1 = y_1
But how should iMath decide when to print y_1 in bold font, e.g. in a generated formula?
EQDEF bold y = a + b
VAL(y)
Result will be y=a+b but should y be bold or not?
Good question. I've posted my view of it in the ticket #30.
In the case of equations/expressions with automatic formatting, including that ones, that are generated by GiNaC during recalculations, like VAL(), it's logically to keep attributes only if the variable/expression/number is kept unchanged. If the variable transforms to a numerical value, attributes should be dropped.
Another example: when we first print "y = bold{a + c} + b", there is no sence to keep "bold' attribute of cource, because varibles will be rearranged:
VAL(y) -> y = a + b + c
Actually I just would like to see "bold y" only once in the first equation without automating formatting, when I need to pay attention to it.
We should distinguish formatting attributes:
bold, ital, font..., size..., color...
and attributes, that have exact mathematical sense:
vec, dot, bar, func.
E.g. "vec x" and "x" are different mathematical elements and they should be parsed as you said before:
iMath treats attributes as part of the variable name.
But I have seen many publications where vectors are always printed in bold type! I think that was the original reason why I made bold etc. a part of the variable name.
I can't see a good way to enable both behaviours:
Maybe there could be a an option for this? Something like "remembervariableformatting=false" to equate "bolc y" and "y".
Like this one? Vector is not only bold, but also regular (non-italic). Maybe there is some special attribute in Math? If not, let's make an exception for "bold".
Feel difference between "func" attribute and a quoted string.
I just saw there is a non-italic attribute. So vectors should perhaps be
"bold nitalic v"
and they look different than "bold func v".
I'm not so happy about the exception. I would prefer the remembervariableformatting option.
They may look different because your settings for functions and text in the Math formula may be different.
Maybe you're right, it's better to add this option. But how it should handle mix of vectors and highlighted text in one document or even one formula? And such name "remembervariableformatting" is very long, imho.
Last edit: zeon_account_will_be_deleted 2015-04-11
About mix of vectors and formatting: Isn't the current behaviour enough where bold{x} is pure formatting (with autoformat=false) and bold x is a variable called "bold x" ?
Maybe. But if iFormula contains a statement like "SUBST", automatic formatting turns on automatically.
You've left it for a future release. Let's think about it later.
Ticket moved from /p/ooo-imath/bugs/12/