PPTools/Guiguts/Guiguts Manual/Text Menu

From DPWiki
Jump to navigation Jump to search


GUIGUTS VERSION 1.5.0 MANUAL

The Text Menu

There are three main phases to post-processing. The first one corrects errors and makes the text consistent; the result is used by the other two phases. The second phase converts a copy of the first phase results into the final Plain Text that will be published, and that is largely done with the Tools and Txt menus; the Txt menu is the subject of this page. The third phase converts another copy of the first phase results into the final HTML document that will be published, and that is largely done with the HTML and Custom menus, covered elsewhere.

Gg-1.3-39a-textmenu.png


Overview

The top half of this menu helps you convert inline tags, such as <i>immediately</i> to simpler representations of emphasis, such as _immediately_. The middle helps you move selected text right and left, while the bottom options help format boxes and tables. The very last option looks for possible errors.


Tag Conversion

The Txt Conversion Dialog

Gg1.0-40a-txt conversion.png

lets you do all of the individual tag conversions at once. This is the quickest and easiest way of doing these conversions. If the defaults are acceptable to you, just click Do All Selected and wait for the conversions to finish.

Note that the default for Small-caps conversion is Ignore which leaves the <sc> and </sc> tags in place. If you prefer to convert the tagged text to uppercase or to some specific character (the plus sign is shown as the default for this), select that option (all of your settings will be remembered across sessions, until you change them) before clicking Do All Selected.

If you want to convert individual categories of tags, use the buttons to the right of them; if you want to convert Small-caps tags individually, use Do <sc> manually (or use the same option on the Txt menu itself).


Convert to Curly Quotes

This converts most straight double and single quotation marks to “curly” UTF-8 opening and closing marks. Although it's on the Text Menu, it's best to use this Convertor near the end of the first stage of post-processing, after all errors have been corrected, but just before making separate copies that will become the Plain Text and HTML versions. That way, the results will be available to both versions.

Limitations:

  • The Curly Quotes Convertor does not work with files already converted to HTML, as it will convert "straight" quotation marks within HTML tags to [invalid] curly quotation marks. Use it before running "AutoGenerate."
  • It does not attempt to convert single quotation marks that are preceded by a space or newline, as they might indicate omitted letters, such as the ones used in dialect or contractions such as ’Tis (the season to be jolly). So, after the conversion, you will need to search for remaining upright quotation marks and replace them yourself. You can use Search and Replace to look for the next ' and replace it with either a ‘ or a ’, but an easier way is to use the next option on the menu, "Curly Quote Corrections."
  • When consecutive double quotation marks are not clearly paired as opening ... closing, the conversion sometimes does them incorrectly, using a closing instead of an opening, or vice versa. When this may have happened, the convertor places an @ sign at the end of the paragraph in which the possible error occurred. So, after the conversion, you will need to search for @ signs, find the curly quotation marks preceding it, and fix the errors. You'll also need to remove the @ signs. The easiest way to do this is with the next option on the menu, "Curly Quote Corrections."


Curly Quote Corrections

Gg-1.3-41g-curly quote corrections.png

This Dialog helps you find and fix most or all of the double and single quote errors the Curly Quote Convertor may have made, rather than having to search for them yourself.

Double quotation marks can be checked and corrected using the top section of this menu. When Guiguts is not sure it converted a double quote to the correct curly, it places an @ sign at the end of the line or paragraph containing it. Make sure the cursor is at the top of the file, then click Select Next @ Line, look at the highlighted mark, and if necessary use Flip Double Quotes to change the wrong ones. Most of them will have been done correctly, so you can just remove the @ sign and look for the next one. If there is more than one questionable quotation mark on the line, you may have to highlight it yourself, then use the Dialog to flip it.

Single quotation marks at the beginning of a word may be opening single curlies or placeholders for contractions and omitted letters. Guiguts generally leaves those ambiguous apostrophes unchanged, although it has a list of common contractions, such as ’Tis, that it uses when appropriate. You can use the middle section of this menu to find and curl the ones Guiguts did not.

The bottom section of the menu lets you insert whichever of the four curly quote marks you may need, should something be missing or not easily correctable.


Individual Conversions

The next few options let you add or convert one type of tag at a time, or all the common tags except Small-caps.

