Crop text

Is there a way to crop text?

like if the word is 7 letters long.

Have it crop to 4 or 3 letters only.

Thank you

Hi Alfred! Sure! This is possible using the TC function, these are the examples provided in the app:

  • $tc(ell, "sOme tExT", 4)$ Will ellipsize (so cut and add "…") if text is longer than 4 chars
  • $tc(cut, "sOme tExT", 2, 5)$ Prints 5 chars starting after the second
  • $tc(cut, "sOme tExT", -2)$ Prints last 2 chars

You can both use "ell" and "cut" with the same parameters, the difference is that "ell" will also add 3 dots at the end when cropping the text. Off course "some text" can be replaced with anything, also functions, so, to show first 2 chars of the month name you can use $tc(cut, df(MMMM), 2)$

Hi, wondering if there is any way to use the same formula but instead of counting the character it would look at the total length.

Maybe if you plug in a formula instead of the number?