Linked Questions

0 votes
2 answers

help with StringJoin [duplicate]

dollarWon := 100 "(" <> Style["$" <> ToString[dollarWon], If[dollarWon >= 0, Darker[Green], Red]] <> ")" I am getting an error: String ...
dabd's user avatar
  • 839
3 votes
1 answer

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 ...
Konstantin's user avatar
1 vote
2 answers

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 ...
vito's user avatar
  • 8,958
0 votes
0 answers

How to highlight a string pattern? [duplicate]

This is an example in the help pages (Working with patterns: Highlight Patterns): ...
HyperGroups's user avatar
  • 8,607
0 votes
0 answers

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 ...
Veliko's user avatar
  • 349
54 votes
3 answers

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 ...
cormullion's user avatar
  • 24.2k
21 votes
1 answer

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 ...
Լ.Ƭ.'s user avatar
  • 333
18 votes
3 answers

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, ...
Jonathan Prieto-Cubides's user avatar
7 votes
3 answers

How to change the word's color in string

The picture I load is my target: This is my code in mathematica ...
yode's user avatar
  • 26.5k
6 votes
3 answers

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 ...
alancalvitti's user avatar
  • 15.1k
5 votes
2 answers

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, ...
mystackexchangeusername's user avatar
6 votes
3 answers

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" ...
user avatar
2 votes
3 answers

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: ...
Travis Arlen McCracken's user avatar
2 votes
2 answers

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 ...
orome's user avatar
  • 12.8k
3 votes
2 answers

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 ...
Bob2Alice's user avatar
  • 127

15 30 50 per page