Using custom tags for centralized management of typography

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 14:39

Let's assume that you are preparing 32 headline libraries, with 7 headline styles each. All headline styles in a library use the same font, but different libraries will use different fonts. The list below shows first 4 libraries and their fonts.

Library, Font, Code

LIBRARY1, Times-Bold, 9003

LIBRARY2, Times-BoldItalic, 9004

LIBRARY3, Palatino, 9051

LIBRARY4, Palatino-Italic,9052

and so on.

You can follow two approaches. In the first one, you can hard-code the font identifiers in each headline style of each library, e.g.. >f 9003< in all 7 headlines of LIBRARY1, >f 9004< in all 7 headlines of LIBRARY2 and so on.

A 'clever' approach might be to create an auxiliary style, named >font< and only within that style specify the hard-coded identifier, e.g.. >f 9003< in the style >font< of LIBRARY1, >f 9004< in the style >font< of the LIBRARY2. The headline styles will, then, contain the auxiliary style >font< instead of hard-coded font tag and identifier (all headlines will contain the same code).

Now, to understand the difference between two approaches, create the first one of 32 headline libraries, copy it to the second of 32 libraries and then change whatever is required. The first approach requires 7 modifications of font code (one for each headline style) in each library, with total of 217 modifications. The second approach requires only one modification per library, with total of 31 modifications!

Warning: insert the auxiliary style BEFORE all other styles that call it.

Correct order        Wrong order
font        head1
head1        head2
head3        head3
head4        font