|
|
|
Here we give three examples on how to tabulate
listing. Before we begin, keep in mind that the complexity of tabulation
extends far beyond the scope of TextMaestro. However, the following examples
will convince you that TextMaestro can be a convenient tool when it comes
to tabulating text.
Example 14.a: Align
and Number a listing
Example 14.b: Make
2-column table
Example 14.c: Make
multi-column table
Example
14.a: Align and Number a listing: Top
Suppose here is the input text:
|
Input text: |
|
ae_comp.cpp, ae_comp.h, ae_sym.cpp, ae_sym.h,
annot.cpp, annot.h, build_info.h, bundle.cpp, bundle.h, bundle_ctrl.cpp,
bundle_ctrl.h, bundle_info.cpp, bundle_info.h, char.cpp, check.cpp, check.h,
component.h, const_style.h, data_alloc.cpp, data_alloc.h, data_alloc2.cpp,
debug_ix.cpp, debug_ix.h, dhash_input.cpp, dhash_input.h, diagnostic.cpp,
diagnostic.h, directive.cpp, directive.h, dirs_builder.cpp, dirs_builder.h,
dirs_hash.h, dirs_hash_size.h, dirs_hash_tbl.cpp, dirs_info.cpp, dirs_info.h,
dirs_info_entry.h, dirs_parse.cpp, dirs_parse.h, dyn_hash.cpp, dyn_hash.h,
emdb_info.cpp, emdb_info.h, enc_mac.h, encode.h, encode1.cpp, encode2.cpp,
encode3.cpp, endianess.h, exception.h, file.cpp, file.h, general.h, glob_diagnostic.cpp,
glob_diagnostic.h, hash.h, hazlib_ix.cpp, hazlib_ix.h, ias_external.h,
ident_hash.cpp, ident_hash.h, identifier.h, iel_env.h, ilp_model.h, input.cpp,
input.h, inst.cpp, inst.h, inst_alias.cpp, inst_alias.h, inst_dir_parse.h,
inst_parse.cpp, inst_parse.h, keywords.cpp, keywords.h, label.cpp, label.h,
lex.h, lex_conv.cpp, lex_conv.h, lex_sm.cpp, lex_sm.h, lex_token.cpp,
lex_token.h, list_chunks.h, low_lex.cpp, low_lex.h, lrst.cpp, lrst.h,
main.cpp, mem_alloc.cpp, mem_alloc.h, mnem_hash.h, mnem_hash_tbl.cpp,
mnemonics.h, mofl_err.cpp, mofl_err.h, msg_buf.cpp, msg_buf.h, msg_info.h |
Open TextMaestro, and click on Text Conversion tool
as shown below:

|
|
This will open Attributes
window and Interactive
Window side by side. Enter the following information in those boxes:
|

|
|
Find: |
, |
|
Replace: |
<line-brk> |
I.e., replace ", " by a line-break
to make a listing from above wrapped text.
|
|

Click on Convert
button to obtain the following:

Transfer text from Output
window to Input
window by clicking on Transfer
text button.
Place Find,
Replace and Input text as shown
below.
|

|
Here we will execute this macro on the current input
text:
|
Find: |
|
* |
|
Replace: |
|
<i=1>.<A=5> * <a=35?.>10 |
where wild-card is turned on (see left).
See conversion rules, especially conversion qualifiers
for details.
Hit Convert
button. |

Example
14.b: Make 2-column table Top
Consider this input text:
|
Input text: |
|
SuperFiles.com
www.superfiles.com/
Jumbo!
www.jumbo.com/
Freeware Home
www.freewarehome.com/
Free Downloads Center
www.freedownloadscenter.com
Freeware Files.com
www.freewarefiles.com/
ZDNet Downloads
www.zdnet.com/downloads
Nonags
www.nonags.com/
FreewareWeb
www.freewareweb.com/
Only Freeware
www.freeware.intrastar.net/
System Internals
www.sysinternals.com/
Freeware Arena
http://freewarearena.org/
Freeware Guide
http://www.freeware-guide.com/
Freeware World Team
http://www.all4you.dk/FreewareWorld/
Only Freeware
http://freeware.intrastar.net/
Program Files
http://www.programfiles.com/
Simtel
http://simtel.com/
SoftPicks
http://www.softpicks.net/
SuperFiles
http://www.superfiles.com/
FreewareFind
http://www.freewarefind.com/
SnapFiles
http://www.snapfiles.com/
CNET Download
www.download.com/
Tucows
www.tucows.com/ |
|
We would like to make a table from this listing
so that each odd line is placed at first column and even line at second
column, and hopefully in a sorted and numbered fashion.
Here is the Attribute
window:

