Contents | Start | End | Previous: KB0055: Why do you use jargon such as documents, sections, configurations, and so on? | Next: KB0057: How to find rogue characters for EpubCheck 'invalid XML character' errors


KB0056: Why don't tabs work in Jutoh?

See also: How do I changes styles, for example to add indentation?

Tabs are not supported by HTML, and HTML is the basis of the popular ebook formats (Epub and Kindle). When Jutoh imports a document from DOCX or ODT, it keeps the tabs so that you know which paragraphs should be indented.

You can apply an existing indented paragraph style such as "Body Text First Indent", or you can create your own, and then apply it to the relevant paragraphs using the drop-down style control on the toolbar, or (better) by double-clicking on styles in the Formatting Palette.

To quickly apply an indented paragraph style to all paragraphs that contain tabs throughout your whole project, use the Formatting Cleanup command on the Format | Book menu. Check Replace tabs, and choose the paragraph style to use. If Body Text First Indent exists in your style sheet, this will be the default style.

Or, if you don't want to apply a paragraph style, check Remove spaces at the start and end of paragraphs in Formatting Cleanup.

Replacing tabs with indented paragraphs via the Find dialog

If you don't want to use Formatting Cleanup, you can use the Find dialog to apply a style with first line indent to all tabbed paragraphs, removing the tabs at the same time. This method allows you to choose the paragraphs that are changed individually, if you wish.

  1. Go to the first section in the project, and press Ctrl+F to show the Advanced Find dialog.

  2. Click on the More >> button and click the first Add button. Choose Tab. This will place ~{tab} in the Find field.

  3. Click on the second Add button (for replacements) and choose Paragraph Style. Choose the "Body Text First Indent" style and press OK.

  4. Click again on the second Add button and choose Empty String. This will place ~{empty} in the Replace with field (we are telling Jutoh to replace each tab with the empty string, i.e. nothing).

  5. Now click Replace, or Replace All to perform this operation throughout the project.

Other ways to replace tabs

You might be using tabs not for indentation at the start of a paragraph, but to separate text, for example in dialogue in a screenplay to separate the character attribution from the speech.

In this case, you might consider replacing the tabs with spaces or punctuation and spaces, although this doesn't align columns of text.

If you have multiple columns, consider breaking them down into consecutive paragraphs (with some of them indented or highlighted in other ways), especially as multiple columns may be cramped on a small portable device.

If you really need aligned columns, consider using tables. Tables should be used sparingly, and of course if you have a lot of tabs to change, replacing them with tables will be time-consuming.


Contents | Start | End | Previous: KB0055: Why do you use jargon such as documents, sections, configurations, and so on? | Next: KB0057: How to find rogue characters for EpubCheck 'invalid XML character' errors