Properties
Category
Uncategorized
Similar Topics
Statistics
Comments
7
Participants
5
Subscribers
6
Votes
1
Views
582
Share
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?
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
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
So, I managed to do this:
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.
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
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
try if(pr_t==0,"",""pr_t) although
better if you put the values in spreadsheet, then create a table
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.
Comments have been locked on this page!