Hi there! I'm having a frustrating issue with cross-refs in print output.
I've set the xref style in both default and print mediums to behave the same way; i.e., appearing like a hyperlink and using mc-format {paratext}. However, when I print my PDF, the cross-refs show up as “{para}” {pageref} instead (that is, instead of a blue underlined Link, they have "Link" on page x). They show up correctly in the print preview, but incorrectly in the PDF build. I've verified that I'm using the print medium in my target and I've double-checked every style class I can think of. Where is this coming from?
A related note, I have several times gotten an exception error from MadCap when I try to change the mc-format from the stylesheet ("The process cannot access the file...") so I'm wondering if that's causing my problem? It doesn't happen every time.
Thanks for your help!
Cross-refs not behaving in print
-
- Sr. Propeller Head
- Posts: 247
- Joined: Thu May 24, 2018 3:11 pm
- Location: Queensland, Australia
Re: Cross-refs not behaving in print
Hi,
What is in the MadCap|xref style in your stylesheet for your print media?
I have two set up as follows:
And then to use them I just make sure the appropriate class is applied to the xref:
These Madcap|xref classes should be the only ones to define the auto format of cross references.
The exception error may indicate there is something not quite right with your stylesheet. Carefully check through styles to make sure there aren't hidden or missing characters upsetting the code. There are online verifiers for CSS or an external text editor that colours keywords might help locate where things aren't right. If the stylesheet cannot be accessed by the build, it would be likely all styles that would default to a Madcap standard and not just xref ones. Perhaps there is a hidden character in the xref style definition that causes the build to revert to the standard {para} on page {pageref} definition?
Rob
What is in the MadCap|xref style in your stylesheet for your print media?
I have two set up as follows:
Code: Select all
MadCap|xref
{
mc-format: '{para} on page {page}';
}
MadCap|xref.ParaOnly
{
mc-format: '{para}';
}
Code: Select all
<p>See <MadCap:xref href="pageref.htm" class="ParaOnly">linked heading text</MadCap:xref></p>
<p>See <MadCap:xref href="pageref.htm">"linked heading text<" on page 1</MadCap:xref></p>
The exception error may indicate there is something not quite right with your stylesheet. Carefully check through styles to make sure there aren't hidden or missing characters upsetting the code. There are online verifiers for CSS or an external text editor that colours keywords might help locate where things aren't right. If the stylesheet cannot be accessed by the build, it would be likely all styles that would default to a Madcap standard and not just xref ones. Perhaps there is a hidden character in the xref style definition that causes the build to revert to the standard {para} on page {pageref} definition?
Rob
Re: Cross-refs not behaving in print
Thanks, Rob! I will check my CSS in the morning.