Message Boards Message Boards

0
|
6059 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

[?] Join Styled Characters with StringJoin?

Posted 6 years ago

End result will be the PNG below, but when I use StringJoin to join Styled Characters, error pop up StringJoin::string: String expected at position 1 in StringJoin[M]. Possible issue is StringJoin works only with explicit strings, while TreeForm[Style["M",Red]] shows it is not a String and thus cannot use StringJoin, how could I make it?

POSTED BY: Michaki Sunny
2 Replies

Use Row to join non-string characters:

Row[{Subscript["C", 6], Subscript[Style["H", Blue], 14]}]

enter image description here

POSTED BY: Jason Biggs

There is no PNG file in your post. Try adding it.

POSTED BY: Moderation Team
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract