Different heading format for different outputs

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
helloworld
Jr. Propeller Head
Posts: 2
Joined: Tue Aug 26, 2014 9:06 am

Different heading format for different outputs

Post by helloworld »

Hi,

I have several topics that are common to all my outputs with one key difference: in some outputs these topics have chapter number headings (i.e Chapter 1: Reference) and in other outputs they have appendix number headings (i.e. Appendix A: Reference). I've set up auto-numbering which works fine, but how do I change the heading format for certain outputs without resorting to conditional tagging?

Or put another way, is it possible to use the TOC or output-specific file to control if a topic heading is "Chapter x" or "Appendix x"?

Thanks!
Dan
wclass
Propellus Maximus
Posts: 1238
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Different heading format for different outputs

Post by wclass »

You have a couple of options. Have you used stylesheet mediums before?
You can create a new medium for each output you need and set up the autonumbering as needed, and then associate the medium with the target.

Or you could set up separate stylesheets and link them to the output targets as master stylesheets.
Margaret Hassall - Melbourne
helloworld
Jr. Propeller Head
Posts: 2
Joined: Tue Aug 26, 2014 9:06 am

Re: Different heading format for different outputs

Post by helloworld »

Thanks Margaret. But I'm trying to minimize the number of files that I'm working with. The outputs are not limited to only chapter number headings or appendix letters, so I'd need a solution where I can simply "turn on" appendix headings for certain topics in certain outputs without:
  • Changing the stylesheet linked to the target
  • Changing the selector on the H1 in the topic
I was hoping I could change something in the TOC properties or some other project file, but looks like I'm going to have to resort to conditional tagging here...
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Different heading format for different outputs

Post by NorthEast »

helloworld wrote:I'd need a solution where I can simply "turn on" appendix headings for certain topics in certain outputs without:
  • Changing the stylesheet linked to the target
  • Changing the selector on the H1 in the topic
I was hoping I could change something in the TOC properties or some other project file, but looks like I'm going to have to resort to conditional tagging here...
Setting the stylesheet mediums will do what you want, without having to make either of those changes, or use conditions.

For example, stick the following CSS in a test project, and set up two targets - on each of the target's Advanced tab, set one to use the medium targetA and the other to use targetB.
Build the targets and see what happens.

Code: Select all

@media targetA 
{ 
	h1 
	{
		color: red;
	}
}

@media targetB 
{ 
	h1 
	{
		color: blue;
	}
}
Curlyshell
Propeller Head
Posts: 65
Joined: Fri Mar 01, 2019 9:14 am

Re: Different heading format for different outputs

Post by Curlyshell »

wclass wrote:You have a couple of options. Have you used stylesheet mediums before?
You can create a new medium for each output you need and set up the autonumbering as needed, and then associate the medium with the target.

Or you could set up separate stylesheets and link them to the output targets as master stylesheets.
Oh. My. God.

I have been scouring the user guides for days to get an answer to this problem. Why does their documentation suck?
"I'm a technical writer, not a developer," she said...
Post Reply