Page 1 of 1
Non-Breaking space in the xref
Posted: Wed Nov 26, 2014 3:44 am
by Yanko
Hi folks,
Can you help me with 1 problem that i am trying to solve for the last few days.
Basically i have cross-references (siehe xxxxx auf Seite 0 [which is: see xxxxx on page 0]) where word "page" and the followed number are on a different rows which looks bad.
What i want is to keep the word "page" and the page number together.
The code of the reference is:
Here is the example of this:

Re: Non-Breaking space in the xref
Posted: Mon Dec 01, 2014 7:09 am
by kwag_myers
Re: Non-Breaking space in the xref
Posted: Mon Dec 01, 2014 10:21 am
by ChoccieMuffin
The problem is that the {pageref} is the bit that includes "auf Seite X". I think that is set in your stylesheet but I'd have to double-check. But kwag's solution is the way to go, just put it in the stylesheeet.
Re: Non-Breaking space in the xref
Posted: Tue May 26, 2015 12:18 pm
by yossikarp
I know that this is an old thread, but I'm having the same issue (Flare 11) and I can't quite figure out how to solve the problem for my PDF output.
I also want to keep the word "page" and the page number together in the x-ref. I tried following the advice given by kwag_myers, but the characters end up in the text of the x-ref, not as a non-breaking space.
For example, this is from my CSS stylesheet:
Code: Select all
MadCap|xref.paratext_on_chapter_page
{
mc-format: '{paratext} on page {page}';
}
results in something like:
Safety Features on page 55
I tried enclosing the in single quotes, but that didn't work, either.
So how do I set up my x-refs to include that as a non-breaking space? I also tried to enter the non-breaking space in the x-refs in the x-ref editor by pressing SHIFT+Space, but it didn't have any effect in my PDF output.
Thanks for any advice you might have on this issue,
Yossi Karp
Re: Non-Breaking space in the xref
Posted: Tue May 26, 2015 12:37 pm
by Nita Beck
Yossi, instead of using this:
Code: Select all
mc-format: '{paratext} on page {page}';
try this:
Code: Select all
mc-format: '{paratext} {pageref}';
Does that work?
Sorry that at the moment I'm hard-pressed to remember why one is better than the other. Rather, I just looked in the stylesheet I use for one of my PDF outputs in which the word "page" and the page number don't get separated.
Re: Non-Breaking space in the xref
Posted: Tue May 26, 2015 12:45 pm
by yossikarp
Nita,
It works! Such a simple, yet stress-relieving solution
Thank you so much,
Yossi Karp
Re: Non-Breaking space in the xref
Posted: Fri Feb 12, 2016 8:24 am
by Anette
Hello,
I have the same issue (Flare 19.2.2).
In my PDF the pagenumber is switching into the next row.
Here is the code I use:
Code: Select all
MadCap|xref
{
color: #0000ff;
mc-format: '{i}Abschnitt {paranumonly} – {paratext}{/i} {pageref}';
}
I tried a lot and I'm confused in the moment.
Thanks for any advice you might have on this issue,
Re: Non-Breaking space in the xref
Posted: Wed Feb 17, 2016 1:09 pm
by LTinker68
Try adding white-space: nowrap; to the style definition and see if that works. It will probably result in all of the xref moving to the next line, which could leave a lot of white space at the end of the first line, but at least your xref will appear together.
Re: Non-Breaking space in the xref
Posted: Wed Dec 09, 2020 4:13 pm
by robdocsmith
I've the same problem and sadly the whitespace: nowrap; doesn't work for me. I have a short form cross ref that just is an arrow glyph, space and then the page number so can't use the {pageref} element (which is context sensitive.
MadCap|xref.PageOnly
{
white-space: nowrap;
mc-format: '{family Wingdings 3}w{/family} {page}';
}
Any other ideas for stopping my ref from line breaking at the embedded space without forcing a line break before the reference?
Rob
Re: Non-Breaking space in the xref
Posted: Wed Jul 07, 2021 6:37 am
by Hendrik
I found a solution for print output that works where the white-space: nowrap; solution doesn't do the job.
Try using
instead of
in the CSS.
For example:
This \00A0 is the only unicode short code for a non-breaking space, which also works in CSS for HTML output. In the output the commonly known is used. This works for me with PDF output in every situation.
NOT TESTED FOR HTML.
Re: Non-Breaking space in the xref
Posted: Thu Sep 08, 2022 6:30 am
by EileenP
@Nita Beck, when I use {pageref} in the CSS in my Swedish project it renders as "på sidan2" (like "on page2"), with no space before the page number.
Where do I change how {pageref} renders in my language? Is this a bug?
Re: Non-Breaking space in the xref
Posted: Mon Sep 12, 2022 4:59 am
by EileenP
When I did not receive any replies to my question, I submitted a Support case, and I received the following information:
The missing space from the 'pageref' format is currently reported as a bug for some languages. The bug report for this issue is #150745.
The workaround for the issue is to simply insert the space manually within the appropriate language skin. Please open your Swedish language skin in the editor or create one if it doesn't already exist.
For more information on creating Language Skins, refer to this article:
https://help.madcapsoftware.com/flare20 ... -Skins.htm
Within the Language Skin editor, scroll down the list of properties until you find the 'CrossReferenceOnPage' property. Once you've found the necessary row, click into the Value field and insert a space after 'på sidan' (or whatever "on page" is in your language).
After inserting the space, click outside of the Value field and save the change. Now when you rebuild the output a space should rest between 'på sidan' and the page number.
Hope this helps someone.