Linked Questions
17 questions linked to/from How to join two Style[]d strings
0
votes
2
answers
240
views
help with StringJoin [duplicate]
dollarWon := 100
"(" <> Style["$" <> ToString[dollarWon], If[dollarWon >= 0, Darker[Green], Red]] <> ")"
I am getting an error: String ...
3
votes
1
answer
314
views
How to create a multicolored string? [duplicate]
I'm interested in displaying a string composed from sub-strings of different colors.
Mathematica allows one to create a list comprising sub-strings of different colors, for example
...
1
vote
2
answers
173
views
Colorize letters in the given string [duplicate]
How can I colorize letters in the given string?
For instance:
string = "jaonvtaqhsy"
How to colorize 3 letters in the middle of ...
0
votes
0
answers
146
views
How to highlight a string pattern? [duplicate]
This is an example in the help pages (Working with patterns: Highlight Patterns):
...
0
votes
0
answers
36
views
Join styled and normal string and keep formating [duplicate]
I have a styled and a normal string and I want to join them. However, it seems that the styled object doesn't have the structure of a string and so they cannot be joined. I can do it with Print but I ...
55
votes
4
answers
4k
views
Visualizing the difference between two sequences (strings)
I'm trying to develop a way of comparing two sequences (probably originally text, such as text writing or source code, possibly converted to lists). As a familiar example, consider the revisions ...
21
votes
1
answer
3k
views
How to strip all formatting from a string and convert it to plain text?
The documentation on String states:
But if I try to perform some manipulations on this string, for example, take 2 words from the left, I get some shards of ...
19
votes
3
answers
1k
views
Highlighting pattern strings in a large text
I would like to apply Style to strings that are matched, for example, with one or more specified patterns or regular expressions, a string or a list of both, ...
8
votes
3
answers
1k
views
How to change the word's color in string
The picture I load is my target:
This is my code in mathematica
...
6
votes
3
answers
930
views
Highlighting text with StringReplacePart but also using Style, Subscript
For a Natural Language Processing analysis task it's desirable to highlight a text string programmatically according to XML tags that reference specific words or phrases.
The XML tags specify the ...
5
votes
2
answers
307
views
Character display color
I'm looking to cause the front end to display individual characters in a specific color, just in general, as a default sort of thing. For instance, the character "1" would always display as a red 1, ...
6
votes
3
answers
436
views
Italic style in the label
For the FrameLabel, I have:
Style["\[NumberSign] Humans per city", FontFamily -> "Latin Modern Math"]
How can I make only "Humans" ...
3
votes
3
answers
2k
views
How do I make a single character bold?
I have a string of characters, like
"CDABOZPVRYXSWQEGNILUTHMKJF"
and want to convert it to a string in which the character at position ...
2
votes
3
answers
441
views
Visualizing Base-10 Digits (0-9) As Corresponding Colors
Is there a way I can visualize my output (which happens to be in base-10 by default) with a specific color text corresponding to the digit (0 through 9)?
Here is the key for the coloring scheme:
0: ...
3
votes
2
answers
867
views
Highlighting or coloring certain words / substrings appearing in a larger string
I have one longer string, longString, and a set $S$ of shorter strings {ss1,ss2,ss3,...}. I'd like to print out ...