Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12467
| From | David Reiss <dbreiss@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How Can I Make A String Variable With Styled Text? |
| Date | 2012-11-26 04:27 +0000 |
| Message-ID | <k8ur30$sp4$1@smc.vnet.net> (permalink) |
| References | <k8psvt$is4$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
One should be able to do this with the function Interpretation;
however, Interpretation does not seem to work properly with strings.
I "interpret" that as a bug...
Thus, I believe that one should be able to define
temp = Interpretation[
Row[{Style["This is boldface.", Bold], " The rest is not."}],
"This is boldface. The rest is not."]
and then be able to execute some thing like,
Characters[temp]
and get the list of characters in the string. This, however, does not
work.
--David
On Nov 24, 2:31 am, Gregory Lypny <gregory.ly...@videotron.ca> wrote:
> Hello everyone,
>
> I have a string variable
>
> myString = "This is boldface. The rest is not."
>
> When I execute myString, I want the first sentence to appear in bold type. Selecting the sentence and formatting it as bold when I create the string does not work. StringForm will do the trick, as in
>
> myString = StringForm["`` The rest is not.", Style["This is boldface", Bold]]
>
> but, of course, the Head of myString will no longer be String. Is there any other way to do this?
>
> Gregory
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
How Can I Make A String Variable With Styled Text? Gregory Lypny <gregory.lypny@videotron.ca> - 2012-11-24 07:29 +0000
Re: How Can I Make A String Variable With Styled Text? "Nasser M. Abbasi" <nma@12000.org> - 2012-11-25 10:08 +0000
Re: How Can I Make A String Variable With Styled Text? David Bailey <dave@removedbailey.co.uk> - 2012-11-26 04:38 +0000
Re: How Can I Make A String Variable With Styled Text? David Reiss <dbreiss@gmail.com> - 2012-11-26 04:27 +0000
csiph-web