Linked Questions

0
votes
2answers
205 views

help with StringJoin [duplicate]

dollarWon := 100 "(" <> Style["$" <> ToString[dollarWon], If[dollarWon >= 0, Darker[Green], Red]] <> ")" I am getting an error: String ...
1
vote
2answers
148 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 ...
2
votes
1answer
77 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 ...
0
votes
0answers
138 views

How to highlight a string pattern? [duplicate]

This is an example in the help pages (Working with patterns: Highlight Patterns): ...
0
votes
0answers
32 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 ...
50
votes
3answers
3k 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
1answer
2k 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 ...
17
votes
3answers
962 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, ...
6
votes
3answers
814 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
2answers
237 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, ...
2
votes
3answers
313 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: ...
1
vote
2answers
1k 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 ...
3
votes
2answers
694 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 ...
3
votes
1answer
135 views

How to use a variable within StringJoin

I would like Mathematica to symbolically line up partial derivative symbol with a value stored in variable. I wrote this simple code below ...
0
votes
1answer
57 views

Typing custom plotlegend

I have the following ListStepPlot: ...