Add a Thought Break

This inserts five spaced asterisks at the end of the current line. If you use this, you will want to position the cursor on a blank line first, and make sure there are blank lines above and below the asterisks afterwards.

Small Caps

These options offer alternative ways of handling Small-caps.


Shifting Left and Right

Indentation

  • Indent by 1 shifts the selection right by inserting 1 space at the left side of each line in the selected area.
  • Indent by 4 shifts the selection right by inserting 4 spaces at the left side of each line in the selected area.
  • Indent by -1 shifts the selection left by removing one space from the left side of each line in the selected area that has a space—lines that are already flush to the margin or left side are not moved.

These shift functions are also available from the Windows keyboard as alt-left-arrow or ctrl-m (right by 1), ctrl-alt-m (right by 4), and alt-right-arrow or ctrl-shift-m (left by 1). (Not available in Linux or Mac.)

These functions restore the selection so you can immediately click on the functions again. If you tear off the Selection Menu, you can shift a selection multiple spaces quickly by clicking repeatedly on the function.

The Indent functions work with a columnar selection, so you can use them to reposition the contents of a table cell.


Horizontal Alignment

Usually, you will use these after selecting a block of several lines of text, or a rectangular area (by holding down Shift as you move the cursor diagonally across some lines).

  • Center Selection -- centers based on the standard default line length (72 characters);
  • Right-Align -- moves the selected text to the right margin (default 72);
  • Right-Align Numbers in Selection -- finds the right-most numerals that are preceded by at least two spaces on each line in the selection, and moves them to the right margin. It's most useful for Tables of Contents and Lists of Illustrations, but can be used to align numbers in other situations. If you are aligning columns of numbers in tables, ASCII Table Effects, below, usually is a better method to use.


Align text on string

Gg1.0-43a-align text on string.png
displays this dialog, with the period chosen as the default. Change the text if necessary, then click Align selected text. This moves the lines in the selection left or right so that the first occurrence of that symbol in each line is vertically aligned. For example, this text:
$10.20      
$1,024.65 
$244.86      

when aligned on the decimal point, changes to:

   $10.20      
$1,024.65 
  $244.86      

The Align function operates only on full lines, but not a columnar selection, so it cannot be used to adjust a column in a table cell.

You also can use this to align the Roman Numeral Chapter numbers in a Table of Contents, if they are followed by periods, and you can specify other characters than the default period.


Draw ASCII Boxes

Gg1.0-44a-draw asci boxes.png

This is intended to enclose the text you've just selected in a box like

+----+
|this|
+----+

Before using it, save your document, as the results may not be what you expect.

Choose the width and alignment you need, then click Draw Box.


 

ASCII Table Effects

This is a remarkably good tool for transforming wide tables and tables formatted by several different people into tables suitable for the Plain Text version of a book. It also can be useful in the preliminary stages of preparing tables for transformation into HTML, although it is not a replacement for using the HTML <table> markup. See HTML>Markup for information on generating tables in HTML.


Table Effects Summary

Use Txt>ASCII Table Effects, or click Guiguts Tb-tfx.png in the toolbar to open the ASCII Table Special Effects dialog:


GG-1.4.1-45h00-tableeffects dialog.png


The following is a reference summary of the Table Effects dialog. Several step-by-step tutorials follow below.