Place this macro on Find
and Replace area:
|
Find: |
*
* |
|
Replace: |
<*1>|<*2> |
Place the listing onto Input
window.
Hit Convert button. |
See conversion
rules, especially wild card usage for details. In summary, a stand-alone
wild-card denotes each line (excluding line-break). Thus, this macro grabs
two lines at a time and places them side by side, separating them by "|".

Now transfer text from Output
window to Input
window by clicking on Transfer
text button. To sort the text seen on Input window,
right click on it and follow the steps shown below:

This will sort the input text and the result is shown
above.

Transfer text from Output
window to Input
window one more time by clicking on Transfer
text button, and use following macro in Find and Replace
boxes.
|
Find: |
|
*|* |
|
Replace: |
|
<i=1>.<A=5> <*1> <a=35><*2> |
Hit Convert button. Here is the output:


Now you have sorted and numbered tabulated listing
of the free-ware web-sites where we submitted TextMaestro for patient
users like you.
Example
14.c: Make multi-column table Top
In Example 14.b (above), we made two columns. Below
we'll make a four column table, where each item is listed side by side.
Here is the macro:
|
Find: |
|
*
*
*
* |
|
Replace: |
|
<i=1?4>.<A=5> * <i=2?4>.<A=30>
* <i=3?4>.<A=55> * <i=4?4>.<A=80> * |
Here is input text: (Most of the middle items removed
to fit in view).
|
Input text: |
|
ae_comp.cpp
ae_comp.h
ae_sym.cpp
ae_sym.h
annot.cpp
annot.h
build_info.h
bundle.cpp,
... ... ...
... ... ...
lrst.h
main.cpp
mem_alloc.cpp
mem_alloc.h
mnem_hash.h,
mnem_hash_tbl.cpp
mnemonics.h
mofl_err.cpp
mofl_err.h
msg_buf.cpp
msg_buf.h,
msg_info.h |
Here is output text: (Fonts decreased to fit in view).
|
Output text: |
|
1.
ae_comp.cpp 2.
ae_comp.h 3.
ae_sym.cpp 4.
ae_sym.h
5.
annot.cpp 6.
annot.h 7.
build_info.h 8.
bundle.cpp,
9.
bundle.h 10.
bundle_ctrl.cpp 11.
bundle_ctrl.h 12.
bundle_info.cpp
13.
bundle_info.h 14.
char.cpp, 15.
check.cpp 16.
check.h
17.
component.h 18.
const_style.h 19.
data_alloc.cpp 20.
data_alloc.h
21.
data_alloc2.cpp, 22.
debug_ix.cpp 23.
debug_ix.h 24.
dhash_input.cpp
25.
dhash_input.h 26.
diagnostic.cpp 27.
diagnostic.h, 28.
directive.cpp
29.
directive.h 30.
dirs_builder.cpp 31.
dirs_builder.h 32.
dirs_hash.h
33.
dirs_hash_size.h, 34.
dirs_hash_tbl.cpp 35.
dirs_info.cpp 36.
dirs_info.h
37.
dirs_info_entry.h 38.
dirs_parse.cpp, 39.
dirs_parse.h 40.
dyn_hash.cpp
41.
dyn_hash.h 42.
emdb_info.cpp 43.
emdb_info.h 44.
enc_mac.h
45.
encode.h, 46.
encode1.cpp 47.
encode2.cpp 48.
encode3.cpp
49.
endianess.h 50.
exception.h 51.
file.cpp 52.
file.h,
53.
general.h 54.
glob_diagnostic.cpp 55.
glob_diagnostic.h 56.
hash.h
57.
hazlib_ix.cpp 58.
hazlib_ix.h, 59.
ias_external.h 60.
ident_hash.cpp
61.
ident_hash.h 62.
identifier.h 63.
iel_env.h 64.
ilp_model.h,
65.
input.cpp 66.
input.h 67.
inst.cpp 68.
inst.h
69.
inst_alias.cpp 70.
inst_alias.h 71.
inst_dir_parse.h, 72.
inst_parse.cpp
73.
inst_parse.h 74.
keywords.cpp 75.
keywords.h 76.
label.cpp
77.
label.h 78.
lex.h, 79.
lex_conv.cpp 80.
lex_conv.h
81.
lex_sm.cpp 82.
lex_sm.h 83.
lex_token.cpp 84.
lex_token.h
85.
list_chunks.h, 86.
low_lex.cpp 87.
low_lex.h 88.
lrst.cpp
89.
lrst.h 90.
main.cpp 91.
mem_alloc.cpp 92.
mem_alloc.h
93.
mnem_hash.h, 94.
mnem_hash_tbl.cpp 95.
mnemonics.h 96.
mofl_err.cpp
97.
mofl_err.h 98.
msg_buf.cpp 99.
msg_buf.h, 100.
msg_info.h |
Here is the view:
 

Top |