Page 1 of 1

Different heading format for different outputs

Posted: Wed Oct 15, 2014 1:48 pm
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

Re: Different heading format for different outputs

Posted: Wed Oct 15, 2014 3:07 pm
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.

Re: Different heading format for different outputs

Posted: Thu Oct 16, 2014 10:53 am
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...

Re: Different heading format for different outputs

Posted: Fri Oct 17, 2014 3:13 am
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;
	}
}

Re: Different heading format for different outputs

Posted: Tue Mar 19, 2019 2:08 pm
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?