Style Inheritance?

I am new to pages (and to the mac) - I have created a letter using one of the default templates and I don't like the font.

I was expecting to change the font of the base style (body) and have it change in all my other styles (address, Name) etc.

However it just changes the body? I checked help for inheritance and it has no entry - so am i right in thinking that there is no provision to have styles inherit attributes from the base and just override things like size and alignment?

I know pages is a simple beast but i was impressed with the complexity it handled with putting formulas into a table so I am a bit floored that a common requirement to change a font size seems to mean I have to go around my document updating all of the fonts.

Am I missing something obvious?

Mac Air, Mac OS X (10.5.5)

Posted on Oct 15, 2008 1:57 PM

Reply
8 replies

Oct 15, 2008 8:22 PM in response to 365nice

As you say one style should be based on another and changes flow through from the original style to the styles based on it where they have points in common, such as the same font.

Unfortunately to my knowledge Pages lacks this ability, and as you say this is another surprising omission which comes from the programmers' view of what they think the user "wants".

Even though I suspect the user would want what they have come to expect as standard from most every other Word Processor or DTP application.

Oct 16, 2008 12:42 AM in response to PeterBreis0807

Its a shame - I sent in a feature request. I thought maybe Character styles would rescue me but while they hint at doing inheritance they don't appear to.

Request:
Its very frustrating that Pages doesn't appear to support any type of style inheritance - in particular font inheritance.

for example, I don't like the font used in the Letter Classic template - I would prefer Arial and not Didot - I was expecting to change the font of the Body Style and have all the others change automatically (preserving their overrides like font size, bold/italic, alignment etc.) unfortunately it doesn't so I had to go to each style and change its font one by one which is tedious.

I tried hiliting everything and changing just the font - but that resets attributes like size, bold/italic et.

I tried using a character style - and it hints at what I want - I created a Body Style character style and set its font, and selected all my text and applied this style - so far so good (changing the font of body style preserves size etc.) however now I can't use character styles for things like Company - where I want to underline all companies - as while I can just specify to override Italic (and leave font alone) when I use it, I lose my underlying font. Thus it appears that I can't have multiple character styles in place - or that creating a character style from another doesn't really do inheritance.

Its a shame its almost there - the character style idea would work - and I really only need 1 level of inheritance.

Oct 16, 2008 5:50 AM in response to 365nice

I see your need, and I definitely think you should mention it at http://www.apple.com/feedback/pages.html .

However, personally, I am quite happy that there is no style inheritance. I use it in MS Word, but I usually end up in some twisted knot, that is difficult to sort out, before I get it right. Apple usually tries to protect us users from intricate problems, so it is quite understandable that they did not implement style inheritance.

Oct 16, 2008 8:47 AM in response to SermoDaturCunctis

I know what you mean by Word - its become overly complicated. That said inheritance of a few simple items would go a long way - something like changing font is a pretty common request, and if you've got many styles all sharing the same font then its reasonable to want to experiment easily changing fonts to see which one looks best.

That feels like a Mac like thing to do.

Not inheritance of everything but just a few common things that are in the usage pattern of simple use.

Anyway its a mute point - I can hope, and maybe look at Open Office Mac for more complicated things (haven't checked it out in many years). Still some things in pages are very elegant.

Oct 16, 2008 8:52 AM in response to SermoDaturCunctis

Magnus,

Yes it is possible to go overboard and make it very hard to follow, but a single layer of inheritance is not hard to comprehend.

Typically all your text styles would get their font information from the 1st paragraph style and all the heads would get theirs from the Head style.

All the rest would be sizing, colors, indents and leading variations etc.

As the OP suggested this would allow a clean and simple change of fonts quick and easy instead of painfully drawn out. Particularly as Pages uses a very clumsy way of updating a style ie having to save a changed style over the same name previous style.

Now that is a recipe for disaster and migraines

Oct 16, 2008 9:06 AM in response to 365nice

It's really easy to change the used font.

--\[SCRIPT changeFontsInTemplate]
(*
Define an application (theApp)
Define the template to modify (theTemplate)
Define the couples of oldFontName, newFontName
Run the script.
It will modify the template accordingly.
For safe it will also create a gzipped backup of the original Index-xxx.xml file.

Yvan KOENIG (Vallauris, FRANCE)
16 octobre 2008
*)

(* you may set it to "Pages" or "Numbers" *)
set theApp to "Pages"

(* you may define the template of your choice *)
set theTemplate to "Letters:Classic Letter.template:"

set listepolices to {}
(* define your couples oldFontName, newFontName *)
set couple to {"Didot-Bold", "Arial-BoldMT"}
copy couple to end of listepolices
set couple to {"Didot", "ArialMT"}
copy couple to end of listepolices

(* define the paper size "index-iso.xml" or "index-trad.xml" *)
set nomIndex to "index-iso.xml"

set chemin to (path to applications folder as text) & "iWork '08:" & theApp & ".app:Contents:Resources:Templates:" & theTemplate

set cheminIndex to chemin & nomIndex
tell application "Finder"
set flagGz to exists file (cheminIndex & ".gz")
set flag to exists file (cheminIndex)
if (not flagGz) and not flag then error "No " & nomIndex & " file available !"
if flagGz then
if flag then delete file (cheminIndex)
if not (exists file (chemin & "backup_" & nomIndex & ".gz")) then my duplique(chemin, nomIndex & ".gz")
do shell script "gunzip " & quoted form of POSIX path of (cheminIndex & ".gz")
else
if not (exists file (chemin & "backup_" & nomIndex)) then
my duplique(chemin, nomIndex)
do shell script "gzip " & quoted form of POSIX path of (chemin & "backup_" & nomIndex)
end if
end if -- flagGz
end tell -- Finder
set leTexte to ""
try
set leTexte to read file (chemin & nomIndex)
end try
if leTexte is "" then error "Unable to read : " & cheminIndex & " !"

repeat with l in listepolices
set leTexte to my remplace(leTexte, item 1 of l, item 2 of l)
end repeat

write leTexte to (cheminIndex as alias) starting at 0
do shell script "gzip " & quoted form of POSIX path of cheminIndex

-- ==================

on remplace(t, TID1, TID2)
local l
set AppleScript's text item delimiters to TID1
set l to (text items of t)
set AppleScript's text item delimiters to TID2
set t to l as text
set AppleScript's text item delimiters to ""
return t
end remplace

-- ==================

on duplique(d, n)
local dup
set p2ti to path to temporary items
tell application "Finder"
try
set dup to duplicate file (d & n) to p2ti
end try
try
set name of dup to "backup_" & n
end try
duplicate file ((p2ti as text) & "backup_" & n) to (d as alias)
end tell
end duplique
end

-- ==================
--[/SCRIPT]

Yvan KOENIG (from FRANCE jeudi 16 octobre 2008 18:04:53)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Style Inheritance?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.