formatting codes showing up in Table of Figures

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

formatting codes showing up in Table of Figures

Postby SandraF on Wed Mar 11, 2020 1:35 pm

Hello,
I have a Figure style (p.figure) that is autonumbered and used for figure captions. CSS looks like this:

p.figure
{
font-family: 'Univers LT Cyr 45 Light';
color: #000000;
font-style: normal;
mc-auto-number-position: inside-head;
mc-auto-number-offset: 50px;
padding-bottom: 1em;
text-align: center;
font-size: 10pt;
hyphens: none;
mc-auto-number-format: 'CF:{b}Figure {chapnum}-{n+}{/b} ';
}
Caveat: I mostly inherited this, so if you ask me why something is done a certain way I might not have an answer. The only thing I messed with a little bit was the auto-number-format. I wanted the style to look like this:

Figure 1-1: A Thingamabob

But I ended up removing the colon from the auto-number-format and typing it in manually because when I cross-reference figures (See Figure 1-1), the colon gets included (See Figure 1-1:). If anyone has a tip for getting rid of that, that would be excellent, but my main problem is:

I'm trying to generate a Table of Figures based on my p.figure style, but when I generate it, the boldface code "{b}" "{/b}" gets spelled out in every entry:
{b}Figure 1-1{/b}: A Thingamabob
{b}Figure 1-2{/b}: Another Thingamabob

Is there a way to keep the formatting in my style, but remove it - or ideally, keep it as formatting and not as CODE - when I generate the Table of Figures? Thanks in advance.
SandraF
Propeller Head
 
Posts: 11
Joined: Mon May 06, 2019 1:55 pm

Re: formatting codes showing up in Table of Figures

Postby robdocsmith on Wed Mar 11, 2020 5:21 pm

Try the fix from:

https://forums.madcapsoftware.com/viewtopic.php?f=10&t=32371

Code: Select all
p.Figure {
   ...
   mc-auto-number-format: 'CF:Figure {chapnum}-{n+} ';
   mc-auto-number-class: bold;
}
span.bold {
   font-weight: bold;
}

I didn't know about using a class in mc-autonumber until I saw this post and it makes styling easier to manage.

Cheers,
Rob
robdocsmith
Propeller Head
 
Posts: 82
Joined: Thu May 24, 2018 3:11 pm

Re: formatting codes showing up in Table of Figures

Postby SandraF on Thu Mar 12, 2020 4:27 pm

Works great - thank you, Rob!
SandraF
Propeller Head
 
Posts: 11
Joined: Mon May 06, 2019 1:55 pm

Re: formatting codes showing up in Table of Figures

Postby robdocsmith on Mon Mar 16, 2020 8:43 pm

No worries. Not my tip, but glad to use it and pass it on.

I did find one Gotcha with this and the way I was using it. I have a dealer directory and was prefixing my dealer's phone/fax/email/web details with a single letter like this:

Code: Select all
   mc-auto-number-format: '{b}p:{b}  ';

p for phone, e for email etc. This worked perfectly. However when I converted it to use a class so I could control all the prefix display parameters in the same place:

Code: Select all
   mc-auto-number-format: 'e:  ';
   mc-auto-number-class: boldText;

My bold prefix disappeared. Finally figured out that Flare sees the single prefix letter as a variable for auto-numbering and doesn't display it. It worked before because it was preceded by the formatting code. In order to get it to display I had to prefix my prefix with a space:
Code: Select all
   mc-auto-number-format: ' e:  ';
   mc-auto-number-class: boldText;

Or I guess I could have changed the prefix to something else or used an image, but my space was tight. Anyway, irrelevant bit of information for future searchers :)
robdocsmith
Propeller Head
 
Posts: 82
Joined: Thu May 24, 2018 3:11 pm


Return to Printed Documentation Targets

Who is online

Users browsing this forum: No registered users and 4 guests