How do you rotate a text - geogebra

There is a video on how to rotate an object around a point but I fail to select the text.

I wanted to do the same thing and saw your question before figuring this out.
1. The "Geogebra Way"
In the Algebra Perspective enter the following RotateText commands in the Input box at the bottom:
RotateText["Rotated text using degrees.", 45°]
RotateText["Rotated text using radians.", 0.785398]
In the Construction Protocol view, this is represented by
"rotatebox{45}{ \text{Rotated text using degrees.} }"
"rotatebox{44.9999999}{ \text{Rotated text using radians.} }"
Note that the radian form of the RotateText command is converted to degrees in the construction step. So this creates an graphical object that renders the text in a LaTeX "rotatebox". It's rather strange that the system doesn't have a tool to create rotateable text.
You can attach the text to an object via the object's Properties->Position->Starting Point. Only certain types of objects can be used, and the text can only be placed/moved underneath the object, which is odd. You can get around this by creating a line segment, attaching the rotateable text object to a desired end-point on the line segment above the location you want the final text, and then hiding the line segment.
2. A better, "undocumented" Geogebra method!
One can actually use LaTeX in captions of objects. Here's how you would enter the text:
$\rotatebox{45}{ \text{Rotated text using standard text box!} }$
A nice thing about this is the caption can be easily placed above the object. Notice that LaTeX commands are surrounded by the dollar sign. Also notice that there is a backslash as part of the \rotatebox command.
Also, one can use the standard text tool to do the same thing. This has the advantage that the text can be dynamic! Create some text anywhere. Then edit it's properties on the Text tab. Check the LaTeX checkbox, and enter the following for the text:
$\rotatebox{45}{ \text{} }$
Then inside the \text{} brackets, select an object. The text will be updated with the object's value. Or a combined form:
$\rotatebox{45}{ \text{"The value is:" + SliderObject} }$
I've tried to put an object in the "degreees" field, but could not get that to work.

Use the RotateText command like this:
RotateText("What ever text you want", angle)

Related

Styling specific line of Text on Jetpack Compose

So, it's kind of a simple styling.
Text(
text = "some text which can extends to many lines"
)
how would someone build an annotated string to style only specif lines of the text? And by line I mean what it's actually rendering as a line - and not something predefined as a list of sub strings.
I've imagine to make a use of combined textLayoutResult with the annotated capability, but by reading the documentation I don't have much clue how to do so.
The plan was to the TextLayoutResult to retrieve the number of lines rendered on text. Then, it should be theoretically possible to retrieve the sub string on each of the lines rendered. And by pushing them on the annotated processor, the desired results would be achieved.
What am I missing?
I've managed to achieve the desired effect.
For those who want to do, you will need at least:
Two Text components;
A mutable state to keep track of offset on the text;
You limit the first Text by the number of maxLines - 1 and uses TextLayoutResult to retrieve the last offset of the last line. Then, you just update the state on the composable and create another Text component with the substring which starts from the last one. Then, you can apply the filters that you wish on this one.
Repeate the process for as many lines as you wish.

How to get coordinates of an highlighted text in Eggplant

I have a text box, the size will change, using Ctrl+a I have highlight the text in the text box, how to get the coordinates of this highlighted text? so that I can readtext() that area. Actually I tried copying the highlighted text to clip board and then to put in a variable. But if I compare with an existing text I am getting an \n for the end of the line, if I compare the text retrieved with original text , they don't match. so I am thinking of using readtext()
Please help me in this regard.
Can you try with format function. Should get rid of escape sequences.
typeText controlKey&a
typeText controlKey&c
put remoteClipboard() into yourVariable
put format("%b", yourVariable) into newVariable
Reference link: SenseTalk
how are you comparing in your scenario?
When your use "contains" in your condition you can achieve what you have expected.

Special unicode characters in TButton.Caption (instead of icons)

