[Solved] Font type

Discuss the formula editor
Post Reply
petex
Posts: 3
Joined: Fri Oct 09, 2009 3:40 am

[Solved] Font type

Post by petex »

I'm having trouble figuring out how to change the font type my formulas.

The default is .... font <?> {<?>}

What would be the syntax of entering say, the word 'friday' in font 'arial'?

It would seem simple but I've tried every combination of inputs to this syntax and haven't figured it out.

cheers
Last edited by Hagar Delest on Sat Oct 17, 2009 8:46 am, edited 1 time in total.
Reason: tagged [Solved].
Open Office 3.1.1 on MAC OS 10.5.8
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: font type

Post by acknak »

Have you looked at the Getting Started with Math chapter? That's a good place to start out.

As for your question, OOo Math doesn't work the way you might expect. Math formulas generally don't use many fonts, so Math has no general way to make one part of a formula in Arial and another in Times. Instead, formulas generally use a "base font" and then use different faces and/or weights of that base font. So you might make one part of the formula in italics and another part in bold.

The font command in OOo Math actually knows about three generic fonts: Serif, Sans and Fixed. Math itself uses separate fonts for each of four kinds of item in a formula: Variables, Text, Functions and Numbers. The default configuration assigns the same font for each kind of item, but you can specify different fonts if you want.

Since the default configuration uses Arial for the generic "Sans" font, you can get what you asked for with this formula:
font sans "friday"

Here's a sample formula you can paste in to see the formula items and font families that Math uses:
matrix {
  alignl bold "Text" # bold "Number" # bold "Function" # bold "Variable" ##
  "Friday" # 12.34 # cos() # x, %theta ##
  alignl font sans "Friday" # font sans 12.34 # font sans cos() # font sans x, %theta ##
  font fixed "Friday" # font fixed 12.34 # font fixed cos() # font fixed x, %theta
}
AOO4/LO5 • Linux • Fedora 23
User avatar
Robert Tucker
Volunteer
Posts: 1250
Joined: Mon Oct 08, 2007 1:34 am
Location: Manchester UK

Re: font type

Post by Robert Tucker »

Though you may not be able to change the font within a formula (possibly you can with LaTeX - see also OooLatex) you can set "Text" to a different font to "Functions", "Variables" and "Numbers" at Format>Font.

So if you set "Text" to Arial , then:

Code: Select all

y =x + 1 "(First Equation)"
will output (First Equation) in Arial.
LibreOffice 7.x.x on Arch and Fedora.
petex
Posts: 3
Joined: Fri Oct 09, 2009 3:40 am

Re: Font type

Post by petex »

thanks guys. One step closer to being fluent in OO math.
Open Office 3.1.1 on MAC OS 10.5.8
Post Reply