How do I prevent words from breaking in table cells?

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.

How do I prevent words from breaking in table cells?

Postby chuck_agari on Thu Jul 25, 2019 1:34 pm

I'm seeing this:

force-broken_words.png


I have no code anywhere that defines the width of a table column. The start of my table code is just this:

Code: Select all
<table class="agari_settings">
            <col />
            <col />
            <thead>
                <tr>
                    <th>Setting</th>
                    <th>Description</th>
                </tr>
            </thead>


Nothing in the class definitions defines any width, and I added this based on something I found elsewhere:

Code: Select all
word-break: keep-all !important;


So I have this definition:

Code: Select all
table.agari_settings td,
   table.agari_settings th
   {
      border: 1px solid #AAAAAA;
      padding: 0.05in;
      hyphens: none;
      mc-hyphenate: never;
      word-break: keep-all !important;
   }


This happens to be in a 2-column table. There are no graphics or other entities in any of the right-column cells that are wide enough to force the left column to be so narrow that this word breaking occurs.

Any ideas?
You do not have the required permissions to view the files attached to this post.
chuck_agari
Sr. Propeller Head
 
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: How do I prevent words from breaking in table cells?

Postby SteveS on Thu Jul 25, 2019 3:25 pm

I don't have access to Flare at the minute, so I'm going off my (becoming more and more unreliable) memory...

If you select the table in the editor you should see a representation at the top of table width properties. This will tell you if someone has explicitly set the column width. Try to set it to auto, or similar, and see what happens.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
SteveS
Senior Propellus Maximus
 
Posts: 2012
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).

Re: How do I prevent words from breaking in table cells?

Postby chuck_agari on Thu Jul 25, 2019 4:20 pm

SteveS wrote:I don't have access to Flare at the minute, so I'm going off my (becoming more and more unreliable) memory...

If you select the table in the editor you should see a representation at the top of table width properties. This will tell you if someone has explicitly set the column width. Try to set it to auto, or similar, and see what happens.

I am the only author.

Because I have not explicitly set any width values, the table and column values both show implicitly as auto.
chuck_agari
Sr. Propeller Head
 
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: How do I prevent words from breaking in table cells?

Postby SteveS on Thu Jul 25, 2019 6:25 pm

Damn. Hoping for a quick fix.

Have you tried setting word-break to normal? W3 schools seem to link keep-all with Chinese/ Japenese/ Korean, so it might be having a funky effect.

I'd also try removing the <col /> tags.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
SteveS
Senior Propellus Maximus
 
Posts: 2012
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).

Re: How do I prevent words from breaking in table cells?

Postby ChoccieMuffin on Fri Jul 26, 2019 4:13 am

What is your output? Or is the screenshot from the XML Editor?
Started as a newbie with Flare 6.1, now using Flare 2019r1 and 2020.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2414
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: How do I prevent words from breaking in table cells?

Postby chuck_agari on Fri Jul 26, 2019 10:34 am

ChoccieMuffin wrote:What is your output? Or is the screenshot from the XML Editor?

The screen shot is from the PDF.
chuck_agari
Sr. Propeller Head
 
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: How do I prevent words from breaking in table cells?

Postby chuck_agari on Fri Jul 26, 2019 11:12 am

SteveS wrote:Damn. Hoping for a quick fix.

Have you tried setting word-break to normal? W3 schools seem to link keep-all with Chinese/ Japenese/ Korean, so it might be having a funky effect.

I'd also try removing the <col /> tags.

I'll try tweaking the CSS that way and see what happens, although the behavior was the same without that property. at all.

I'm curious to know why you think removing the col tags would have an effect. Flare adds them automatically when it creates a table.
chuck_agari
Sr. Propeller Head
 
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: How do I prevent words from breaking in table cells?

Postby chuck_agari on Fri Jul 26, 2019 12:09 pm

Removing the col tags did not work.

Changing the value of to both normal and nowrap did not work.

Using the overflow-wrap properly and its value of normal did not work.
chuck_agari
Sr. Propeller Head
 
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: How do I prevent words from breaking in table cells?

Postby SteveS on Fri Jul 26, 2019 6:11 pm

chuck_agari wrote:...I'm curious to know why you think removing the col tags would have an effect. Flare adds them automatically when it creates a table.

I don't. But when things don't act as expected and I see something like that (which in this case relates to a design element you are having trouble with) I'll try and rule it out as a contributing factor.

My next step in diagnosing would be to create a new two-column table and seeing if it does the same thing...
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
SteveS
Senior Propellus Maximus
 
Posts: 2012
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).

Re: How do I prevent words from breaking in table cells?

Postby DavidJGross on Fri Oct 30, 2020 8:03 am

Has there been any resolution to this? I'm having a similar issue and would love to hear how/if you figured it out.
DavidJGross
Jr. Propeller Head
 
Posts: 6
Joined: Thu Mar 12, 2020 6:54 am

Re: How do I prevent words from breaking in table cells?

Postby robdocsmith on Sun Nov 01, 2020 8:03 pm

I've had issues with columns needlessly squashing themselves even when no width is set in the <col> tags or stylesheet or tablestyle. It seems that auto width doesn't necessarily always mean adjust to the text inside. What sometimes works for me is to add a column to the table. It seems to force Flare to reassess the column widths and can fix squashed columns. Then deleting the new column keeps the new settings. Don't ask me why or how... It's particularly a problem for me when the table has a lot of columns (>6 or so).

Might be worth a try encapsulating problematic cell text in a <p></p> tag. This seems to resolve a few issues with tables and alignment and might help Flare decide to hyphenate or not.

Explicit column widths will work if you can't get around it, either setting locally in the <col> tag, or if it's a common issue with several similar tables, globally in the stylesheet, or globally in the table style.

Rob
robdocsmith
Propeller Head
 
Posts: 88
Joined: Thu May 24, 2018 3:11 pm


Return to Printed Documentation Targets

Who is online

Users browsing this forum: tatjana and 3 guests