WebHelp ignoring non-print style

This forum is for Single-Sourcing your Flare content to multiple outputs.
Post Reply
rlauriston
Sr. Propeller Head
Posts: 140
Joined: Mon Dec 06, 2010 1:19 pm

WebHelp ignoring non-print style

Post by rlauriston »

If I make PDF the primary target and use the following styles, the WebHelp output uses the print format, with page number:

Code: Select all

MadCap|xref.FigureTitle{
	mc-format: '{paranum} {quote}{paratext}{quote} (on page {page})';}
@media non-print{
	MadCap|xref.FigureTitle
	{mc-format: '{paranum} {quote}{paratext}{quote}';}}
@media print{
	MadCap|xref.FigureTitle
	{mc-format: '{paranum} {quote}{paratext}{quote} (on page {page})';}}
If I make WebHelp the primary target and use the following styles, the x-ref format is correct in both:

Code: Select all

MadCap|xref.FigureTitle{
	mc-format: '{paranum} {quote}{paratext}{quote}';}
@media non-print{
	MadCap|xref.FigureTitle{
		mc-format: '{paranum} {quote}{paratext}{quote}';}}
@media print{
	MadCap|xref.FigureTitle{
		mc-format: '{paranum} {quote}{paratext}{quote} (on page {page})';}}
Any suggestions on where to look for the source of this problem?
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: WebHelp ignoring non-print style

Post by NorthEast »

Just to be clear, are you talking about the actual output - not the preview?
The preview will not show the correct xref text (just the same placeholder text as the editor), but it will be correct in the output.
Also, the target set as primary won't affect any of your styles; it'll just affect what you see by default in the editor/preview.

Your styles are fine, so if you're seeing this in the output then it suggests your target isn't using the non-print medium.
From your examples, the WebHelp appears to use the default (not print) xref format; so check the medium on your WebHelp target Advanced tab is set to non-print - I'd guess it's set to (Default).
rlauriston
Sr. Propeller Head
Posts: 140
Joined: Mon Dec 06, 2010 1:19 pm

Re: WebHelp ignoring non-print style

Post by rlauriston »

Dave Lee wrote:... the WebHelp appears to use the default (not print) xref format; so check the medium on your WebHelp target Advanced tab is set to non-print - I'd guess it's set to (Default).
Indeed. I presumed it was something like that, just couldn't find it. I guess this is something to watch out for if you change the default medium. Thanks.
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: WebHelp ignoring non-print style

Post by NorthEast »

If it's set to (Default), then that means no medium is used.

The "(Default)" medium label used in this setting and in the Stylesheet editor is a bit misleading; it'd make more sense if it said None.
rlauriston
Sr. Propeller Head
Posts: 140
Joined: Mon Dec 06, 2010 1:19 pm

Re: WebHelp ignoring non-print style

Post by rlauriston »

Dave Lee wrote:If it's set to (Default), then that means no medium is used.

The "(Default)" medium label used in this setting and in the Stylesheet editor is a bit misleading; it'd make more sense if it said None.
I'm not sure why, but you can specify default, print, and non-print versions of the same style. See the code snippets I posted.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: WebHelp ignoring non-print style

Post by LTinker68 »

You don't need to specify styles in every medium -- you should only do it if part of the style should be different in one medium from the default medium. All named mediums (print, non-print, any custom medium you create) inherit from the "default" medium, but named mediums don't inherit from each other. (Well, not automatically. There could be a way to specify that by code, but it's not the normal behavior.) So in your code block, you didn't need to specify a different style for non-print because it was the same as the default style, which it would inherit anyway. The style declaration for print you needed because you changed the style for that tag slightly, so it will override that part of the style from how it was declared in the default medium.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
rlauriston
Sr. Propeller Head
Posts: 140
Joined: Mon Dec 06, 2010 1:19 pm

Re: WebHelp ignoring non-print style

Post by rlauriston »

LTinker68 wrote:You don't need to specify styles in every medium -- you should only do it if part of the style should be different in one medium from the default medium.
Exactly. I can't think of any reason that you'd define the same style in print and non-print. I only did that because I was troubleshooting.
Post Reply