Is it possible to enter from keyboard special Unicode characters, link the ones below?
U+2603 ☃ SNOWMAN
U+2604 ☄ COMET
U+2605 ★ BLACK STAR
U+2606 ☆ WHITE STAR
U+2607 ☇ LIGHTNING
U+2608 ☈ THUNDERSTORM
U+2609 ☉ SUN
U+260A ☊ ASCENDING NODE
U+260B ☋ DESCENDING NODE
I would like for example to have buttons with up/down arrows in them, without loading images.
I have tried entering Alt+08593 on keyboard but other character (than the expected arrow) will be inserted.
Update:
The reason for this is LAZINESS. I am too lazy to search for icons or create my own icons. For example you can simply replace the notorious 'save' floppy disk icon. Just take a look at: 💾. BAM! Nice. Right?
Update:
It seems some characters such as 📗 (green book = 128215) are not accepted by Delphi, with copy/paste.
Update:
There is nice component that allows you to put unicode chanracters in a image list:
https://github.com/EtheaDev/IconFontsImageList
The Delphi IDE won't accept ALT key codes that high. A couple of alternatives:
Paste the text from somewhere else.
Enter the numeric code directly in the .dfm file.
As an example of the second approach, try this in your .dfm file for the button caption property:
Caption = #8592#8593#8594#8595
You also mention Green Book U+1F4D7. That is from outside the BMP, and hence encoded with a surrogate pair:
Caption = #55357#56535
My guess is that as soon as you want your glyphs to be shown in colour, or at a different size, you will find that using text makes this impossible. You are also likely to encounter fonts that don't contain glyphs for the characters you select. So you will find that using images is the most robust approach.
Or, alternatively, if you had a table of the decimal values:
9731 ☃ SNOWMAN
9732 ☄ COMET
9733 ★ BLACK STAR
9734 ☆ WHITE STAR
9735 ☇ LIGHTNING
9736 ☈ THUNDERSTORM
9737 ☉ SUN
9738 ☊ ASCENDING NODE
9739 ☋ DESCENDING NODE
then you can use the keyboard as follows in Delphi.
To change the caption of Button1 to be the snowman:
Press Alt+F12 to edit the form as text
Press Ctrl+E to enter incremental search mode
Type Button1, or as much of it as is required to locate the definition of Button1
To the right of the Caption = property definition (I'm assuming VCL here) enter # followed by the relevant Unicode value, e.g. #9731
Caption = #9731
If you want text as well as the snowman, the character code goes outside quotes, so e.g.
Caption = 'Snowman = '#9731
More info on the # syntax (which is more commonly entered in Delphi source, rather than in the text view of form files) can be found by reading about control strings, as they are actually called, in the online documentation.

Word Openxml: how to get a text box the right size?

I'm using PHP to generate docx documents from a database. The generated document contains column charts which have labels attached (i.e. user shapes containing textboxes). In an attempt to get the textboxes to accommodate and display all of the text (i.e. it shouldn't be necessary for the user to resize a textbox to see all the text) my code calculates how many characters will fit into 3cm, adds linefeeds to the string as required and tells me how many lines of text are needed. I have:
<a:xfrm xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main">
<a:off x="1638276" y="1676399"/>
<a:ext cx="1257325" cy="'.(252000 * $labelLeftLines).'"/>
</a:xfrm>
which I believe should give me a text box around 3.5cm wide (extra .5 for the internal padding) and a height of .7cm multiplied by whatever is the value of $labelLeftLines. However, the text box always turns up as 3.cm wide by .86cm high, which only ever displays one line of text.
If I add in 'autofit':
<a:bodyPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" vertOverflow="clip" wrap="square" rtlCol="0">
<a:spAutoFit/>
</a:bodyPr>
the generated file looks just the same, though, when I right click on the textbox to inspect the properties, 'autofit' is indeed applied. I have to uncheck it and recheck it to make it affect the textbox.
Any openXML gurus out there?
Hmm, some random floundering around revealed that the values I need to manipulate are here:
<cdr:relSizeAnchor xmlns:cdr="http://schemas.openxmlformats.org/drawingml/2006/chartDrawing">
<cdr:from>
<cdr:x>0.47</cdr:x>
<cdr:y>0.75</cdr:y>
</cdr:from>
<cdr:to>
<cdr:x>0.67</cdr:x>
<cdr:y>1</cdr:y>
</cdr:to>
Changing those values does actually change the size of the texbox, though I haven't a clue what units are being used. From 0.75 to 1 produces a height of 1.43cm.
One day I'll maybe be able to find my way around the doucmentation.

Latex color box inline with text

I'm trying to put together a LaTeX color box. The xcolor package \fcolorbox seem to be what I want, but I can't get the rendering quite correct. When I use
\fcolorbox{black}{red}{}
it renders a small box sunken to the bottom of the text line. The best I've managed to do is to fake it with a similar text color:
\fcolorbox{black}{red}{\textcolor{red}{--}}
However, I'm worried that this won't render correctly in all situations with defined colors. Is there a way I can declare an empty text box with full in-line text height? Is there another solution?
I'm basically looking for the code that produces the color boxes all through the document at ftp://ftp.dante.de/pub/tex/macros/latex/contrib/xcolor/xcolor.pdf. The boxes I'm referring to are used throughout, but the first instance is on page 4. Thanks.
The xcolor.dtx file in the same directory as the pdf contains the source for the package and the source for the documentation. The relevant bits from the source for the documentation:
\def\testclr#1#{\#testclr{#1}}
\def\#testclr#1#2{{\fboxsep\z#\fbox{\colorbox#1{#2}{\phantom{XX}}}}}
...
(Answer: 40\% \testclr{green} $+$ 60\% \testclr{yellow} $=$ \testclr{green!40!yellow}, e.g., |\color{green!40!yellow}|)
Basically, use \phantom{} on the contents of your color box, and make sure that at least one of the phantom characters is full-height.
Also, https://tex.stackexchange.com/

Resources