Conditional text applied automatically to page numbers?

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

Conditional text applied automatically to page numbers?

Postby ksharkey9414 on Fri Sep 18, 2015 2:16 pm

I'm single-sourcing my HTML5 output with PDF output. I created a cross reference style that lists the page number along with the term. Here's what I put for the properties:

{color blue}{paratext}{/color} {color black}(page {page})

The end result is something like this: allowFileOpens (page 1)

I've been going back through the lists of terms and manually conditioning the page numbers and their parens for PDF output. But with hundreds of terms this process is tedious at best. Is there a way to indicate in the code above that the page numbers are for PDF output only? Or, is there a better way to do this?

Thanks,

Karen
ksharkey9414
Propeller Head
 
Posts: 18
Joined: Wed May 20, 2015 2:29 pm

Re: Conditional text applied automatically to page numbers?

Postby Paulie on Sun Sep 20, 2015 4:15 pm

Hi Karen,

You are on the right track. The solution is to create different cross reference text for the different mediums in your style sheet:

For example:

Code: Select all
@media print
{
     MadCap|xref
     {
        mc-format: '{color blue}{paratext}{/color} {color black}(page {page}{/color})';
     }
}

@media non-print
{
     MadCap|xref
   {
      mc-format: '{color blue}{paratext}{/color})';
   }
}
Last edited by Paulie on Mon Sep 21, 2015 12:18 pm, edited 1 time in total.
"In an ideal world, software should be simple, well designed, and completely intuitive to end users. In the real world, good documentation is king."
Paulie
Sr. Propeller Head
 
Posts: 140
Joined: Sun Mar 01, 2015 3:01 pm

Re: Conditional text applied automatically to page numbers?

Postby ChoccieMuffin on Mon Sep 21, 2015 2:33 am

Don't you have to have {/color} after your page number?
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2257
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Conditional text applied automatically to page numbers?

Postby Paulie on Mon Sep 21, 2015 12:18 pm

ChoccieMuffin wrote:Don't you have to have {/color} after your page number?


I would have thought so. I've added the extra tag to the above suggestion.
"In an ideal world, software should be simple, well designed, and completely intuitive to end users. In the real world, good documentation is king."
Paulie
Sr. Propeller Head
 
Posts: 140
Joined: Sun Mar 01, 2015 3:01 pm

Re: Conditional text applied automatically to page numbers?

Postby ksharkey9414 on Tue Sep 22, 2015 10:38 am

Thanks everyone for your great ideas! But I have a question about the code example: the print example shows the two colors being used (blue and black), but doesn't appear to address the conditional text issue. Is there additional code I can use to make the page numbers conditional for print only?
Thanks!
ksharkey9414
Propeller Head
 
Posts: 18
Joined: Wed May 20, 2015 2:29 pm

Re: Conditional text applied automatically to page numbers?

Postby Nita Beck on Tue Sep 22, 2015 12:14 pm

You don't need to do conditioning whatsoever. It's the format of the particular MadCap|xref style as defined in the stylesheet. You online output will use the format defined in the default medium (which I assume is the medium associated with your online targets), while your PDF output will use the format defined in the medium you use for your PDF targets.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3309
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Conditional text applied automatically to page numbers?

Postby ksharkey9414 on Wed Sep 23, 2015 1:43 pm

Nita,

All I can say is "duh." Of course I can include the page number in my print style and not in my online style! :oops:

Thanks a million!
ksharkey9414
Propeller Head
 
Posts: 18
Joined: Wed May 20, 2015 2:29 pm

Re: Conditional text applied automatically to page numbers?

Postby Nita Beck on Wed Sep 23, 2015 3:06 pm

No worries, Karen. I have "Duh!" and "Doh!" moments every week! Glad we all got you squared away.
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3309
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY


Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 1 guest

cron