Create Chapter Heading with Two Separate Styles

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
erinep23
Sr. Propeller Head
Posts: 124
Joined: Fri Jun 01, 2012 2:54 pm
Location: Austin, Texas
Contact:

Create Chapter Heading with Two Separate Styles

Post by erinep23 »

While using the MadCap printed documentation, I really loved the style for the Chapter titles. I attempted to add something similar to my documentation (varied enough obviously so I'm not a total thief. :lol: ) I used a Span approach, and it looked fine until I generated the content. Instead of the headings appearing in the pdf TOC, it showed <span>. Does anyone know how to resolve this issue? I have attached an example of the MadCap style I was attempting emulate.
You do not have the required permissions to view the files attached to this post.
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Create Chapter Heading with Two Separate Styles

Post by Msquared »

Could you explain what you mean by a "Span" approach? What style(s) did you apply to what parts of the heading, and what do the styles look like in the stylesheet?
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
i-tietz
Propellus Maximus
Posts: 1219
Joined: Wed Oct 24, 2007 4:13 am
Location: Fürth, Germany

Re: Create Chapter Heading with Two Separate Styles

Post by i-tietz »

I think with "span approach" erinep23 means something like this:

Code: Select all

<h1>CHAPTER 3 <span style="font-size: 8pt; color:#cccccc;">Text Hyperlinks</span></h1>
Maybe the professional "auto-numberers" on this forum can tell you whether you can have the string "CHAPTER 3" be generated by Flare automatically and with different looks, so the actual heading can look like this:

Code: Select all

<h1>Text Hyperlinks</h1>
Inge____________________________
"I need input! - Have you got input?"
erinep23
Sr. Propeller Head
Posts: 124
Joined: Fri Jun 01, 2012 2:54 pm
Location: Austin, Texas
Contact:

Re: Create Chapter Heading with Two Separate Styles

Post by erinep23 »

Yes, I applied a span style on the automated chapter numbers, and in the pdf, in the TOC panel, the <span> signifiers appear instead of the Chapter number. So annoying! I thought I had it made in the shade. It looked really good, then I passed it to QA, and of course they put it in as a bug because of the <span> appearing. I had to take it out of the release. Bummer.
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Create Chapter Heading with Two Separate Styles

Post by Msquared »

What do your style definitions for the heading style and for the span style look like?

I've just managed to do what I think you are looking for. The level 1 heading (just the chapter number, without "Chapter" in the text is usually orange, like the lower level headings. Just for the sake of it, I've applied my code character span style to the heading text ("System Manager"). My TOC (and the PDF bookmarks) are fine.

This is an extract from my level 1 heading style, incuding all the autonumbering stuff.

h1
{
page-break-before: always;
border-top-style: solid;
border-top-width: 3pt;
border-top-color: #646464;
padding-top: 12pt;
margin-top: 0cm;
mc-heading-level: 1;
mc-next-tag: h2;
font-size: 18pt;
mc-auto-number-format: '{chapnum} ';
mc-auto-number-offset: 70pt;
mc-auto-number-position: outside-head;
}
sample.png
sample2.png
You do not have the required permissions to view the files attached to this post.
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
erinep23
Sr. Propeller Head
Posts: 124
Joined: Fri Jun 01, 2012 2:54 pm
Location: Austin, Texas
Contact:

Re: Create Chapter Heading with Two Separate Styles

Post by erinep23 »

So, for my autonumbering, I wanted to apply this style:

MadCap|variable.heading1chapter
{
text-transform: uppercase;
font-size: 30pt;
font-family: 'Arial Rounded MT Bold';
color: #00467f;
}

And for the heading itself, it looks like this:

h1
{
color: #7E8083;
font-size: 24pt;
font-family: Arial;
font-weight: bold;
font-style: normal;
margin-top: 125px;
mc-auto-number-format: '{chapnum}';
}
Msquared
Propellus Maximus
Posts: 848
Joined: Mon Aug 06, 2012 10:19 am
Location: Southampton, UK

Re: Create Chapter Heading with Two Separate Styles

Post by Msquared »

It looks like you are doing something more complicated than I tried just now.You're not trying to set your fancy style on the h1 heading, but to some other variable that you're defined specially for the chapter heading? Is that correct? If so, sorry, but it's more than I've managed to do so far, although I may need to do something very similar soon.

I didn't realise that you could define a style for a variable. I'd love to have a list of all the MadCap|xxx items that exist, and the classes that you can set for them. Did you find this by chance, or is it buried somewhere in the documentation?
Marjorie

My goal in life is to be as good a person as my dogs already think I am.
erinep23
Sr. Propeller Head
Posts: 124
Joined: Fri Jun 01, 2012 2:54 pm
Location: Austin, Texas
Contact:

Re: Create Chapter Heading with Two Separate Styles

Post by erinep23 »

It could be that I am a complete idiot, and you can't do any of this, and that is why I am failing. So what I really want to know is how MadCap was able to do it on their documentation, because that is what I am trying to emulate....unsuccessfully :cry:
chymical
Jr. Propeller Head
Posts: 2
Joined: Tue Mar 05, 2013 4:32 am

Re: Create Chapter Heading with Two Separate Styles

Post by chymical »

Hi,

You've probably solved this by now, but what I do is this:

1. Create a new span class, for example, numbercolor.
2. Set the font details for numbercolor as you want, the size, color etc.
3. In the AutoNumber settings for your heading, enter numbercolor as the mc-auto-number-class.

This will give you the numbering in your chosen colour, leaving the heading text as defined for the heading itself.
Post Reply