xref class as print-only?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
JudyH
Propeller Head
Posts: 63
Joined: Fri Oct 12, 2007 12:25 pm

xref class as print-only?

Post by JudyH »

Is it possible to flag a custom xref class as "print only"?

Here's the situation:

I don't care for the usual cross reference scheme, because I often want to have the jump follow text of my own selection. For example, the jump label may be singular, because it makes grammatic sense to what I'm trying to say, but the section heading it points to is plural. I don't want to repeat that character for character, I just want to have a working jump to it.

So, rather than go with cross references, I used hyperlinks. This allows me to show whatever text I want as the link caption.

But now I'm thinking ahead to print output. I don't see an option to format the hyperlink print style to show a page number; that seems to be confined to cross references. So, I thought, I'll create a cross-reference class just for the purpose of the print job, so I can show the page number.

But I can't find a way to have that as print-only. I tried deleting all of the coding associated with the non-print style, but that was not allowed. I tried setting the length to 0 for the default medium, and default for the print medium, but the page number ended up showing in the webhelp anyway.

1. Is there a way to show a page number for a hyperlink?

2. If not, is there a way to flag a cross reference style as print-only?
Judy Hennessey
Image
crdunn
Jr. Propeller Head
Posts: 7
Joined: Thu Sep 27, 2007 6:21 pm
Location: Melbourne (Australia)

Re: xref class as print-only?

Post by crdunn »

You might be able to use the "display" property of your cross-reference class to hide it in screen output - set the property to "none" for your default medium and to (I think) "inherit" or "block" for your print medium.
NorthEast
Master Propellus Maximus
Posts: 6374
Joined: Mon Mar 05, 2007 8:33 am

Re: xref class as print-only?

Post by NorthEast »

crdunn wrote:You might be able to use the "display" property of your cross-reference class to hide it in screen output - set the property to "none" for your default medium and to (I think) "inherit" or "block" for your print medium.
One problem with this method is that any hidden xrefs could be revealed by a search - i.e. if you searched for a term in the xref and displayed the topic, the hidden xref would be displayed.

I don't think you can get what you want just by using hyperlinks or xrefs throughout - you can only enter your own link text if you use hyperlinks, and you can only have page numbering if you use xrefs.

The only way I can see to do this is to enter both a hyperlink and xref and use print/screen conditional tags. Obviously you'd only need to do this in cases where the link text needs to be different to what is displayed by using a xref format.
JudyH
Propeller Head
Posts: 63
Joined: Fri Oct 12, 2007 12:25 pm

Re: xref class as print-only?

Post by JudyH »

Which brings us back to

2. If not, is there a way to flag a cross reference style as print-only?

I haven't been able to find a property of the xref class to allow me to set a condition tag on all references. Would I have to select each cross reference as text, then apply the print-only condition individually?
Judy Hennessey
Image
NorthEast
Master Propellus Maximus
Posts: 6374
Joined: Mon Mar 05, 2007 8:33 am

Re: xref class as print-only?

Post by NorthEast »

JudyH wrote:Which brings us back to

2. If not, is there a way to flag a cross reference style as print-only?

I haven't been able tro find a property of the xref class to allow me to set a condition tag on all references. Would I have to select each cross reference as text, then apply the print-only condition individually?
No, you can't use conditional tags to exclude content that uses a particular style, you'd need to apply the conditional tag to the hyperlink/xref.
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: xref class as print-only?

Post by LTinker68 »

I believe someone else has put in a request for similar functionality (being able to apply a conditional tag to a style). Make sure you submit a request, too. The more who request something and all that... Submit your request at http://www.madcapsoftware.com/bugs/submit.aspx.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: xref class as print-only?

Post by alaltenburg »

On the topic of cross referencing...

I have screen captions with captions under them. Each caption has an autonumber and a bookmark. Within the body of the document, I have the xref set to {paranumonly} so it will only show the caption figure number.
It works within the text editor just fine, but in preview and build, it is missing completely. Is there somewhere I need to assign a label besides just telling it to only show the figure number?

Thanks,
Andrea
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: xref class as print-only?

Post by LTinker68 »

Are you building print or online output?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: xref class as print-only?

Post by alaltenburg »

I only have it set up for PDF print version. I am wondering if there is a label somewhere that is not set up because everything else seems to work. If I set the mc-format to 'See {paranumonly}' then in my print preview mode it will say "See " and then not list the figure. Everything works exactly in the editor.
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: xref class as print-only?

Post by LTinker68 »

It works for me, but I use a global counter on my figures, not chapter-wide. I'm not sure if that makes a difference. In the preview it will always display as "see Figure 1" but in the final PDF output, it will resolve to "see Figure 20" or whatever. And it works across chapters. For instance, I have a sentence that comes out as "Figure 102 is a more detailed version of Figure 1 on page 13". So "Figure 102" is the image in chapter 12 or whatever and "Figure 1" is in chapter 1.

Here are my auto-numbering and xref styles, in case that helps (for a v4 stylesheet).

Code: Select all

p.captionFig
{
	margin-bottom: 12pt;
	page-break-before: avoid;
	mc-auto-number-format: 'GF:Figure {n+}: ';
	font-size: 9pt;
	margin-top: 3pt;
}

MadCap|xref.figureNumOnly
{
	mc-format: '{paranumonly}';
}
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: xref class as print-only?

Post by alaltenburg »

Would it make a difference if I am using the main xref class instead of creating a subclass? Maybe I should make a xref.figure or something? That is the only difference I am seeing with how you have yours setup. Any text that I put in the mc-format except for what is in the { } will show up in my preview. I don't even get the word figure or anything.

Here is what I have currently

p.figure
{
mc-auto-number-position: inside-head;
font-size: 75%;
font-style: italic;
text-align: center;
line-height: 10pt;
text-decoration: none;
font-weight: normal;
margin-top: 10pt;
margin-bottom: 14pt;
mc-auto-number-offset: 0px;
mc-auto-number-class: Emphasis;
mc-auto-number-format: 'CF:Figure 10-{n+}: ';
}

MadCap|xref
{
mc-format: 'See {paranumonly}';
}
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: xref class as print-only?

Post by LTinker68 »

I don't think that would matter. I have a feeling it's with the properties in your p.figure style. I think you might have some conflicting properties that are causing problems. Make a copy of the stylesheet so you have a backup, then start from scratch with the p.figure style -- add properties back in until it stops working. I'd start with the following in the style then work from there:

Code: Select all

p.figure
{
mc-auto-number-class: Emphasis;
mc-auto-number-format: 'CF:Figure 10-{n+}: ';
}
Also, if you have any other auto-number formats, make sure they don't use the "F" label as well.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
alaltenburg
Sr. Propeller Head
Posts: 342
Joined: Mon Nov 03, 2008 9:33 am
Location: The heart of America

Re: xref class as print-only?

Post by alaltenburg »

I deleted out the entire p.figure and something must have been conflicting, because suddenly it views correctly in preview and build. Thank you very much.
The Moon is the first milestone on the road to the stars.

— Arthur C. Clarke
Post Reply