Suppress Hyphenation inside a block

View: New views
4 Messages — Rating Filter:   Alert me  

Suppress Hyphenation inside a block

by JPee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm working with Fop embedded in a CMS for Generating PDFs. Inside my PDF are blocks, where the text is justified and hyphenation is enabled. In some cases I need to suppress hyphenation for example in links. I tried:

<fo:block text-align="justify" hyphenate="true" language="de" hyphenation-push-character-count="2" hyphenation-remain-character-count="2">text.....<fo:inline hyphenate="false"><external-link>link</external-link></fo:inline> text....
</fo:block>

The result is the same as without the inline.

Greetings,

JP

RE: Suppress Hyphenation inside a block

by Amick, Eric :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I'm working with Fop embedded in a CMS for Generating PDFs. Inside my
> PDF
> are blocks, where the text is justified and hyphenation is enabled. In
> some
> cases I need to suppress hyphenation for example in links. I tried:
>
> <fo:block text-align="justify" hyphenate="true" language="de"
> hyphenation-push-character-count="2"
> hyphenation-remain-character-count="2">text.....<fo:inline
> hyphenate="false"><external-link>link</external-link></fo:inline>
> text....
> </fo:block>

Hyphenate applies only to fo:block and fo:character. Sorry.

Eric Amick   Systems Engineer II
Legislative Computer Systems


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Suppress Hyphenation inside a block

by J.Pietschmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 19.10.2009 16:55, JPee wrote:
> hyphenation-remain-character-count="2">text.....<fo:inline
> hyphenate="false"><external-link>link</external-link></fo:inline>  text....

You can't disable hyphenation on an inline, but you can test
whether
<fo:inline keep-together.within-line="always"
  ><external-link>link</external-link></fo:inline>
will do the trick.


J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...


Re: Suppress Hyphenation inside a block

by JPee :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks again Mr. J. Pietschmann,

your solution works fine and does what I tried to do. All in all now I know that my problem is not that easy to handle and only a nice to have because of its complexity. Links can be long, so we have the following line:

this is my longlonglonglink.

With hyphenation it was 1:

this is my longlong-
link.

My hope was that the described solution would make it more beautiful, but the result was 2:

this    is    my
longlonglink.

In 1 vs 2 , 1 is the minor bad one.



J.Pietschmann wrote:
On 19.10.2009 16:55, JPee wrote:
> hyphenation-remain-character-count="2">text.....<fo:inline
> hyphenate="false"><external-link>link</external-link></fo:inline>  text....

You can't disable hyphenation on an inline, but you can test
whether
<fo:inline keep-together.within-line="always"
  ><external-link>link</external-link></fo:inline>
will do the trick.


J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org