Tabs in MSWord docx don't convert properly

Bug #1816346 reported by David Friedman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Won't Fix
Undecided
Unassigned

Bug Description

I am converting a cookbook from MSWord to EPub, in order to create a kindle. Recipes have a list of ingredients, typically two on a line with a tab separating them. In Word that gives me two neat columns. In the EPub, the tab is replaced by a fixed number of spaces. Since the number of characters in the first item on the line varies, the second column is ragged.

Also, I haven't figured out how to change the fixed number of spaces. I tried spacing my tab stops farther apart and it had no effect I could see. The output in the EPub looks like

2 c flour 1T sugar
t salt 1 cup milk
1 sticks cinnamon 2T butter

Instead of:

2 c flour 1T sugar
t salt 1 cup milk
1 sticks cinnamon 2T butter

Am I doing something wrong? Is there a fix?

Calibre version: 3.39.1
OSX 10.12.6
I'm attaching my Word file. This page seems to only let me attach one file, so I can't also send you the ePub. Am I missing something?

Tags: epub msword tabs
Revision history for this message
David Friedman (davidfriedman) wrote :
  • My MSWord file Edit (814.9 KiB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
Revision history for this message
David Friedman (davidfriedman) wrote :

Here is the ePub.

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1816346

Tabs are not supported in ebook formats, use a table in your Word
document instead and you will be fine.

 status wontfix

Changed in calibre:
status: New → Won't Fix
Revision history for this message
David Friedman (davidfriedman) wrote : Re: [Bug 1816346] Re: calibre bug 1816346

Thanks for letting me know.

On 2/17/19 10:33 PM, Kovid Goyal wrote:
> Tabs are not supported in ebook formats, use a table in your Word
> document instead and you will be fine.
>
> status wontfix
>
> ** Changed in: calibre
> Status: New => Won't Fix
>
--
David Friedman
www.daviddfriedman.com
http://daviddfriedman.blogspot.com/

Revision history for this message
David Friedman (davidfriedman) wrote :

I am using tables instead, as you suggested. The one problem is that the
rows of the tables are more widely spaced in the kindle than in the Word
document. It looks like:

raisins     garlic

salt          water

Instead of like:

raisins     garlic
salt          water

I can put up with that if necessary, but would rather not. Is there
anywhere in the preferences where I can change the spacing? Can I do it
by editing something in the stylesheets?

On 2/17/19 10:33 PM, Kovid Goyal wrote:
> Tabs are not supported in ebook formats, use a table in your Word
> document instead and you will be fine.
>
> status wontfix
>
> ** Changed in: calibre
> Status: New => Won't Fix
>
--
David Friedman
www.daviddfriedman.com
http://daviddfriedman.blogspot.com/

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1816346

Convert to azw3 not mobi and you should be fine. MOBI is obsolete and
has poor support for tables.

Revision history for this message
David Friedman (davidfriedman) wrote : Re: [Bug 1816346] Re: calibre bug 1816346

Thanks.

Unfortunately, the same thing happens with azw3. And EPub.

On 2/19/19 4:58 PM, Kovid Goyal wrote:
> Convert to azw3 not mobi and you should be fine. MOBI is obsolete and
> has poor support for tables.
>
--
David Friedman
www.daviddfriedman.com
http://daviddfriedman.blogspot.com/

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1816346

Well if you want to change the formatting of tables, you can do so in
word or in the converted book afterwards. For examples of table
formatting see the demo file at:
https://manual.calibre-ebook.com/conversion.html#convert-microsoft-word-documents

Revision history for this message
David Friedman (davidfriedman) wrote : Re: [Bug 1816346] Re: calibre bug 1816346

Unfortunately, nothing I do to change the formatting in Word reduces the
space between the rows of the table in the ebook, including setting the
height of the rows in Word to an exact value. I can make the rows in
Word very narrow, but that doesn't affect how they come out in the AZW3
document.

I can, however, reduce the spacing by editing the CSS.

In each .td file I replace "padding: 0.5ex 5.4pt;"  with "padding: 0.1ex
5.4pt;"

That gets something close to the result I want.

Thanks for your help.

On 2/19/19 6:58 PM, Kovid Goyal wrote:
> Well if you want to change the formatting of tables, you can do so in
> word or in the converted book afterwards. For examples of table
> formatting see the demo file at:
> https://manual.calibre-ebook.com/conversion.html#convert-microsoft-word-documents
>
--
David Friedman
www.daviddfriedman.com
http://daviddfriedman.blogspot.com/

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1816346

You dont need to edit it by hand, use the extra CSS setting in the
conversion pipeline, with something like:

td { padding: 0.1ex !important }

Revision history for this message
David Friedman (davidfriedman) wrote : Re: [Bug 1816346] Re: calibre bug 1816346

Many thanks. I initially assumed you meant to put it in

Preferences/conversion/common options/look and feel/styling

So that the conversion would automatically do it. That didn't work. So I
used the editing window to paste your code into the beginning of
Styles/0001.css and that did it. Less work than a search and replace on
all the .td styles.

I believe that solves my last problem. I've just made a donation to
Calibre--you surely are entitled to it.

On 2/20/19 1:05 AM, Kovid Goyal wrote:
> You dont need to edit it by hand, use the extra CSS setting in the
> conversion pipeline, with something like:
>
> td { padding: 0.1ex !important }
>
--
David Friedman
www.daviddfriedman.com
http://daviddfriedman.blogspot.com/

Revision history for this message
Kovid Goyal (kovid) wrote :

You're welcome, I meant put it in the look and feel section of the
conversion dialog, it should work from there. See https://manual.calibre-ebook.com/conversion.html#how-options-are-set-saved-for-conversion

On Thu, Feb 21, 2019 at 12:29:55AM -0000, David Friedman wrote:
> Many thanks. I initially assumed you meant to put it in
>
> Preferences/conversion/common options/look and feel/styling
>
> So that the conversion would automatically do it. That didn't work. So I
> used the editing window to paste your code into the beginning of
> Styles/0001.css and that did it. Less work than a search and replace on
> all the .td styles.
>
> I believe that solves my last problem. I've just made a donation to
> Calibre--you surely are entitled to it.
>
> On 2/20/19 1:05 AM, Kovid Goyal wrote:
> > You dont need to edit it by hand, use the extra CSS setting in the
> > conversion pipeline, with something like:
> >
> > td { padding: 0.1ex !important }
> >
> --
> David Friedman
> www.daviddfriedman.com
> http://daviddfriedman.blogspot.com/
>
> --
> You received this bug notification because you are subscribed to
> calibre.
> https://bugs.launchpad.net/bugs/1816346
>
> Title:
> Tabs in MSWord docx don't convert properly
>
> Status in calibre:
> Won't Fix
>
> Bug description:
> I am converting a cookbook from MSWord to EPub, in order to create a
> kindle. Recipes have a list of ingredients, typically two on a line
> with a tab separating them. In Word that gives me two neat columns. In
> the EPub, the tab is replaced by a fixed number of spaces. Since the
> number of characters in the first item on the line varies, the second
> column is ragged.
>
> Also, I haven't figured out how to change the fixed number of spaces.
> I tried spacing my tab stops farther apart and it had no effect I
> could see. The output in the EPub looks like
>
> 2 c flour 1T sugar
> t salt 1 cup milk
> 1 sticks cinnamon 2T butter
>
> Instead of:
>
> 2 c flour 1T sugar
> t salt 1 cup milk
> 1 sticks cinnamon 2T butter
>
> Am I doing something wrong? Is there a fix?
>
> Calibre version: 3.39.1
> OSX 10.12.6
> I'm attaching my Word file. This page seems to only let me attach one file, so I can't also send you the ePub. Am I missing something?
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/calibre/+bug/1816346/+subscriptions
>

--
_____________________________________

Dr. Kovid Goyal
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________

Revision history for this message
David Friedman (davidfriedman) wrote :
Download full text (3.6 KiB)

My current problems are not really in your department. I want to end up
with a kindle on KDP. They don't support AZW3, do support Word, Mobi,
and EPub. They seem to want me to feed my Word document into their
converter, which is very elaborate and agonizingly slow, at least on a Mac.

I think I also have the option of giving them an EPub or Mobi file, but
how it will work on their software I don't know.

Incidentally, when I double clicked on my AZW3 file it came up in
kindle, but with some random glitches, chunks of text that are in a
smaller font for no detectable reason.

I think I've done enough for tonight. You should persuade KDP to license
calibre instead of their conversion software, but I doubt they would be
willing. Tomorrow I'll figure out how to get one of my files into their
system.

I don't remember having so much trouble with the previous book that I
turned into a Kindle and put on KDP. Either I've forgotten whatever
short cut I used or they have gotten more complicated.

Good night and again thanks.

On 2/20/19 7:40 PM, Kovid Goyal wrote:
> You're welcome, I meant put it in the look and feel section of the
> conversion dialog, it should work from there. See https://manual.calibre-ebook.com/conversion.html#how-options-are-set-saved-for-conversion
>
> On Thu, Feb 21, 2019 at 12:29:55AM -0000, David Friedman wrote:
>> Many thanks. I initially assumed you meant to put it in
>>
>> Preferences/conversion/common options/look and feel/styling
>>
>> So that the conversion would automatically do it. That didn't work. So I
>> used the editing window to paste your code into the beginning of
>> Styles/0001.css and that did it. Less work than a search and replace on
>> all the .td styles.
>>
>> I believe that solves my last problem. I've just made a donation to
>> Calibre--you surely are entitled to it.
>>
>> On 2/20/19 1:05 AM, Kovid Goyal wrote:
>>> You dont need to edit it by hand, use the extra CSS setting in the
>>> conversion pipeline, with something like:
>>>
>>> td { padding: 0.1ex !important }
>>>
>> --
>> David Friedman
>> www.daviddfriedman.com
>> http://daviddfriedman.blogspot.com/
>>
>> --
>> You received this bug notification because you are subscribed to
>> calibre.
>> https://bugs.launchpad.net/bugs/1816346
>>
>> Title:
>> Tabs in MSWord docx don't convert properly
>>
>> Status in calibre:
>> Won't Fix
>>
>> Bug description:
>> I am converting a cookbook from MSWord to EPub, in order to create a
>> kindle. Recipes have a list of ingredients, typically two on a line
>> with a tab separating them. In Word that gives me two neat columns. In
>> the EPub, the tab is replaced by a fixed number of spaces. Since the
>> number of characters in the first item on the line varies, the second
>> column is ragged.
>>
>> Also, I haven't figured out how to change the fixed number of spaces.
>> I tried spacing my tab stops farther apart and it had no effect I
>> could see. The output in the EPub looks like
>>
>> 2 c flour 1T sugar
>> t salt 1 cup milk
>> 1 sticks cinnamon 2T butter
>>
>> Instead of:
>>
>> 2 c flour 1T sugar
>> t salt 1 cup milk...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.