This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Non-breaking space in <menuchoice>
- From: Zbyszek Cybulski <z dot cybulski at gmail dot com>
- To: Bob Stayton <bobs at sagehill dot net>, docbook <docbook-apps at lists dot oasis-open dot org>
- Date: Sun, 17 Apr 2005 18:13:52 +0200
- Subject: Re: [docbook-apps] Non-breaking space in <menuchoice>
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qxb0xGDDsKRDAncxGjazNpFAiFUtqLS4sKp2YwSGTCuYgsvuluT57cpVN90KuLpMjG233dtkVNfuQI2MVTvaeWh+LtTGyVLobHBEJOxOuq8X2a0haXONXqZf7d/ktOCMtAIoBCz03VfUFh++bpfol2DoyEKadcpvfcIptkmExyo=
- References: <425E7E3C.8060605@gmail.com> <01de01c542a0$48deaac0$6400a8c0@toshiro>
- Reply-to: Zbyszek Cybulski <z dot cybulski at gmail dot com>
Bob,
thank you very much. Your explanation is great, this is what I was
looking for. Really good lesson. I didn't realize this issue can be so
complex to solve.
FYI, I use Oxygen + XEP on Windows, so I hope everything you said will
work fine.
Rgds,
Zbyszek
On 4/16/05, Bob Stayton <bobs@sagehill.net> wrote:
> I think the first order of business is to replace the "->" string used to
> separate menu items. The hyphen is an invitation to the XSL-FO formatter to
> break at that point, which is obviously not desirable. I have been using
> → (right arrow, or → in the DocBook entities) in my
> customization, and decided after further testing to check it into CVS. This
> is a single character and so it won't break, and it looks far better. It
> works in all the XSL-FO processors I tested, and in HTML browsers. The
> stylesheets use a parameter named $menuchoice.menu.separator, so you could
> customize it yourself.
>
> If you are using FOP, however, just entering the character won't work.
> That's because FOP will not find a character from the Symbol font
> automatically. You have to put it inside an fo:inline to set the
> font-family="Symbol". In the current stylesheet release, this won't work by
> just doing it in the parameteter because the stylesheets uses xsl:value-of
> to get the parameter value, which loses the fo:inline. In CVS I changed it
> to xsl:copy-of, so it will work. In other words, if you are using FOP, you
> should download the snapshot release.
>
> http://docbook.sourceforge.net/snapshots/
>
> In the parameter I added normal spaces around the arrow character, because I
> think it looks better, and because I wanted to allow line breaks in long
> menuchoices. You could change the spaces to   (nonbreaking spaces) in
> your customization of the parameter if you want. You could also customize
> the template with match="menuchoice" to put the whole thing inside an
> <fo:inline keep-together.within-line="always"> if you want to always keep
> the set of menuitems together. But again this won't work in FOP because it
> doesn't support it.
>
> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
>
>
> ----- Original Message -----
> From: "Zbyszek Cybulski" <z.cybulski@gmail.com>
> To: "docbook" <docbook-apps@lists.oasis-open.org>
> Sent: Thursday, April 14, 2005 7:29 AM
> Subject: [docbook-apps] Non-breaking space in <menuchoice>
>
> > Hi,
> >
> > Is that possible to force inserting non-breaking spaces when using
> > <menuchoice>?
> > Or maybe to force an FO-PDF converter not to break lines when rendering
> > "->" between <guimenu> and <guimenuitem>?
> > In my PDF files, I very often get a sequence of menu options at the end
> > of the line, and usually they are broken between '-' and '>'. I'd prefer
> > moving the whole menu sequence to a new line instead of breaking the
> > sequence.
> >
> > Thanks for your help,
> >
> > Zbyszek
> >
> >
>
>