Non-Breaking space in the xref

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Yanko
Jr. Propeller Head
Posts: 1
Joined: Wed Nov 26, 2014 3:26 am

Non-Breaking space in the xref

Post 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:

Code: Select all

siehe {i}{h1}{/i} {pageref}
Here is the example of this:
Image
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: Non-Breaking space in the xref

Post by kwag_myers »

Have you tried  ?

Code: Select all

    siehe {i}{h1}{/i} {pageref}
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Non-Breaking space in the xref

Post 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.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
yossikarp
Propeller Head
Posts: 33
Joined: Sun Apr 06, 2014 4:13 am
Location: Israel

Re: Non-Breaking space in the xref

Post 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
Nita Beck
Senior Propellus Maximus
Posts: 3667
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Non-Breaking space in the xref

Post 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.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
yossikarp
Propeller Head
Posts: 33
Joined: Sun Apr 06, 2014 4:13 am
Location: Israel

Re: Non-Breaking space in the xref

Post by yossikarp »

Nita,

It works! Such a simple, yet stress-relieving solution :D

Thank you so much,

Yossi Karp
Anette
Propeller Head
Posts: 17
Joined: Thu Sep 19, 2013 5:16 am

Re: Non-Breaking space in the xref

Post 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,
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Non-Breaking space in the xref

Post 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.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Non-Breaking space in the xref

Post 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
Hendrik
Jr. Propeller Head
Posts: 3
Joined: Mon Apr 27, 2020 1:23 pm

Re: Non-Breaking space in the xref

Post by Hendrik »

I found a solution for print output that works where the white-space: nowrap; solution doesn't do the job.
Try using

Code: Select all

\00A0
instead of

Code: Select all

 
in the CSS.

For example:

Code: Select all

mc-format: 'page\00A0{page}';	
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.
EileenP
Propeller Head
Posts: 78
Joined: Thu Jun 12, 2014 4:34 am

Re: Non-Breaking space in the xref

Post 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?
EileenP
Propeller Head
Posts: 78
Joined: Thu Jun 12, 2014 4:34 am

Re: Non-Breaking space in the xref

Post 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.
Post Reply