User:Srjfoo/scribbles
ASCII Table Effects Overview
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 Auto-table tool to add the HTML tags. See **needs new link** HTML>Markup for information on generating tables in HTML.
It does have it's limitations, however.
- Wide tables in text mode are often difficult to keep within PG's recommended 75 character max-width recommendation;
- Decimal alignment can be a challenge, particularly for HTML (see tutorial below)
- Fraction alignment can be next to impossible in the text version, especially, if there is a mixture of unicode and superscript/subscript fractions, and especially when mixed with whole numbers without a fractional part.
These tutorials don't pretend to solve all the potential issues with complex tables, but only to teach the essentials of using the tool.
The primary emphasis below is on tables with a grid layout. The grid layout looks a lot like a spreadsheet with no merged cells. If there are rowspans or colspans, it's up to the PPer to figure out how best to massage them. Depending on the overall structure of the table, it may be able to be be broken into multiple parts and then stuck back together after adjustments, but the PPer must decide whether it's faster to do it manually or with the Table Effects tool.
One tutorial demonstrates the use of the step layout. For a discussion about what a step layout is, and an example of what it looks like, see the Grid Versus Step Format tutorial.
Table Effects Summary
Use ASCII Table Effects... in the Text menu to open the ASCII Table Special Effects dialog:
The following table summarizes the functions 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 with a salmon color by default, and table effects are enabled for all rows highlighted thus. If you've selected the text before opening Table Effects, those lines will be highlighted immediately. If you have "Highlight Cursor Line" turned on in Settings, the last line selected will still show as highlighted once Table Select is done; if it's distracting, you can turn it off in Settings->Appearance, or you can move the cursor, as the position of the cursor will not affect operations done on the table as long as Table Select is active. |
| Table Deselect | Clear the table highlighting and disable table effects, but leave the dialog open. |
| Insert Vertical Line | ") the height of the selected rows in 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 vertical bar 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 column of vertical bars. Opposite of Insert Vertical Line. Any text to the right of the vertical bars will shift one character to the left. If you've squeezed columns together so that there are no spaces between them, other than the vertical bars 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 column of vertical bars with spaces, which preserves a gap between adjacent columns. Opposite of Add Vertical Line. |
| Select Prev Line | Select the column of vertical bar characters to the left of the insertion point. The line is highlighted green and becomes the object of Move, Delete, and Remove operations. |
| Select Next Line | Select the column of vertical bar characters to the right of the insertion point. The line is highlighted green and becomes the object of Move, Delete, and Remove operations. |
| Line Deselect | Clears the highlighting from the current column of 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. |
| Adjust Column | |
| 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. If Rewrap is on, cells to the left are rewrapped to fit the smaller space, and the current Justification setting is used for alignment. If Rewrap is off, line only moves if there is at least one trailing space in every row of the selected column. |
| Move Right | Make the column one character wider by inserting one column of spaces, thereby moving the currently-selected vertical line to the right. 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. |
| Leading/Trailing Spaces | |
| Character (default shown is @) | Specifies the symbol that will replace all leading and trailing spaces in the selected column. Character, Fill With, and Restore Spaces are used to help maintain decimal/numeric alignment in numeric columns. See Aligning Numeric Columns, below. |
| Fill With | Replaces all leading and trailing spaces in the selected column with the Fill character |
| Restore Spaces | Replaces all of the fill characters in the selected column with spaces |
| Restructure | |
| 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. |
| Convert Cell-per-line to Grid | 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 |
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, and any fractions have been converted to their final form. Those conversions should 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.
Tutorial: A Relatively Simple Table
Let's start the tutorial with a relatively simple table:
/*
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 and 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.)
It can be fixed manually, but is relatively simple to fix using GG's ASCII Table Effects dialog. Once you've pasted the table into GG, drag to select the data rows of the table, and then click the Table Select button if you already have the dialog open. If you open the dialog only after you have the table rows selected, Table Select will happen automatically. The table is highlighted salmon by default, but you can customize the highlight in the Colors tab in the Settings dialog. The headings can be adjusted at any time but it's probably better to wait until everything else is correctly aligned.
If you click the Auto Columns button, 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 at the right edge of the table, and left-aligns the data:
Typically, numeric columns are aligned to the right. In this table, that works for almost everything, but not for column 4. The three values ending in "(hills)" are going to push the numeric part of the cells out of numeric alignment. The solution used here is to put the "(hills)" entries in a column by themselves. Guiguts didn't put them in their own column because they are only one space away from other data.
Use "Undo" to remove the vertical bars, then manually insert another space left of each "(hill)". And one more time, click Auto Columns. Guiguts gives you the extra column:
To convert the middle three columns from left-aligned, you will need to enable "Rewrap Cells". In order to rewrap cells, Guiguts has to know where each cell begins and ends, since it can handle cells with multiple lines of text. Use "Space Out Table" to add an empty row between each existing row.
Note: If the table has multi-line cells, this would split them all up, and you have to delete the extra empty rows before proceeding. If it's less work, you can put the blank lines in the right places manually instead of using "Space Out Table".
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. >>> rename screenshot to remove "stile"? <<<
Because realigning columns requires that rewrapping be turned on, turn on the Rewrap Cols switch and choose the R (right-align) button:
Click "Move Line Right". Guiguts moves the selected vertical line one space right and simultaneously rewraps the cells in the column to its left, right-aligning them. Do the same for the third and fourth columns, right-aligning them as well:
Then click "Compress Table" to take out all the empty rows. The table is almost finished.
You could leave the columns of vertical bar characters in the table, but in order to make the table look more like the original take them out. One by one, select each vertical line and eliminate it. Either click "Remove Sel. Line" so that each vertical bar is replaced with a space, or click "Delete Sel. Line" so that the vertical bar characters are deleted and closed up. Now is the time to do the final adjustment on the headings, and the final table is ready:
Click Table Deselect to clear the highlighting and disable table effects until next time, or just close the tool until you need it again.
Tutorial: Table with Long Text Passages
This example was taken from "Every Step in Canning," a project DP did in 2004. See the Table with Multi-line Cells section for the text as it came from the last round. If you want to work along with the tutorial, copy it and paste it into a Guiguts 2 text window. The following image shows an excerpt from the proofing images.
Either select the table (including the column headings, but not the title) and then open the ASCII Table Effects dialog, or, if you have the dialog open already, do the selection and click on Table Select. Check to make sure all of the rows are now highlighted in salmon.
Since the table already has vertical lines separating the columns, 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. The column of vertical bars to the right of the last column will be highlighted in green.
In the "Adjust Column" section of the dialog, select Justify "L", 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. For example:
Click Select Next Line again, to select the column of vertical bars to the right of 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 apply those values, even with centered and right-justified text, if you leave them selected.) Make the column a bit narrower by clicking Move Left once or twice.
We will later indent the whole table by one character to keep the text file from being wrapped by some applications, so aim at a 74 character width. Once the indent is applied, it will still be within Project Gutenberg's recommended maximum line length. Continue using "Select Next Line" or "Select Previous Line" and adjusting the column widths with "Move Left" or "Move Right" until you are happy with the look of the table -- something like this:
>>> screenshot, or reword above <<<
The body of the table is done, but the column headings should be centered. To do this, click "Deselect Table", then highlight just the heading lines, and click "Select Table" to work on just the column headings.
Make sure Justification is set to center, Indentation to "0", and Hanging is off. Then, select each vertical line in turn and click Move Right and then Move Left. This will center the heading text while keeping the vertical lines aligned with the body of the table.
Now, close the dialog, then select the whole table, and from the Text menu, select "Indent 1 space", to prevent future rewrapping.
Tutorial: Aligning Numeric Columns
This tutorial has two parts, because the methods are different depending on whether the table is for the text version or the HTML version of the final ebook.
Depending on how complex the table is, you may not need to do much for the plain text as it comes from the rounds other than converting the inline markup tags, and it may be easier to make any tweaks manually. See Aligning numbers with and without decimals for the source if you wish to practice along with the tutorial.
The "Leading/Trailing Spaces" controls can make it easier to maintain decimal and numeric alignment in columns whose numbers are of unequal widths.
For visual reference, here's a scan image of the table being used for the tutorial.
When dealing with aligning numbers that have different formats within the same column, as with this example, it's a good idea to do the final alignment for each version after the text has been split between text and HTML versions. Let's start the tutorial with the text version.
Plain Text Numeric Alignment
This will be done only for the text version, after the error correction phase is done and the Plain Text and HTML versions have been split (see HTML Numeric alignment below for the tutorial for the HTML version). This section of the tutorial is specfically for Guiguts 2. For the Guiguts 1 tutorial, see the Guiguts 1 manual.
Before proceeding with the Plain Text version, convert all of the formatting tags using Text->Convert Markup.... Make sure the columns are properly aligned and manually adjust them if necessary. The result should look like this:
/* +------------------+---------+--------+-------+--------+---------+ | |Length of|Depth of| Rake |Rake aft|Weight of| | | Keel | hold |Forward| |masts and| | | | | | | yards | | +---------+--------+-------+--------+---------+ | | feet | feet | feet | feet |ton. cwt.| |_Elizabeth_ | 100 | 18 | 36 | 6 | 22.8 | |_Waite Bear_ | 110 | 18 | 36 | 6.6 | 24 | |_Merhonour_ | 110 | 17 | 37 | 6.6 | 22.13 | |_Ark Royal_ | 100 | 15 | 33.6 | 6 | 18.4 | |_Victory_ | 95 | 17 | 32 | 5.10 | 18.4 | |_Repulse_ | 105 | 16 | -- | -- | 20.7 | |_Lion_ | 100 | 14 | 31.6 | 5.10½ | 14.14 | |_Nonpareil_ | 85 | 15 | 29 | 5 | 11.7 | |_Defiance_ | 92 | 15 | 31 | 5.6 | 14.9 | |_Sonne_ | 50 | 6 | 11 | 2.2 | 1.2 | +------------------+---------+--------+-------+--------+---------+ */
The table is now correctly aligned, but it might look better if the column headers had some space on each side of them, and the first column, with the ship names, had fewer spaces. The rest of this tutorial is about making that easy using the ASCII Table Effects tool.
First, delete the border line below the heading. Using the ASCII Table Effects tool, highlight the table rows except for the top and bottom borders. Use the "Space Out Table" button to space out the table so that lines won't rewrap when they shouldn't, then delete the empty lines in the heading so the heading cells can rewrap if necessary.
>>>Replace screenshot -- Merkonour should be Merhonour<<<
The four numeric columns will all be treated the same, so, click somewhere in the table and then click "Select Next (or) Prev Line" until the next-to-last column is selected (the one for "Rake aft"). We start with this column because there's a wide variety of different data widths in the column so that if you want to see what happens with various justification settings, it's more obvious. Set Justify to Center and make sure "Rewrap Cols" is checked. Click Move Right twice and notice that the numbers in that column are no longer correctly aligned. Now undo twice to get back to where you started, and do the same with Right Justify selected. Again, the alignment in that column is no longer correct. Undo twice, again, to get back to where you started.
Since all the data in the table are correctly aligned, we want to preserve the relative alignment, while making the columns slightly wider. To do that, click "Fill with" and all of the leading and trailing space characters in any rows with data will be replaced by the @ sign (you can choose a different fill character, but it should be one that is not elsewhere in the table). The rows that are empty except for vertical bars will stay empty.
With "Rewrap Cols" selected, "Justify" set to Center and "Hanging" disabled, click Move Right twice and you will see that the alignment is preserved. Now, click "Restore Spaces" to remove them, and you'll see that the alignment is preserved. Repeat these steps for each of the other four numeric columns:
- Select the vertical line at the right edge of the column
- click Fill with,
- Restore.
Now that all five numeric columns are wider, and the numbers within each numerical column remain aligned, let's finish off by using Select Prev. or Next line to the column of vertical bars to the right of the first column, setting Justify to "Left" and using "Move Left" to take some extra space out of the first column. Once you're happy with the spacing, click on "Compress Table" to take the empty rows out. You can then click on "Table Deselect" and finish the rest manually:
- Fix the top and bottom border rows.
- Copy one of them and insert it between the headings and the row with the unit labels, and
- Replace the hyphens in the first column above the ship names with spaces.
The final version of the table should look something like this:
/* +-------------+-----------+----------+---------+----------+-----------+ | | Length of | Depth of | Rake | Rake aft | Weight of | | | Keel | hold | Forward | | masts and | | | | | | | yards | | +-----------+----------+---------+----------+-----------+ | | feet | feet | feet | feet | ton. cwt. | |_Elizabeth_ | 100 | 18 | 36 | 6 | 22.8 | |_Waite Bear_ | 110 | 18 | 36 | 6.6 | 24 | |_Merhonour_ | 110 | 17 | 37 | 6.6 | 22.13 | |_Ark Royal_ | 100 | 15 | 33.6 | 6 | 18.4 | |_Victory_ | 95 | 17 | 32 | 5.10 | 18.4 | |_Repulse_ | 105 | 16 | -- | -- | 20.7 | |_Lion_ | 100 | 14 | 31.6 | 5.10½ | 14.14 | |_Nonpareil_ | 85 | 15 | 29 | 5 | 11.7 | |_Defiance_ | 92 | 15 | 31 | 5.6 | 14.9 | |_Sonne_ | 50 | 6 | 11 | 2.2 | 1.2 | +-------------+-----------+----------+---------+----------+-----------+ */
Changing the column widths can be done in either order, but make sure that you use the correct justification for the column you're adjusting.
HTML Numeric Alignment
HTML and CSS have no currently approved concept of decimal or numeric alignment. Numbers can be right-aligned if all of their decimal or fractional components are of uniform width, but not otherwise. If they're right-aligned, they 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 -- correct link once moved into place 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): (retain these screenshots for now and decide what to do later, if anything)
There is no guaranteed way to do decimal (visible or invisible) alignment in HTML short of separating the parts into different cells and right-aligning the part to the left of the decimal point and left-aligning the part to the right of the decimal point. The following workaround will work if the font in use makes all numbers twice the width of a space,and periods, commas and non-breaking spaces are all the same width of a space. We can then use that to maintain numeric/decimal alignment when using "text-align: center;".
Starting with the same simplified table as before:
Before using AutoGenerate, remove the horizontal borders; 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 or — or – convert them FROM entities (HTML menu), to obtain:
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:
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:
Deselect the table, leaving the column dividers, blank lines, and the @ signs in place, and close
the Table Effect Dialog.
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:
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):
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:
which is very much like the image in the original book.
Tutorial: Grid Versus Step Format
The example show in the "table with long text passages" tutorial 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. The "Step" format is another way to do that. This tutorial re-uses the Table with Multi-line Cells source to demonstrate what a table in step format might look like.
Copy the text from the tutorial source 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.
Tutorial Sources
The following are text-based sources for the above tutorials.
Basic Table
This is a basic table, but was split between two different pages, so the alignment, when combined, is not consistet. Also an exercise in some numerical alignment.
/*
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.
*/
Table with Multi-line Cells
This table is used for a couple of the tutorials. Both dealing with multi-line cells and a demonstration of what a stepped table looks like.
/*
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. | | | |
*/
Aligning numbers with and without decimals
More in-depth description on how to deal with aligning different formats of numbers in table columns. This is both for the text version, and for setting up for HTML, as HTML doesn't have a built-in way of aligning numbers on a decimal point or other character.
/* +------------------+---------+--------+-------+--------+---------+ | |Length of|Depth of| Rake |Rake aft|Weight of| | | Keel | hold |Forward| |masts and| | | | | | | yards | | +---------+--------+-------+--------+---------+ | | feet | feet | feet | feet |ton. cwt.| |<i>Elizabeth</i> | 100 | 18 | 36 | 6 | 22.8 | |<i>Waite Bear</i> | 110 | 18 | 36 | 6.6 | 24 | |<i>Merhonour</i> | 110 | 17 | 37 | 6.6 | 22.13 | |<i>Ark Royal</i> | 100 | 15 | 33.6 | 6 | 18.4 | |<i>Victory</i> | 95 | 17 | 32 | 5.10 | 18.4 | |<i>Repulse</i> | 105 | 16 | -- | -- | 20.7 | |<i>Lion</i> | 100 | 14 | 31.6 | 5.10½ | 14.14 | |<i>Nonpareil</i> | 85 | 15 | 29 | 5 | 11.7 | |<i>Defiance</i> | 92 | 15 | 31 | 5.6 | 14.9 | |<i>Sonne</i> | 50 | 6 | 11 | 2.2 | 1.2 | +------------------+---------+--------+-------+--------+---------+ */











