6 replies [Last post]
ScriptHam
Offline
newbie
UK
Last seen: 16 years 38 weeks ago
UK
Joined: 2006-01-04
Posts: 4
Points: 0

Hi Smile

Does anyone know if there is a way of using CSS to italicise the letters a to z and A to Z only, leaving numbers 0 to 9 and symbols =, () ! etc. NOT in italics?

If CSS won't produce this can it be obtained by other means, Javascript perhaps?

I look forward to hearing from you.

Many thanks
ScriptHam

thepineapplehead
thepineapplehead's picture
Offline
Moderator
Last seen: 22 weeks 2 days ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9683
Points: 819

Letters Only In Italics - Not Numbers

Can't be done in CSS, and would be quite difficult (I assume) in scripting, although could be done.

Wait for Chris or one of the other scripting gurus to come along Laughing out loud

Verschwindende wrote:
  • CSS doesn't make pies

ScriptHam
Offline
newbie
UK
Last seen: 16 years 38 weeks ago
UK
Joined: 2006-01-04
Posts: 4
Points: 0

Acknowledgement

Thanks Pineapplehead.

Shame it can't be done Sad

Looking forward to hearing from the others.

ScriptHam

Anonymous
Anonymous's picture
Guru

Letters Only In Italics - Not Numbers

Wrap all numbers in a <span> then font-style: normal the spans. Italics are meant for emphasis so there shouldn't be much in the way of extra spans in this case.

ScriptHam
Offline
newbie
UK
Last seen: 16 years 38 weeks ago
UK
Joined: 2006-01-04
Posts: 4
Points: 0

General Alternatives to Individual Markup in Math Equations

Hi

Thanks Triumph Smile

Yes I realise that i tags or <span class="..."></span> can be used. My purpose is to write math equations in which letters are italicised whereas the numbers and symbols are not. Admittedly sometimes subscript and superscript letters are not italicised in which case these would be marked up individually.

It often happens in math equations that letters and numbers alternate with a huge increase in the amount of typing if each is individually marked up. A thought occurs to me, have you come across a specialist font which does this automatically?

What I would have liked is <span class="equation">math equation content </span> where all letters but only letters are automatically italicised. Can this be achieved through scripts say javascript?

I look forward to hearing from you.
Many thanks

ScriptHam

Anonymous
Anonymous's picture
Guru

Re: General Alternatives to Individual Markup in Math Equati

Google up on Regular Expressions. Smile

ScriptHam
Offline
newbie
UK
Last seen: 16 years 38 weeks ago
UK
Joined: 2006-01-04
Posts: 4
Points: 0

Letters Italicised Numbers Not, Scripted RegEx

Hi Triumph Smile

Thanks for the reply.

Yeah I guess so. I have started this going http://www.html-kit.com/e/hkforum.cgi?g=hmisc&i=f43d0000 for treating the text during page creation but for dynamic data etc a scripted macro might be better.

Take Care
ScriptHam
Laughing out loud