Problem with text

Škola na trećem shared this question 1 month ago
Answered

So, I have a problem with text... As you can see in the picture, there is ? when the condition is not satisfied, and I want that part to be empty in that case. It is the same if I put (in not-satisfying part If command) Text("") or "".

Furthermore, I would like that row to be colored in red. That row represents "transfer" in addition.

Help, anyone?

08f09d550a6375d39e7591d1f13b30d3

Best Answer
photo

If you need help on complicated things, we need a file to help you, because we would not be able to recreate your construction.

Also consider using e.g. \red{element to be displayed in red} or TableText Command or SetColor command together with an If statement

Comments (7)

photo
1

So, I managed to do this:

/wewJ79EZq8dOnSoqOrzfvv27eQ+hRzIMX9KSEMpqW0iIAIi0AUBCWkXsLSrCIiACIQISEhDVLRNBERABLogICHtApZ2FQEREIEQAQlpiIq2iYAIiEAXBCSkXcDSriIgAiIQIiAhDVHRNhEQARHogoCEtAtY2lUEREAEQgQkpCEq2iYCIiACXRCQkHYBS7uKgAiIQIiAhDRERdtEQAREoAsCEtIuYGlXERABEQgRkJCGqGibCIiACHRBQELaBSztKgIiIAIhAhLSEBVtEwEREIEuCEhIu4ClXUVABEQgREBCGqKibSIgAiLQBQEJaRewtKsIiIAIhAhISENUtE0EREAEuiAgIe0ClnYVAREQgRABCWmIiraJgAiIQBcEJKRdwNKuIiACIhAiICENUdE2ERABEeiCgIS0C1jaVQREQARCBCSkISraJgIiIAJdEJCQdgFLu4qACIhAiICENERF20RABESgCwIS0i5gaVcREAERCBH4HxBOmFRB91opAAAAAElFTkSuQmCC

But I did it by creating another text, coloured it red, and put it on top of another text from which I removed that "transfer" line.

photo
2

If you need help on complicated things, we need a file to help you, because we would not be able to recreate your construction.

Also consider using e.g. \red{element to be displayed in red} or TableText Command or SetColor command together with an If statement

photo
1

If you need help on complicated things, we need a file to help you, because we would not be able to recreate your construction.

Also consider using e.g. \red{element to be displayed in red} or TableText Command or SetColor command together with an If statement

photo
1

try if(pr_t==0,"",""pr_t) although

better if you put the values in spreadsheet, then create a table

photo
1

The TableText command is usually nice for tables with a regular layout, and has an easy way to color whole lines. In your case it might not be suitable because I think you can't specify that single horizontal line with it.

Generally you can color texts with multiple colors however you want: For named standard colors you can use \red{<stuff>}, \purple{<stuff>}, etc. (as Simona had already mentioned). If this doesn't suffice, you can even specify RGB values directly by using fgcolor, e.g. \fgcolor{00ff88}{<stuff>} (hexadecimal RGB values).

If you want an empty string if a condition is not applied you need to specify that in the if command, and then you need to make sure that the if command returns a string in any case (that's why mathmagic's example has the quotation marks in the else branch before the variable).

Attached is a small example that makes use of all those things.

photo
2

I think you can't specify that single horizontal line with it.
You can, see https://www.geogebra.org/m/Eq5T3vV3

photo
1

Oh, nice. Hadn't noticed before that it's possible to supply bit masks for separation lines.

photo
© 2021 International GeoGebra Institute