|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Table cell text overlapes with table border ...docbook 1.74.3Hi,
I am using docbook version 1.74.3 for PDF report generation.
I have 50 chnaracter long text in a table cell but it overlapes with the table border.
for example :
1. I have text "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDEFGHIJKLMNO" in one table cell but it overlapes with the table border and goes outside of the table.
2. But if I modify it as "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO123456789" then it does not overlap with the border but after 26 character it breaks and goes to second line within the same cell as shown below.
ABCDEFGHIJKLMNOPQRSTUVWXYZ-
ABCDEFGHIJKLMNO123456789
how can I make the text string shown in first option to stay within the same cell so that it does not overlap with the table border.
Thanks,
BRAMANI.
|
|
|
Re: Table cell text overlapes with table border ...docbook 1.74.3Does anybody know how to resolve the following issue? How to make the text string stay within the table cell so that it does not overlap with table border?
Any help will be greatly appreciated.
Thanks,
BRAMANI.
On Mon, Oct 12, 2009 at 3:36 PM, Bela Patel <belaramani@...> wrote:
|
|
|
Re: Re: Table cell text overlapes with table border ...docbook 1.74.3Hi,
Since it’s not a regular word it can’t be hyphenated; you must specify yourself the places where it is allowed to break. If you want a hyphen to be visible when the text is broken you can use the soft hyphen character (U+00AD). Otherwise you can use a zero-width space (U+200B). HTH, Vincent Bela Patel wrote: > Does anybody know how to resolve the following issue? How to make the text > string stay within the table cell so that it does not overlap with table > border? > > Any help will be greatly appreciated. > > Thanks, > BRAMANI. > > On Mon, Oct 12, 2009 at 3:36 PM, Bela Patel <belaramani@...> wrote: > >> Hi, >> >> I am using docbook version 1.74.3 for PDF report generation. >> >> I have 50 chnaracter long text in a table cell but it overlapes with the >> table border. >> >> for example : >> >> 1. I have text "*ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDEFGHIJKLMNO*" in >> one table cell but it overlapes with the table border and goes outside of >> the table. >> >> 2. But if I modify it as "* >> ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO123456789*" then it does not >> overlap with the border but after 26 character it breaks and goes to second >> line within the same cell as shown below. >> >> ABCDEFGHIJKLMNOPQRSTUVWXYZ- >> ABCDEFGHIJKLMNO123456789 >> >> how can I make the text string shown in first option to stay within the >> same cell so that it does not overlap with the table border. >> >> Thanks, >> BRAMANI. >> >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
|
|
|
Re: Re: Table cell text overlapes with table border ...docbook 1.74.3Hi,
Bela Patel wrote: > On Tue, Oct 27, 2009 at 10:36 AM, Bela Patel <belaramani@...> wrote: > >> Vincent, >> >> I dont quite understand what you are suggesting. >> >> I just want the text to automatically break in next line within the cell >> depending on the cell size so that it does not overlap with Table border. >> >> Can you please explain this? You have to insert those characters wherever you are happy for the text to break, possibly between every letter. The XSL-FO processor will then choose one of those places to break the text into two lines. For example: ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDEFGHIJKLMNO Basically by inserting that character (or the soft hyphen), you’re giving the XSL-FO processor opportunities to break the text. The more of those there are, the less risk there is that the text is going to overlap the cell. Ideally you would somehow automate that process, inserting those characters by hand is obviously tedious. HTH, Vincent >> Thanks, >> BRAMANI. >> >> On Tue, Oct 27, 2009 at 5:55 AM, Vincent Hennebert <vhennebert@... >>> wrote: >>> Hi, >>> >>> Since it’s not a regular word it can’t be hyphenated; you must specify >>> yourself the places where it is allowed to break. If you want a hyphen >>> to be visible when the text is broken you can use the soft hyphen >>> character (U+00AD). Otherwise you can use a zero-width space (U+200B). >>> >>> HTH, >>> Vincent >>> >>> >>> Bela Patel wrote: >>>> Does anybody know how to resolve the following issue? How to make the >>> text >>>> string stay within the table cell so that it does not overlap with table >>>> border? >>>> >>>> Any help will be greatly appreciated. >>>> >>>> Thanks, >>>> BRAMANI. >>>> >>>> On Mon, Oct 12, 2009 at 3:36 PM, Bela Patel <belaramani@...> >>> wrote: >>>>> Hi, >>>>> >>>>> I am using docbook version 1.74.3 for PDF report generation. >>>>> >>>>> I have 50 chnaracter long text in a table cell but it overlapes with >>> the >>>>> table border. >>>>> >>>>> for example : >>>>> >>>>> 1. I have text "*ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDEFGHIJKLMNO*" >>> in >>>>> one table cell but it overlapes with the table border and goes outside >>> of >>>>> the table. >>>>> >>>>> 2. But if I modify it as "* >>>>> ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO123456789*" then it does not >>>>> overlap with the border but after 26 character it breaks and goes to >>> second >>>>> line within the same cell as shown below. >>>>> >>>>> ABCDEFGHIJKLMNOPQRSTUVWXYZ- >>>>> ABCDEFGHIJKLMNO123456789 >>>>> >>>>> how can I make the text string shown in first option to stay within the >>>>> same cell so that it does not overlap with the table border. >>>>> >>>>> Thanks, >>>>> BRAMANI. --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
RE: Re: Table cell text overlapes with table border ...docbook 1.74.3Hi Bela,
This is a pretty common problem when adding technical data to tables, since hyphenation tables/algorithims don't apply to non-standard things like long field names. The way to handle it is to treat the contents of your table entries like they were URLs (which also bugger up hyphenation). The following template introduces soft hyphens between every letter of every table entry: <xsl:template name="hyphenate-tableentries"> <xsl:param name="entry" select="''"/> <xsl:choose> <xsl:when test="$tableentry.hyphenate = ''"> <xsl:value-of select="$entry"/> </xsl:when> <xsl:when test="string-length($entry) > 1"> <xsl:variable name="char" select="substring($entry, 1, 1)"/> <xsl:value-of select="$char"/> <xsl:if test="contains($tableentry.hyphenate.chars, $char)"> <!-- Do not hyphen in-between // --> <xsl:if test="not($char = '/' and substring($entry,2,1) = '/')"> <xsl:copy-of select="$tableentry.hyphenate"/> </xsl:if> </xsl:if> <!-- recurse to the next character --> <xsl:call-template name="hyphenate-tableentries"> <xsl:with-param name="entry" select="substring($entry, 2)"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:value-of select="$entry"/> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:param name="tableentry.hyphenate.chars">_.-/&</xsl:param> <xsl:param name="tableentry.hyphenate"></xsl:param> <xsl:template match="entry//text()"> <xsl:call-template name="hyphenate-tableentries"> <xsl:with-param name="entry" select="."/> </xsl:call-template> </xsl:template> I forget who showed me this (someone on this list, I'm sure; think it might have actually been Bob Stayton), but I know I can't take credit for it. Cheers, Jeff. -----Original Message----- From: Vincent Hennebert [mailto:vhennebert@...] Sent: Tuesday, October 27, 2009 8:54 AM To: docbook-apps@... Subject: Re: [docbook-apps] Re: Table cell text overlapes with table border ...docbook 1.74.3 Hi, Bela Patel wrote: > On Tue, Oct 27, 2009 at 10:36 AM, Bela Patel <belaramani@...> wrote: > >> Vincent, >> >> I dont quite understand what you are suggesting. >> >> I just want the text to automatically break in next line within the cell >> depending on the cell size so that it does not overlap with Table border. >> >> Can you please explain this? You have to insert those characters wherever you are happy for the text to break, possibly between every letter. The XSL-FO processor will then choose one of those places to break the text into two lines. For example: ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDEFGHIJKLMNO Basically by inserting that character (or the soft hyphen), you’re giving the XSL-FO processor opportunities to break the text. The more of those there are, the less risk there is that the text is going to overlap the cell. Ideally you would somehow automate that process, inserting those characters by hand is obviously tedious. HTH, Vincent >> Thanks, >> BRAMANI. >> >> On Tue, Oct 27, 2009 at 5:55 AM, Vincent Hennebert <vhennebert@... >>> wrote: >>> Hi, >>> >>> Since it’s not a regular word it can’t be hyphenated; you must specify >>> yourself the places where it is allowed to break. If you want a hyphen >>> to be visible when the text is broken you can use the soft hyphen >>> character (U+00AD). Otherwise you can use a zero-width space (U+200B). >>> >>> HTH, >>> Vincent >>> >>> >>> Bela Patel wrote: >>>> Does anybody know how to resolve the following issue? How to make the >>> text >>>> string stay within the table cell so that it does not overlap with table >>>> border? >>>> >>>> Any help will be greatly appreciated. >>>> >>>> Thanks, >>>> BRAMANI. >>>> >>>> On Mon, Oct 12, 2009 at 3:36 PM, Bela Patel <belaramani@...> >>> wrote: >>>>> Hi, >>>>> >>>>> I am using docbook version 1.74.3 for PDF report generation. >>>>> >>>>> I have 50 chnaracter long text in a table cell but it overlapes with >>> the >>>>> table border. >>>>> >>>>> for example : >>>>> >>>>> 1. I have text "*ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789ABCDEFGHIJKLMNO*" >>> in >>>>> one table cell but it overlapes with the table border and goes outside >>> of >>>>> the table. >>>>> >>>>> 2. But if I modify it as "* >>>>> ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNO123456789*" then it does not >>>>> overlap with the border but after 26 character it breaks and goes to >>> second >>>>> line within the same cell as shown below. >>>>> >>>>> ABCDEFGHIJKLMNOPQRSTUVWXYZ- >>>>> ABCDEFGHIJKLMNO123456789 >>>>> >>>>> how can I make the text string shown in first option to stay within the >>>>> same cell so that it does not overlap with the table border. >>>>> >>>>> Thanks, >>>>> BRAMANI. --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
| Free embeddable forum powered by Nabble | Forum Help |