I have a text like below
Treatment-Emergent Adverse Events <sup>a</sup> Terms Suggestive of Abuse Potential Leading to Study or Study Drug Discontinuation by Decreasing Frequency Safety Analysis Set
while showing it in matTooltip , tooltip text is showing as a but it should a as superscript character. but it is showing a as it is in the string.
How to resolve it.
What I know/I tried so far:
\spadesuit or \spades renders spade with filled black color.
Similarly, \clubs or \clubsuit renders club with filled black color.
Now \hearts or \heartsuit just renders heart with white filled bg.
\colorbox treats this as a box/rectangle, thus hiding the shape obviously.
I can get black diamond as \blacklozenge
Please see this in new tab
Also, I get it that club and spade are black and the diamonds and heart are red in a deck, but I want heart symbol in black as well.
How can I get that? Thanks.
Asked on github too : https://github.com/KaTeX/KaTeX/discussions/2546
Credits and thanks to : Ronkok
KaTeX \hearts and \heartsuit render a heart outline, ♡, U+2661, , so they do not help you. The Unicode character for a filled heart is ♥, U+2665. That glyph is not in the KaTeX fonts, but you can still use it and KaTeX will substitute the glyph from the Times New Roman system font.
KaTeX emulates LaTeX, and this is not a LaTeX function, so KaTeX will write at least one error to the console (two if in strict mode). If you don't mind a console error, then no worries. KaTeX does render the heart. Just copy ♥ and paste it into your work.
Until there is any further update, this is what'll we have to work with guys.
I would like to implement karaoke-like progress highlight for iOS.
I know I could use NSAttributedString and highlight the text character by character. However, I would like the highlight to progress pixel by pixel, not character by character.
Any ideas?
P.S. No need for sample code, just point me to the right direction.
Here is an example:
I can't think of any automatic way to do that. There would be several problems to solve. It would be pretty hard, I think.
The hardest would probably be figuring out the pixel position of each word so you can pace the coloring to match the timing within the music. With text and attributed layout, you could probably get the text engine to give you the boundaries of each word and then apply the color attribute to each word as it's spoken/sung. You'd have to have data about the time offset for the beginning and end of each word's being sung.
You might have to use Core Text to get layout information about the bounding rectangles of each word.
Once you get that you could build a path (UIBezierPath or CGPath; they're pretty interchangeable) that follows the flow of the text, and then install that path in to a shape layer. You could then make the text transparent, make the shape layer a colored background that shows through, and animate the shape layer's strokeStart and/or strokeEnd properties to make it fill the text. You might need to do it word by word with a short animation that interpolates between one word and the next to get the timing right.
You probably want to have a look at Core Text, which is the lower level framework used for laying out text, using this you can obtain necessary paths that you need to render said effect (I suggest starting from answers similar to this)
There are plenty of answers for alternative, perhaps simpler answers, for example character by character or word-by-word, which may be easier to implement.
I'm new to Objective C and developing an app which requires I need to highlight the text when it is narrated i.e.
for example consider the below sentence
"A Blue Jackal is dancing in the forest".
when A is narrated it should turn to red and all other words should be black and when Blue is narrated it should be turned to red and all other words will be shown in black.
I have used UILabel for the sentence and my problem is how to find the values of sound position and highlight it accordingly.
Could any one please share code snippet or help me regarding this.
Thanks in advance.
What was the original historical use of the vertical tab character (\v in the C language, ASCII 11)?
Did it ever have a key on a keyboard? How did someone generate it?
Is there any language or system still in use today where the vertical tab character does something interesting and useful?
Vertical tab was used to speed up printer vertical movement. Some printers used special tab belts with various tab spots. This helped align content on forms. VT to header space, fill in header, VT to body area, fill in lines, VT to form footer. Generally it was coded in the program as a character constant. From the keyboard, it would be CTRL-K.
I don't believe anyone would have a reason to use it any more. Most forms are generated in a printer control language like postscript.
#Talvi Wilson noted it used in python '\v'.
print("hello\vworld")
Output:
hello
world
The above output appears to result in the default vertical size being one line. I have tested with perl "\013" and the same output occurs. This could be used to do line feed without a carriage return on devices with convert linefeed to carriage-return + linefeed.
Microsoft Word uses VT as a line separator in order to distinguish it from the normal new line function, which is used as a paragraph separator.
In the medical industry, VT is used as the start of frame character in the MLLP/LLP/HLLP protocols that are used to frame HL-7 data, which has been a standard for medical exchange since the late 80s and is still in wide use.
It was used during the typewriter era to move down a page to the next vertical stop, typically spaced 6 lines apart (much the same way horizontal tabs move along a line by 8 characters).
In modern day settings, the vt is of very little, if any, significance.
The ASCII vertical tab (\x0B)is still used in some databases and file formats as a new line WITHIN a field. For example:
In the .mer file format to allow new lines within a data field,
FileMaker databases can use vertical tabs as a linefeed (see https://support.microsoft.com/en-gb/kb/59096).
I have found that the VT char is used in pptx text boxes at the end of each line shown in the box in oder to adjust the text to the size of the box.
It seems to be automatically generated by powerpoint (not introduced by the user) in order to move the text to the next line and fix the complete text block to the text box. In the example below, in the position of §:
"This is a text §
inside a text box"
A vertical tab was the opposite of a line feed i.e. it went upwards by one line. It had nothing to do with tab positions. If you want to prove this, try it on an RS232 terminal.
similar to R0byn's experience, i was experimenting with a Powerpoint slide presentation and dumped out the main body of text on the slide, finding that all the places where one would typically find carriage return (ASCII 13/0x0d/^M) or line feed/new line (ASCII 10/0x0a/^J) characters, it uses vertical tab (ASCII 11/0x0b/^K) instead, presumably for the exact reason that dan04 described above for Word: to serve as a "newline" while staying within the same paragraph. good question though as i totally thought this character would be as useless as a teletype terminal today.
I believe it's still being used, not sure exactly. There might be even a key combination of it.
As English is written Left to Right, Arabic Right to Left, there are languages in world that are also written top to bottom. In that case a vertical tab might be useful same as the horizontal tab is used for English text.
I tried searching, but couldn't find anything useful yet.