Different heading format for different outputs

This forum is for Single-Sourcing your Flare content to multiple outputs.

Different heading format for different outputs

Postby helloworld on Wed Oct 15, 2014 1:48 pm

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
helloworld
Jr. Propeller Head
 
Posts: 2
Joined: Tue Aug 26, 2014 9:06 am

Re: Different heading format for different outputs

Postby wclass on Wed Oct 15, 2014 3:07 pm

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
wclass
Propellus Maximus
 
Posts: 1214
Joined: Mon Feb 27, 2006 5:56 am
Location: Melbourne, Australia

Re: Different heading format for different outputs

Postby helloworld on Thu Oct 16, 2014 10:53 am

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...
helloworld
Jr. Propeller Head
 
Posts: 2
Joined: Tue Aug 26, 2014 9:06 am

Re: Different heading format for different outputs

Postby Dave Lee on Fri Oct 17, 2014 3:13 am

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;
   }
}
Dave Lee
Master Propellus Maximus
 
Posts: 5546
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Different heading format for different outputs

Postby Curlyshell on Tue Mar 19, 2019 2:08 pm

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?
Curlyshell
Propeller Head
 
Posts: 10
Joined: Fri Mar 01, 2019 9:14 am


Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 2 guests