TIPS FOR TEXT FILE PRESENTATION
For use by USGenWeb State File Managers
One of the responsibilities of a USGenWeb State File Manager is to ensure the readability of the files in their Archive. Since most files are in text format, this page is to give general tips and explore various methods for giving text files a pleasing appearance.
There are really only three things you have to think about to ensure readability:
HOW WIDE IS YOUR TEXT?
The width of most screens is 80 characters. In most cases, you should endeavor to keep it at this length to avoid forcing the reader to scroll right on every line. In some cases where a wide table format with multiple columns is used, for example, the census, it is impossible to keep it to this width. In those cases, it would probably be worse to break it up.
Keeping your file to 80 characters is very simple. Simply put a hard return at the end of every line on you screen. Some programs will automatically convert if a "save as text with line breaks" option is given.
DO YOUR COLUMNS LINE UP?
This is the hard part. Text format does not recognize tabs, tables, or other methods of easily formating columns. The only thing it does recognize is spaces. How to get these spaces in is the question! You could, of course, do it the old-fashioned, hard way of manually typing in all these spaces, but if you actually have a life and would like to have the time to live it, there are several other methods available to take care of those pesky spaces! These are presented below based on the software you have available. Click on the appropriate one and you will get a detailed explanation.
IS YOUR FILE DOUBLE SPACED?
You don't want it to be. Much harder to read. If it is double spaced, it is usually because you transfered it as a binary file instead of as a text or ascii file. This is a common mistake but easily remedied. Just retransfer the file as an ascii file.
Using any word processor and MS Access
(contributed by Maureen Reed)
- 1. In your word processor, remove all but the text that is in columns. (Save all header & footer info in a separate file to be added back in after you have lined up the columns.)
- 2. If in table format, convert it to text format.
- 3. Use the global replace function to change all tabs or large chunks of space (whatever was previously used to line up the columns). Replace them with a unique character such as * or %.
- 4. Make sure there are hard returns at the end of each line.
- 5. Make sure you have no blank spots. This will confuse Access & it will reject the file. Replace blank spots with dashes or n/a or something similar. You can always replace them back to blanks after Access lines the columns up.
- 6. When importing, Access will use the first line to determine if that field is a text field or a numerical field. In other words, if a field in the first row contains numbers, Access will expect every entry in that column to be a number. If it is not, it will give you errors and reject those lines. I always recommend you make sure the first row is all text, even if you have to make up a "dummy" row.
- 7. Now your word processor file is ready to be imported into Access.
- Start Access.
- Select or create a database.
- Click IMPORT.
- Data Source: Text(delimited).
- Select your text file. Click IMPORT.
- Click OPTIONS. Specify your delimiter as "none" and your field separator as that unique character you put in place of the tabs. Save it. Click OK.
- Access will import the file & tell you how many records there are and how many errors there were. If there are errors, check those lines for all the things you were supposed to do in the word processor. Chances are there is a blank space somewhere or text where a number should be.
- If all is well, click EXPORT.
- Data Destination: Text(Fixed Width)
- Select your table.
- Select your file name (I always use the same .txt name)
- Click EDIT SPECS.
- Click "Fill Specification Grid from Table" and choose your table. Adjust the Start and Width numbers so the columns will be the sizes you want them to be. Access will fill it up with spaces to make all your columns magically line up.
- Save it. Click OK.
- Make sure the Specification Name you just saved is showing in the box and click OK.
- Exit Access.
- 8. Back in the word processor, add the header and footer information back into the text file. In some word processors, the text file will still not appear to lined up. This is because of the font. If this is the case, start up your browser without going on line, open the text file and check to make sure everything looks good. (Note: you generally cannot have the same file open in two places at once so you will have to close it in the word processor first.) Alternatively, you can adjust your font to a fixed pitch font such as courier.
Using MS Excel
(contributed by Joy Fisher)
- A. Creating a table from scratch
- 1. Use a blank spreadsheet to enter your data. Put a header at the top of
each column that you are going to use. I have found that it is easier to
read (and create a search engine for the data) if you put the last name in
one column and the first name(s) and titles (such as Mrs., Dr. or Jr.) in a
second column. Use additional columns as needed depending upon the type of
records you are transcribing. Choose a fixed pitch font, such as "courier"
for the spreadsheet.
- 2. Don't worry about keeping the names in alphabetical order, Excel will
alphabetize for you when you are done.
- 3. When you have entered all of your data, adjust the width of your columns
so that your data does not get cut off. Use the "Data - Sort" option to
alphabetize your list. Be sure to check the "Header Row" radio button.
- 4. Save your file as an Excel file (in case you need to make modifications
later - saves having to import the text file).
- 5. Now choose "File --- Save as..." from the menu bar. At the bottom of the
dialog box that pops up is a pulldown menu called "Save as type:" Click on
the little arrow and choose the option "Formatted text (Space delimited)"
and save the file. This is your web-ready file!! Use WordPad to look at it
and make sure your data looks good. If it looks good in WordPad, it will
look good on the web.
- B. Converting a table sent by a volunteer -- works for either text files or
data base files (does *NOT* work on MS Works files - ask your volunteer to
open Works and then "Save As..." an Excel file!!)
- 1. Start up Excel and use "File - Open" to open the donated file.
- 2. Unless the file is in a strange format, a dialog box opens up with the
data. There are two or three steps to importing the data into Excel. It
usually takes me 30 seconds to import a file, adjust the column widths,
alphabetize, and export as a space delimited text file.
- 3.The first step is to choose what line to begin the import with. If there
is a descriptive paragraph at the beginning of the file, I usually skip down
to the first line of the table. Then hit the "Next" button.
- 4. The next step is to choose whether the file uses tabs, commas or some
other character as a delimiter. Usually Excel makes a pretty good guess as
to where the columns should go. You can add or delete column lines by
clicking on them. Them hit the "Next" button.
- 5. Lastly, watch any column that has dates in it. Excel tries very hard to
screw them up, especially dates around 1900-1910 -- it makes them 2000!! In
this step, change the attribute on any column that has dates in it from
"General" to "Text" and Excel will not touch the dates. Hit the "finish"
button and the text file should be imported into Excel. Now you can go to
Step 3 in Part A above and finish up.
Converting Tables to Text
(contributed by Joy Fisher)
1. Position cursor somewhere in table.
2. Click on "Table" on the Menu Bar -- then click on "Select table"
3. Copy the table to the clipboard - "ctrl-c" or "copy" icon on tool bar
4. Open a new document and paste the table in it.
5. Save table under a new name. {Steps 1-5 not absolutely necessary, I don't want to screw up my only copy of a file!!}
6. Do a "File" "Save AS..." -- and choose "HTML" as the file type. You don't really want html, but it will preserve the table format.
7. Open Excel and then open your html file in excel.
8. Globally change the table to "Courier New" font and choose 10 pt as the font size.
9. Adjust the column widths so there are no hidden charcters.
10. Modify the justification on the columns so that the text won't run together from one column to the next.
11. Do a "File" "Save As..." and choose Space delimited text as the file type.
12. Start up Word and load your *.prn file in it. Don't get upset about the word wrap -- and don't try to change it. Notice the double spacing between rows -- that is what we are going to fix.
13. Use the "Replace" command in "Edit" on your Menu Bar. In the "Find" box put "^p^p" (without the quotes) and in the "Replace with" box put "^p" Click "replace and notice that the first double spaced line becomes single spaced. Now click on "Replace All".
14. Save your file. Don't change the name or file type.
Archive Tips for Fortunate Mac Users
(contributed by Joe Patterson)
Tips for MAC users preparing files (or trying to) for upload to the
USGenWeb Archives.
First, a list of programs and utilities which I found to be most helpful
in deciphering files.
- Most MACS come with a software bundle which includes "Document
Converter". I have Version 1.1 © Apple Computer, 1994.
- This utility is useful in converting the varied programs to a text
file suitable for uploading.
- It is essential for converting spreadsheet and data base files to
text for further editing.
- Most MACS also come with a DataViz© translator set. I have
version 8.1, but there is a newer version out 9.0, I believe.
MOST files can be converted to your WP program through this program,
using "Document Converter".
- Double clicking on the "Document Converter" icon will allow you to
translate a file to a WP or SS or DB format you use.
- General text editor. Tex-Edit Plus© This is a shareware program
available through ZDnet at http://www5.zdnet.com/mac/download.html
Search for Tex-Edit. The current version is 2.0.4 but requires
System 7 or later. An earlier version, Tex-Edit © is available for
System 6 users. This shareware utility is $10 and worth several
times that. A *MUST* for handling the variety of files received
for the archives.
- The biggest plus for this utility is that it handles documents of
ANY size.
- Another is that most WP files can be opened and read directly,
without going through the "Document Converter" steps listed above.
- Some secrets about Tex-Edit Plus ©.
- It can size your document to widths, 60, 80, 100, or wide open.
I use 80 normally for text documents, and "wide open" for SS
and DB. This keeps the files so you don't have to scroll right.
This is done with the "Quick Modify" option in the SPECIAL pull
down menu.
- There is a pull down screen in the lower left hand corner which
shows you the entire range of ASCII characters and lets you
insert them in a file. This set includes specially marked
letters such as umlauts, gravé markings and many other special
characters. You have to check these with a browser as UNIX does
not always read them the same way. A little experimenting will
solve this challange.
- There is also a great "find and replace" option (also in the
SPECIAL MENU) that allows you to make global changes. e.g.,
You can double- space a document by replacing all Carriage
Returns (CR) with two (CR). Great for making a list of names
more readable. If you know of other neat ideas, let me know
so they can be shared.
- There are now case changing options in version 2.0.4
- I use 9 point Monaco, a fixed-width font so the version on my
hard drive is similar to that which appears on the web. This
font is selectable in the SPECIAL menu under BLOCK OPTIONS |
DOCUMENT OPTIONS | Default text font and Default text size.
Using these defaults will also save received documents to your
hard drive in that font size, so you don't have to convert
anything!
- I also set up thebrowser OPTIONS | GENERAL PREFERENCES | HELPERS
text sources such as MS Word, WP, and others are saved into
Tex-Edit Plus® so I don't have to convert them later. A great
time saver.
- In the new 2.0.4 version of Tex-Edit Plus there is an option
under STYLE pull down menu at the bottom. SHOW INVISIBLES.
This option shows all those characters in a document that are
hidden by Tex-Edit or normal word processor programs. Why check
on this? First you can see a lot of extra items inserted in the
file. Unnecessary spaces or tabs, or other wierd characters.
One example, in a spreadsheet cemetery list I did (for Pam!)
the file was over 60K long. I looked at it with this feature
on and saw a LOT of unneeded TABS. These were removed with the
global replace feature (replaced with nothing). The file was now
27K long. Time to do this was about two minutes!
- Choice of Browser. Netscape Navigator (I don't know about the new
Netscape Communicator) is strongly recommended. There is one
feature in NN that IE and possibly other browsers don't have.
This is the ability to drag and drop your finished .txt file to
the browser and VIEW AS SOURCE. If there are any problems with
your text conversions or wierd characters, they will show up here.
You can check for SMART QUOTES and SMART APOSTROPHIES which
unix does not like. PS. You can also get rid of them easily in
Tex-Edit Plus with a simple global FIND and REPLACE.
If you need a bit more help, email the state file manager.
All of this is done with Tex-Edit Plus with whom I have no affiliation,
but have a lot of satisfaction in using. Written by Joe Patterson