Button Use or Effect
Table Select Designate the current selection of text as a table. The selection is highlighted a salmon color and other table effects are enabled. If you've selected the text before opening Table Effects, those lines will be used immediately.
Table Deselect Clear the table highlighting and disable table effects.
Insert Vertical Line Insert a vertical column of stile (vertical bar "|") characters the height of the table immediately to the right of the insertion point.
Add Vertical Line Replace the vertical column of spaces to the right of the insertion point with stile characters.
Space Out Table Insert a blank line between each line of the table. This allows Table Effects to wrap text within columns while keeping individual cells separate from each other.
Compress Table Removes all empty lines from the table, reversing the effect of Space Out Table. Use this when you're done preparing the table.
Delete Sel. Line Delete the currently-selected vertical column of stiles. Opposite of Insert Vertical Line. Any text to the right of the stiles will shift one character to the left. If you've squeezed columns together so that there are no spaces between them, other than the stiles themselves, some text in adjacent columns will run into each other. To prevent this, use Remove Sel. Line or keep the separator lines (neither delete nor remove them).
Remove Sel. Line Replace the currently-selected vertical column of stiles with spaces, which preserves a gap between adjacent columns. Opposite of Add Vertical Line.
Select Prev Line Select the column of stile characters to the left of the insertion point. The line is highlighted green and becomes the object of Move, Delete, and Remove operations. (Left-arrow when focus in table dialog.)
Select Next Line Select the column of stile characters to the right of the insertion point. The line is highlighted green and becomes the object of Move, Delete, and Remove operations. (Right-arrow when focus in table dialog.)
Line Deselect Clears the highlighting from the current vertical line.
Auto Columns Scan the table for columns, defined as data separated horizontally by at least two spaces. Add a vertical line to the right of each column. Immediately review the results before continuing, use "UNDO" if necessary, adjust minor issues and retry, or add the column lines yourself.
____
Justify Column: L/C/R Switches that set how text will be aligned when the selected column is made wider or narrower: Left-aligned, Centered, or Right-aligned. These are available and used only when Rewrap Cols is checked; when it is unchecked, alignment doesn't change and the text in the column doesn't move or rewrap when the column divider is moved left or right.
Indent/Hanging These are for use with left-justified columns of text that need to be rewrapped. When not used, all the text in the column will be flush-left against the column divider line, making cells that rewrap into several lines harder to read. You can set an Indent value to make the first line of each cell in the column indented (like a normal paragraph in a printed book), and you can select "Hanging" as well as an Indent value to make all BUT the first line of each cell indented (hanging indents, which is how such tables usually are printed). The second tutorial shows examples of this.
Rewrap Cols By default, narrowing or widening columns will allow Table Effects to rewrap/unwrap cells to fit the column width. If you deselect this option, cells will not rewrap, the 'Justify' options will become unavailable, and only the spacing in the right side of the column changes when Move Left or Move Right is used.
Move Left Make the column one character narrower by removing one column of spaces, thereby moving the currently-selected vertical line to the left. (Ctl-left-arrow when focus is in the table dialog.) If Rewrap is off, line only moves if there is at least one trailing space in every row of the selected column. If Rewrap is on, cells to the left are rewrapped to fit the smaller space, and the current Justification setting is used for alignment.
Move Right Make the column one character wider by inserting one column of spaces, thereby moving the currently-selected vertical line to the right. (Ctl-right-arrow when focus is in the table dialog.) If Rewrap is on, text in the selected column is rewrapped to fit the larger space, and the current Justification setting is used for alignment.
____
Character (default shown is @) Specifies the symbol that will replace all leading and trailing spaces in the selected column. Character, Fill, and Restore are used to help maintain decimal/numeric alignment in numeric columns. See Aligning Numeric Columns, below.
Fill Replaces all leading and trailing spaces in the selected column with the Fill character
Restore Replaces all of the fill characters in the selected column with spaces
____
Table Right Column Field specifying the width of the table for Grid/Step conversion.
Convert Grid to Step Converts a conventional table to a stepped form; see Grid Versus Step Format, below. Caution: table must be spaced out first for good results.
Convert Step to Grid Reformats a stepwise table to rectangular form, spaced to the width specified as Table Right Column.  
____
Rejoin Rows Takes a table with one cell per line and a blank line to mark rows, and converts it to a table with double space separators for cells, and all the cells from each table row on a single text line
____
Undo and Redo Quick access to Undo and Redo when a table action doesn't do what you expected.


Most table effects can be undone with a single use of Undo.


When used for Plain Text tables, ASCII Table formatting should be deferred until after all inline tags, such as italic, bold, and small-cap, have been converted. Those conversions will align the columns properly, as the Formatters took the tags into account.

By contrast, when used to maintain decimal alignment in HTML tables, font style markups or tags must be retained. See Aligning Numeric Columns, below.

When you set the Rewrap switch and move a column boundary left or right, Guiguts rewraps the text of the affected cells to fit the wider or narrower space. Guiguts will not rewrap, even if the switch is set, if any cell in the column contains italic markup.


Table Effects Tutorials

A Typical Table

Suppose your book has a table like the following:

/*
PETER'S OUTDOOR PLANTING TABLE

NAME          DEPTH TO                  DISTANCE APART
                      PLANT          SEEDS             FURROWS
Bean (Bush)   2 in.        12-20 in.         3 ft.
Beet          1-1/2 in.    4-9 in.           12-15 in.
Cabbage       1/2 in.      20-24 in.         3 ft.
Corn          1-1/2 in.    3 ft.             3-4 ft. (hills)
Pumpkin  1-1/2 in.    8-10 ft.       8-10 ft. (hills)
Radish     1/2 in.       3 in.        6-8 in.
Tomato   1/2-1 in.       3 ft.          3 ft. (hills)
Turnip     1/2 in.       6 in.         12 in.
*/

The table spanned two pages so was proofed by different proofers who used different columns and different alignment styles. (You can copy this text out, paste it into Guiguts, and follow along.)

You could fix it manually, but instead you open the Table Effects dialog. You drag to select the data rows of the table (you'll fix up the headings manually, later) and then you click the Table Select button. The table is highlighted salmon.

Guiguts Tx ex1.png

Then you click the Auto Columns button and Guiguts makes its best guess at where the columns are, based on data separated by at least two spaces. It inserts vertical lines between columns and left-aligns the data:

Guiguts Tx ex2.png

You can foresee a problem in the fourth column: you'd like it to align right, but those three values ending in "(hills)" are going to push their entries left. One solution would be if the "(hills)" entries were in a column by themselves. Guiguts didn't put them there because they are only one space away from other data.

What to do? You click the Undo button. That removes the columns. (Most Table Effects actions can be undone with a single click of Undo, which makes experimentation easy.) Then you manually insert another space left of each "(hill)". And one more time, click Auto Columns. Guiguts gives you the extra column:

Guiguts Tx ex3.png

You would like to convert the middle three columns from left-aligned to right-aligned. Table effects will do that, but only when you allow it to "rewrap" the cell data. In order to rewrap cells, Guiguts has to know where each cell begins and ends—it can handle cells with multiple lines of text. In order to define the rows, you click the Space Out Table button. Guiguts inserts a blank line between each line of the table:

Guiguts Tx ex4.png

If your table had multi-line cells, this would split them all up. You'd have to delete the extra empty lines now; or else you could have put the blank lines in the right places earlier, manually.

Now you are ready to operate. You click in the document to put the insertion point in any value in the second column, and click Select Next Line. Guiguts highlights the vertical line to the right of the insertion point, the line between columns 2 and 3. The width of the table column is shown in the table dialog.

Guiguts Tx ex5.png

You click Select Next Line and Select Prev Line a few times to see how the focus moves from one vertical line to the next, and how the width of each column is shown in the dialog. Fun! OK, back to work.

Because you want Guiguts to rewrap the cell data, you turn on the Rewrap Cols switch and the R (right-align) button:

Gg-1.3-45b-ascii table effects detail.png

Then you click Move Line Right. Guiguts moves the selected vertical line one space right and simultaneously rewraps the cells to its left, right-aligning them:

Guiguts Tx ex7.png

You do the same for the third and fourth columns, right-aligning them as well:

Guiguts Tx ex8.png

Then you click Compress Table to take out all those blank lines that delimit the rows. Your table is almost finished.

Guiguts Tx ex9.png

You could leave the vertical columns of stile characters in the table but you decide it would look more like the original without them. One by one you select each vertical line and eliminate it. You can either click Remove Sel. Line so that the stiles are replaced with spaces, or click Delete Sel. Line so that the stile characters are deleted and closed up. The final table is ready:

Guiguts Tx ex10.png

You click Table Deselect to clear the salmon highlighting and disable table effects until next time.

This procedure did not include aligning the column headings, so you often will have to do so manually.


Table with Long Text Passages

This example and the next use the same table, found in "Every Step in Canning," a project DP did in 2004. First, we will use Table Effects with Hanging Indents to create a table resembling the original, only part of which is shown here. Then, we will show how to convert the same table to Step Format:


Gg-1.3-45h-ascii table indent step 01.png


Suppose the table had been formatted as follows (this matches what's shown at the beginning of the third example):


Gg-1.3-45h-ascii table indent step 02.png


Let's select the table, including the column headings, but not its title:


Gg-1.3-45h-ascii table indent step 03.png


Click ASCII Table Effects on the TEXT Menu. The Dialog will appear and the pre-selected text will be shown in salmon:


Gg-1.3.3-45h-45hv133-ascii table indent step 04.png


Since the table already has stile lines, we don't need to insert them, so we can just select one of them to start adjusting the column of text immediately to its left. Click someplace in the last column and then click Select Next Line:


Gg-1.3.3-45h-45hv133-ascii table indent step 05.png


Set an indent value (we chose "1"), select Hanging, and click Move Right several times to get a first approximation of how wide the column should be:


Gg-1.3.3-45h-45hv133-ascii table indent step 06.png


The text in that column now is wider and in hanging indent format.

Click Select Prev Line a few times to get to the first column, then make it a bit wider. Click Select Next Line to process the second column, then the third. When we get to the fourth column, we will want it to be centered, so select that type of justification, turn off Hanging, and set the Indent to "0". (Guiguts will use those values, even with centered and right-justified text, if you want that.) Make the column a bit narrower by clicking Move Left once or twice. We want the overall table to be as wide as possible, within the 75-character recommended limit, so eventually, it will look something like this (74 characters; we will shift it one to the right later on, so that it will not be wrappable at Project Gutenberg):


Gg-1.3.3-45h-45hv133-ascii table indent step 07.png


The body of the table is done, but the column headings should be centered. To do this, click "Deselect Table", then highlight just the three heading lines, and click "Select Table":


Gg-1.3.3-45h-45hv133-ascii table indent step 08.png


Make sure Justification is set to center, Indentation to "0", and Hanging is off. Then, select each stile line in turn and click Move Right and then Move Left. This will center the heading text while keeping the stile lines aligned, and the result will be:


Gg-1.3.3-45h-45hv133-ascii table indent step 09.png


Now, close the ASCII Table Special Effects dialog. The salmon selection will disappear and the finished table will look like this:


Gg-1.3-45h-ascii table indent step 10.png


The images in this example didn't include no-wrap markers /*. To prevent future rewrapping, select the table, including the column headings, then use Indent Selection 1 on the TEXT Menu, or the keyboard shortcut alt+ctrl+m to shift it one space to the right.


Aligning Numeric Columns

The "Leading/Trailing Spaces" controls can make it easier to maintain decimal and numeric alignment in columns whose numbers are of unequal widths. The methods are slightly different for Plain Text than for HTML, so this example has two parts. If the formatting from the Rounds was done well (as it usually was), you won't need to make any changes to the Plain Text version other than converting the tags, and even if changes are needed in a small, simple table, it may be easier to just do them manually. However, when there are many columns and/or rows with numeric data, aligning a lot of numbers by hand can become quite tedious.

This is the page image of the original table (actually, it's a simplified version of a wider and longer table that you would not have wanted to adjust cell-by-cell):


Gg-1.3.3-45h-01-sourceimage.png


And here is the table as it was received from the Rounds:


Gg-1.3.3-45h-02-fromrounds.png


Plain Text Numeric Alignment

This will be done after the error correction phase is done and the Plain Text and HTML versions have gone their separate ways. Before adjusting the table in Plain Text, convert all of the tags; don't do this for the HTML version, but see HTML Numeric alignment, below. Make sure the columns are properly aligned and manually adjust them if necessary. The result should look like this:


Gg-1.3.3-45h-03-converttags.png


To show how these alignment controls work, we will widen the numeric columns. Blank out the border line below the heading, open the ASCII Table Special Effects Dialog, and highlight the table rows (don't include the top or bottom borders), keeping the vertical column separators in place:


Gg-1.3.3-45h-04-tableselect.png


Space out the table so that most lines won't rewrap when they shouldn't. Delete the empty lines in the heading so the heading cells can rewrap if necessary:


Gg-1.3.3-45h-05-spaceout.png


Click someplace in the table and then click "Select Next (or) Prev Line" until the next-to-last column is selected (the one for "Rate aft"). Set Justify to center and make sure Rewrap Cols is checked.

Just to see what would happen if we didn't use these controls, click Move Right twice and you will see the problem: the numbers in that column no longer are aligned:


Gg-1.3.3-45h-06-badcenter.png


Undo the Move Rights (click Undo twice). Now, click Fill and you will see that all of the leading and trailing space in that column have been replaced by the Fill character @. (If the table contains its own @ signs, use a character that isn't in the table):


Gg-1.3.3-45h-07-fill.png


Now click Move Right twice and you will see that alignment is kept:


Gg-1.3.3-45h-08-widen.png


Click Restore to remove the @ signs and it'll be easier to see the good alignment:


Gg-1.3.3-45h-09-restore.png


For each of the other four centered columns, select its line (just to its right), click Fill, Move Right twice, and Restore. Now, all five columns are wider and the numbers within them remain aligned, even though they are of different widths:


Gg-1.3.3-45h-10-widenall.png


The table is ready, so click Compress, then Deselect:


Gg-1.3.3-45h-11-deselect.png


Adjust the lengths of the top/bottom borders, restore the heading's bottom border, and make the left-most (Names) column narrower to finish the table:


Gg-1.3.3-45h-12-finishedplaintext.png


In case you are wondering why we didn't narrow the Names column using the Effects Dialog: the heading cell for Names is blank, so Effects would have treated "Elizabeth" as part of the heading, moving it up to the first heading line. A temporary placeholder character at the top-left of the blank area would have prevented that and let us make the column narrower by using Table Effects.


HTML Numeric Alignment

HTML has no concept of decimal or numeric alignment. There may be something in the CSS3 specification for this, but as this is being written, it isn't implemented in any browser. Numbers can be right-aligned if all of their decimal or fractional components are of uniform width, but not otherwise; and if right-aligned, usually will not be centered under the headings. Centered alignment will work only if all of them are the same width and contain the same number of decimal points, fractions, and commas.

So, if we simply use the HTML>Markup Dialog to convert our sample table and either center or right-align the numeric columns this is how the table will look in a Browser (borders omitted and headings slightly formatted to improve readability):


Gg-1.3.3-45h-21-nofillcenter.png
Gg-1.3.3-45h-22-nofillright.png


 

Fortunately, there is a workaround: character widths in variable-width fonts have been chosen so that numbers are twice the width of a space, periods and commas are the width of a space, and hard spaces are the same width as spaces. We can use that to maintain numeric/decimal alignment when using "text-align: center;".

(It's also possible to achieve alignment by using css left/right padding, but that doesn't necessarily work with all mobi/epub devices.)

Starting with the same simplified table as before:


Gg-1.3.3-45h-02-fromrounds.png


Before using AutoGenerate, remove the horizontal borders and the left-margin border; keep the other column borders; add place-holders for any empty column-1 cells (this example uses exclamation marks).

After AutoGenerate, when ready to process the table: If there are entity characters, such as &nbsp; or &mdash; or &ndash; convert them FROM entities (HTML menu), to obtain:

Gg-1.3.3-45h-23-nohorizborders.png

Re-align columns if necessary (Alt+right or left arrow) before using Table Effects.

Start Table Effects and select the rows of the table, but not the surrounding paragraph tags. Space out the table, then remove the blank lines in the heading, but keep all the other blank lines:

Gg-1.3.3-45h-24-tableselectspaceout.png

Set Justify to Center and make sure Rewrap Cols is checked, then click within the table and use Select Next/Prev Line until the right-most column divider is highlighted. (You can ignore the <br />'s if they are present.) Click Fill to replace the leading/trailing spaces with @ signs. Do not click Restore; we are doing this to have those @ signs available later on. Don't bother widening the columns (we did that in Plain Text mostly to show the purpose of Fill). Select Prev Line and repeat the FIll / Select Prev Line until all of the numeric columns have been filled:


Gg-1.3.3-45h-25-fillall.png


Deselect the table, leaving the column dividers, blank lines, and the @ signs in place, and close the Table Effect Dialog.


Gg-1.3.3-45h-26-tabledeselect.png


If you did all of this before AutoGenerate, temporarily enclose the result in a pair of <pre> tags, and remove them afterwards.

Now, do some cleanup and also add adjustments that are beyond Fill's capabilities. We will be replacing each @ sign with two hard spaces, but periods, commas, and Unicode fractions are not the width of digits. This the only step that takes longer to do than to read about.

  • Delete any @ signs in the headings
  • When some values in a column have decimal points and other do not, replace a trailing @ sign in non-decimal numbers with an unused symbol; this example uses an accent grave `. Later, we will replace all of these with one hard space.
  • When some values in a column contain Unicode fractions and other do not, replace a leading @ sign with a different unused symbol; this example uses a tilde ~. (Or, you could add an accent grave in the leading area.) Later, we will replace these tildes with three hard-spaces.
  • This example doesn't contain thousands-separators (commas), but they are the same width as a hard-space, so the adjustment also is to add or replace leading @ signs with accent graves (or to delete some hard spaces in individual cells after using the HTML>Markup Dialog to generate the table).

After making these manual replacements, the result for this table is:


Gg-1.3.3-45h-27-punctuation.png


Now, use Search and Replace to change all @ signs within the table to two hard spaces (you usually will have to do this twice because adjacent @ signs don't both get changed in one pass), all accent graves to one hard space, and all tildes to three hard spaces.

Next, use the HTML>Markup Dialog to generate the HTML table. The format settings for this table are: <||||| and ML (Multiple lines) should be selected because of the heading. The HTML>Markup Dialog understands that the column dividers separate cells, and it treats lines containing only those dividers as blank lines, so you don't have to remove any of them yourself.

(The resulting HTML is too long to show here.)

Fixup the <table> tag and the empty cell in the top-left corner (remove the placeholder exclamation marks), then display the result in a browser to confirm alignment (in this example, we added some <br />'s in the heading cells and used css to left-right pad the cells to improve readability; these will have to be done anyway):


Gg-1.3.3-45h-28-verifyalignment.png


Everything should be properly aligned. If not, add or delete hard spaces to finish the adjustments.

Then, add borders and adjust padding to improve readability. The final result looks like this:


Gg-1.3.3-45h-29-finishhtml.png
Gg-1.3.3-45h-01-sourceimage.png


which is very much like the image in the original book.


Grid Versus Step Format

The example above showed a way to format the table within the 75-character limit Project Gutenberg prefers. Some books have tables with many columns containing long sentences or paragraphs of text in each, making it very difficult to format the table within that limit. While really wide tables can't be squeezed down to 75-characters, some marginal ones can be. Here's another way to do that, using the same table as the one above:

TABLE FOR VEGETABLE STORAGE

VEGETABLES|HOW BEST    |PREPARATION|AMOUNT  |REMARKS     |
          |STORED      |FOR STORAGE|FOR     |            |
          |            |           |FAMILY  |            |
          |            |           |OF TWO  |            |
          |            |           |        |            |
Irish     |Must be kept|Potatoes   |10 to 15|Remember    |
Potatoes  |cool with a |must be dug|bus.    |Irish       |
          |slight      |before the |        |potatoes are|
          |degrees of  |ground is  |        |ruined by   |
          |moisture.   |crusted    |        |freezing.   |
          |Use either  |with frost.|        |Potatoes    |
          |cellar or   |Frosted    |        |should be   |
          |cave        |potatoes   |        |kept        |
          |methods. No |will spoil,|        |absolutely  |
          |potato      |one after  |        |dark to     |
          |should be   |another.   |        |prevent     |
          |more than   |Impossible |        |greening by |
          |four ft.    |to sort out|        |light. Never|
          |from air if |frosted    |        |buy potatoes|
          |stored in   |potatoes.  |        |in sacks    |
          |barrels,    |           |        |that show   |
          |boxes,      |           |        |wet places  |
          |crates or   |           |        |due to a    |
          |bins.       |           |        |frosted     |
          |            |           |        |potato.     |
          |            |           |        |            |
Sweet     |Require     |When the   |2 to 3  |If you are  |
Potatoes  |warmth and  |sweet      |bus.    |in doubt as |
          |dryness. In |potatoes   |        |to whether  |
          |crates or on|are dug    |        |the sweet   |
          |shelves in  |they should|        |potatoes are|
          |warm dry    |be allowed |        |matured     |
          |room. Can be|to lie in  |        |enough for  |
          |spread on   |the sun and|        |storage, cut|
          |the floor in|wind for 3 |        |or break one|
          |the room    |or 4 hours |        |end and     |
          |above the   |so as to   |        |expose it to|
          |kitchen     |become     |        |the air for |
          |where they  |perfectly  |        |a few       |
          |will have   |dry. They  |        |minutes. If |
          |plenty of   |must be    |        |the surface |
          |heat,       |well       |        |of the cut  |
          |especially  |ripened and|        |or break    |
          |for the     |free from  |        |dries, the  |
          |first 2 or 3|bruises.   |        |potato is   |
          |weeks after |Can be kept|        |mature. But |
          |they are    |on shelves |        |if moisture |
          |dug.        |in a very  |        |remains on  |
          |            |dry place  |        |the surface,|
          |            |and they   |        |it is not   |
          |            |need not be|        |fully       |
          |            |kept       |        |ripened. In |
          |            |specially  |        |places where|
          |            |cold. Sweet|        |there are   |
          |            |potatoes   |        |early       |
          |            |keep best  |        |frosts,     |
          |            |when they  |        |sweet       |
          |            |are showing|        |potatoes    |
          |            |just a     |        |should be   |
          |            |little     |        |dug about   |
          |            |inclination|        |the time the|
          |            |to sprout. |        |first frost |
          |            |However, if|        |is expected,|
          |            |they start |        |without     |
          |            |growing the|        |considering |
          |            |quality is |        |maturity.   |
          |            |greatly    |        |            |
          |            |injured.   |        |            |
          |            |           |        |            |
Carrots   |Are best    |Can remain |1 to 3  |If you store|
          |stored in   |in the     |bus.    |carrots in  |
          |sand in     |ground     |        |the cellar  |
          |cellars,    |until the  |        |and it is   |
          |caves or    |weather is |        |extremely   |
          |pits; or in |quite cool;|        |dry cover   |
          |tightly     |then be    |        |them with a |
          |covered     |pulled, the|        |little      |
          |boxes or    |tops cut   |        |moistened   |
          |crocks. Must|off and    |        |sand.       |
          |be kept cold|then       |        |            |
          |and         |stored.    |        |            |
          |evaporation |           |        |            |
          |must be     |           |        |            |
          |prevented,  |           |        |            |
          |for         |           |        |            |
          |otherwise   |           |        |            |
          |they become |           |        |            |
          |wilted.     |           |        |            | 

Copy the preceding text and paste it into a clear Guiguts window. Select all the table lines (from "VEGETABLES" down through "wilted.") and click Table Select. Set a margin of 50 in the Table Right Column field. Then click Convert Grid to Step. This reformats the table so:

TABLE FOR VEGETABLE STORAGE

VEGETABLES
    |HOW BEST STORED
    |    |PREPARATION FOR STORAGE
    |    |    |AMOUNT FOR FAMILY OF TWO
    |    |    |    |REMARKS
    |    |    |    |
Irish Potatoes
    |Must be kept cool with a slight degrees of
    |moisture. Use either cellar or cave methods.
    |No potato should be more than four ft. from
    |air if stored in barrels, boxes, crates or
    |bins.
    |    |Potatoes must be dug before the ground is
    |    |crusted with frost. Frosted potatoes will
    |    |spoil, one after another. Impossible to
    |    |sort out frosted potatoes.
    |    |    |10 to 15 bus.
    |    |    |    |Remember Irish potatoes are
    |    |    |    |ruined by freezing. Potatoes
    |    |    |    |should be kept absolutely dark
    |    |    |    |to prevent greening by light.
    |    |    |    |Never buy potatoes in sacks
    |    |    |    |that show wet places due to a
    |    |    |    |frosted potato.
    |    |    |    |
Sweet Potatoes
    |Require warmth and dryness. In crates or on
(etc)

This "stepped" form preserves the table data while keeping the paragraphs readable. A very wide table can be squeezed into 75 or fewer columns in this way. If you don't like the look, or want to try a stepped form with a wider right margin, Undo the conversion.

The stepped table form is an end-form; the other table effects should not be used on a stepped table. If you need to edit the table contents further, you should first either Undo or click Convert Step to Grid to get back to the grid form.


PPtxt

This runs a series of checks for possible errors or other conditions that could benefit from being reviewed, and displays the results in a list. It's meant to be used as the last step in preparing the Plain Text version.