You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by SNawa <na...@gmail.com> on 2012/06/12 18:28:54 UTC
How to prevent hyphenation after hyphens?
Hi all
I have content with hyphens
<fo:block margin-right="120pt" border-width="1pt" border-color="black"
border-style="solid" hyphenate="false">
first-second first-second first-second first-second first-second
first-second first-second first-second first-second first-second
first-second first-second first-second first-second first-second
first-second first-second first-second first-second first-second
first-second first-second first-second first-second first-second
</fo:block>
Output looks like
http://old.nabble.com/file/p34000343/hyphens.png
How to prevent hyphenation after hyphens? I want that the first and second
words stay in the same line
Thanks
--
View this message in context: http://old.nabble.com/How-to-prevent-hyphenation-after-hyphens--tp34000343p34000343.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: How to prevent hyphenation after hyphens?
Posted by Pascal Sancho <ps...@gmail.com>.
Hi,
The '#' means that the character is not found in the used font.
You have here 2 alternatives:
- either use a font that contains such character (tried successfully
with DejaVu collection, follow [1])
- or (as said Eric) use keep-together.within-line on 1 fo:inline for
each "first-second".
[1] http://dejavu-fonts.org/wiki/Main_Page
2012/6/13 SNawa <na...@gmail.com>:
>
> Thanks Eric
>
> How to insert non-breaking hyphen properly? I change content to
>
> <fo:block margin-right="120pt" border-width="1pt" border-color="black"
> border-style="solid">
> first&#x2011;second first&#x2011;second
> first&#x2011;second first&#x2011;second first&#x2011;second
> first&#x2011;second first&#x2011;second first&#x2011;second
> first&#x2011;second first&#x2011;second first&#x2011;second
> first&#x2011;second first&#x2011;second first&#x2011;second
> first&#x2011;second first&#x2011;second first&#x2011;second
> first&#x2011;second first&#x2011;second first&#x2011;second
> first&#x2011;second first&#x2011;second first&#x2011;second
> first&#x2011;second first&#x2011;second
> </fo:block>
>
> and I get next result
>
> http://old.nabble.com/file/p34004367/%2523.png
>
> Why is '#' inserted?
>
>
> Amick, Eric wrote:
>>
>> Hyphenation means adding a hyphen to text, so the hyphenate property won't
>> help. Most likely your best bet is changing the hyphens in the text to
>> non-breaking hyphens (Unicode U+2011), presumably in the style sheet if
>> you're using one. If that doesn't work, you can try wrapping each word in
>> an fo:inline with
>> keep-together.within-line="always".
>>
>> Eric Amick Systems Engineer II
>> Legislative Computer Systems
>>
>>> -----Original Message-----
>>> From: SNawa [mailto:navatski@gmail.com]
>>> Sent: Tuesday, June 12, 2012 12:29
>>>
>>> Hi all
>>> I have content with hyphens
>>>
>>> <fo:block margin-right="120pt" border-width="1pt" border-color="black"
>>> border-style="solid" hyphenate="false">
>>> first-second first-second first-second first-second first-
>>> second
>>> first-second first-second first-second first-second first-second
>>> first-second first-second first-second first-second first-second
>>> first-second first-second first-second first-second first-second
>>> first-second first-second first-second first-second first-second
>>> </fo:block>
>>>
>>> Output looks like
>>> http://old.nabble.com/file/p34000343/hyphens.png
>>>
>>> How to prevent hyphenation after hyphens? I want that the first and
>>> second
>>> words stay in the same line
>>>
>>> Thanks
--
pascal
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: How to prevent hyphenation after hyphens?
Posted by SNawa <na...@gmail.com>.
Thanks Eric
How to insert non-breaking hyphen properly? I change content to
<fo:block margin-right="120pt" border-width="1pt" border-color="black"
border-style="solid">
first&#x2011;second first&#x2011;second
first&#x2011;second first&#x2011;second first&#x2011;second
first&#x2011;second first&#x2011;second first&#x2011;second
first&#x2011;second first&#x2011;second first&#x2011;second
first&#x2011;second first&#x2011;second first&#x2011;second
first&#x2011;second first&#x2011;second first&#x2011;second
first&#x2011;second first&#x2011;second first&#x2011;second
first&#x2011;second first&#x2011;second first&#x2011;second
first&#x2011;second first&#x2011;second
</fo:block>
and I get next result
http://old.nabble.com/file/p34004367/%2523.png
Why is '#' inserted?
Amick, Eric wrote:
>
> Hyphenation means adding a hyphen to text, so the hyphenate property won't
> help. Most likely your best bet is changing the hyphens in the text to
> non-breaking hyphens (Unicode U+2011), presumably in the style sheet if
> you're using one. If that doesn't work, you can try wrapping each word in
> an fo:inline with
> keep-together.within-line="always".
>
> Eric Amick Systems Engineer II
> Legislative Computer Systems
>
>> -----Original Message-----
>> From: SNawa [mailto:navatski@gmail.com]
>> Sent: Tuesday, June 12, 2012 12:29
>> To: fop-users@xmlgraphics.apache.org
>> Subject: How to prevent hyphenation after hyphens?
>>
>>
>> Hi all
>> I have content with hyphens
>>
>> <fo:block margin-right="120pt" border-width="1pt" border-color="black"
>> border-style="solid" hyphenate="false">
>> first-second first-second first-second first-second first-
>> second
>> first-second first-second first-second first-second first-second
>> first-second first-second first-second first-second first-second
>> first-second first-second first-second first-second first-second
>> first-second first-second first-second first-second first-second
>> </fo:block>
>>
>> Output looks like
>> http://old.nabble.com/file/p34000343/hyphens.png
>>
>> How to prevent hyphenation after hyphens? I want that the first and
>> second
>> words stay in the same line
>>
>> Thanks
>> --
>> View this message in context: http://old.nabble.com/How-to-prevent-
>> hyphenation-after-hyphens--tp34000343p34000343.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/How-to-prevent-hyphenation-after-hyphens--tp34000343p34004367.html
Sent from the FOP - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: How to prevent hyphenation after hyphens?
Posted by "kindaian@gmail.com" <ki...@gmail.com>.
Hi,
You can define in the hyphenation rules how many characters before and
after an hyphen. If you define something like 2 for each property, then
the hyphenation patern will skip over any existing hyphenated word in
the text.
You will have to check the manuals on the precise rules, etc, because
the last time i used FOP and Hyphenate was like 8 years ago.
Cheers,
LF
On 12/06/2012 18:49, Amick, Eric wrote:
> Hyphenation means adding a hyphen to text, so the hyphenate property won't help. Most likely your best bet is changing the hyphens in the text to non-breaking hyphens (Unicode U+2011), presumably in the style sheet if you're using one. If that doesn't work, you can try wrapping each word in an fo:inline with
> keep-together.within-line="always".
>
> Eric Amick Systems Engineer II
> Legislative Computer Systems
>
>> -----Original Message-----
>> From: SNawa [mailto:navatski@gmail.com]
>> Sent: Tuesday, June 12, 2012 12:29
>> To: fop-users@xmlgraphics.apache.org
>> Subject: How to prevent hyphenation after hyphens?
>>
>>
>> Hi all
>> I have content with hyphens
>>
>> <fo:block margin-right="120pt" border-width="1pt" border-color="black"
>> border-style="solid" hyphenate="false">
>> first-second first-second first-second first-second first-
>> second
>> first-second first-second first-second first-second first-second
>> first-second first-second first-second first-second first-second
>> first-second first-second first-second first-second first-second
>> first-second first-second first-second first-second first-second
>> </fo:block>
>>
>> Output looks like
>> http://old.nabble.com/file/p34000343/hyphens.png
>>
>> How to prevent hyphenation after hyphens? I want that the first and
>> second
>> words stay in the same line
>>
>> Thanks
>> --
>> View this message in context: http://old.nabble.com/How-to-prevent-
>> hyphenation-after-hyphens--tp34000343p34000343.html
>> Sent from the FOP - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: How to prevent hyphenation after hyphens?
Posted by "Amick, Eric" <Er...@mail.house.gov>.
Hyphenation means adding a hyphen to text, so the hyphenate property won't help. Most likely your best bet is changing the hyphens in the text to non-breaking hyphens (Unicode U+2011), presumably in the style sheet if you're using one. If that doesn't work, you can try wrapping each word in an fo:inline with
keep-together.within-line="always".
Eric Amick Systems Engineer II
Legislative Computer Systems
> -----Original Message-----
> From: SNawa [mailto:navatski@gmail.com]
> Sent: Tuesday, June 12, 2012 12:29
> To: fop-users@xmlgraphics.apache.org
> Subject: How to prevent hyphenation after hyphens?
>
>
> Hi all
> I have content with hyphens
>
> <fo:block margin-right="120pt" border-width="1pt" border-color="black"
> border-style="solid" hyphenate="false">
> first-second first-second first-second first-second first-
> second
> first-second first-second first-second first-second first-second
> first-second first-second first-second first-second first-second
> first-second first-second first-second first-second first-second
> first-second first-second first-second first-second first-second
> </fo:block>
>
> Output looks like
> http://old.nabble.com/file/p34000343/hyphens.png
>
> How to prevent hyphenation after hyphens? I want that the first and
> second
> words stay in the same line
>
> Thanks
> --
> View this message in context: http://old.nabble.com/How-to-prevent-
> hyphenation-after-hyphens--tp34000343p34000343.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org