[TriLUG] LaTeX tables - ascii input?
Ed Hill
ed at eh3.com
Tue Feb 10 09:27:16 EST 2004
On Tue, 2004-02-10 at 08:51, Douglas Kojetin wrote:
> Hi All-
>
> Sorry if this is a basic LaTeX question, but I left my 'LaTeX for
> Beginners' book @ home (and I'm @ school).
>
> Is there a way to take some sort of delimited text file and 'import' or
> 'source' (similar, but not, to the 'include' function) it in my LaTeX
> file? For instance, say I have a file with the following data:
>
> # file = table.ascii
> 1,2,3,4,5
> 2,4,6,8,10
> 3,6,9,12,15
> .....
>
> and I want to make table of this data (say, in total, 100 rows long ...
> just to bring home the point I do not want to add this info directly to
> the LaTeX file itself).
>
> How might I do that?
Hi Doug,
TMTOWTDI!
Oh, wait, this is LaTeX, not PERL... ;-)
But seriously, there are multiple ways to do tables:
1) in a separate file, format the table using TeX and then
just \input{} it
2) create the table using some completely different tool
(OpenOffice?) and then include it as an Encapsulated
PostScript figure:
At the very start (just after \documentclass[...]{...}):
\usepackage[dvips]{epsfig}
\def\scalefig#1{\epsfxsize #1\textwidth}
and then to insert the figure:
\begin{figure}
\centerline{
\scalefig{.95}
\epsfbox{path/to/some/file.eps}
}
\caption{Schematic of ...}
\label{FIG:eg-baro-simulation_config}
\end{figure}
3) same as #2 but use a completely *separate* LaTeX document to
produce the table on a very large paper size and then take
advantage of the vector nature of the PS/EPS to scale it to
fit nicely on your 8.5x11 paper (small font but still looks
fairly good *and* fits)
hth,
Ed
--
Edward H. Hill III, PhD
office: MIT Dept. of EAPS; Room 54-1424; 77 Massachusetts Ave.
Cambridge, MA 02139-4307
email: eh3 at mit.edu, ed at eh3.com
URL: http://web.mit.edu/eh3/
phone: 617-253-0098
fax: 617-253-4464
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20040210/51c66e75/attachment.pgp>
More information about the TriLUG
mailing list