Properties
Category
Uncategorized
Similar Topics
Statistics
Comments
7
Participants
2
Subscribers
2
Votes
1
Views
839
Share

how to insert a line break within a sequence of texts?
Needs Answer
I'm trying to make this sequence of texts, but something is not working regarding the line break:
Sequence(Text("" + (0 + 2i) + \\ + "cm", l5(i + 0)), i, 0, 30)
First item should look like this:
2
cm
If I only put one item, it works typing it like this:
2
\\cm
But that does not work within a sequence.
- 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
Sequence(Text("" + (0 + 2i) + "\\ " + "cm", l5(i + ?0), true, true), i, 0, 30)
https://wiki.geogebra.org/e...
note also: the new parameters 5 and 6 for alignment
Thank you! That works.
But I didn't get the part of bolean parameter. Which parts of my formula are booleans? Why 2 booleans and not other quantity?
Another doubt: is there any way to make text align in the center?
The value of a boolean is true or false. 3. and 4. Parameters in the formula has this value, so there are boolean parameter.
There are "position paramter" that means the meaning of the parameter is given by its position. If one wants to indicate the 4th parameter (laTex), then one is forced to indicate also the parameter. 1 to 3 so that a 4th parameter (laTex) can be defined at all.
For further questions: please read the above link very carefully and thoroughly.
I know what a boolean is. I don't know why MY parameters are booleans. I didn't expect my code to ask me for "true" or "false" options.
I have used booleans for: "if this option is selected, then draw a ball, if this option is not selected, then hide the ball drawing". Or: "if variable is within this range of numbers, then draw a ball, otherwise, don't draw it". It's the first time I am dealing with booleans inside a text code.
So my code is:
Sequence(Text("" + (0 + 2i) + "\\ " + "cm", l5(i + ?0), true, true), i, 0, 30)
I assume I can divide it in these parts:
1) ""
2) (0 + 2i)
3) "\\ "
4) "cm"
5) l5(i + ?0)
You mentioned LaTex... you mean this one: "\\ " ?
I didn't know that was a boolean.
And which other one is also a boolean?
quote: ou mentioned LaTex... you mean this one: "\\ " ?
yes
"\\ " inside a string is laTex code (not a bolean)
and the 4. parameter say to ggb: please interprete the text in the first parameter as latex (that mean all is in a string or converted to a string and this text has or has not laTex code [for example "\\ " or "\frac{"+<value>+"}{"+value+"}" etc])
Addendum:
Better wording: ......please interpret the full text in parameter 1 with the rules and syntax of laTex.....
there exist only one paramter to say ".... please...laTex...."
Maybe is more cleare if you read the above link (in my first post) very carefully and thoroughly
Comments have been locked on this page!