summaryrefslogtreecommitdiff
path: root/support/tab4tex/README
blob: 7ea2a4a9305f8914167688ed2a4a0eade2a23164 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
TEX4TAB
Version 0.1
08.03.2007 (08.mar.2007)

Transforms a text file with very simple tagging into a LaTeX table.
Input file must separate cells with tabs

Contents of this package:
source      Snobol source files, bash scripts and bat files for Windows, test files
bin/windows Executable files for Windows, with test files in Dos-Windows format
doc         Documentation files in LaTeX and PDF formats.
	    
To install and use this package, please read the documentation file.

Simple formatting aid:
*cell*	produces \texmf{cell}
!cell!	produces \emph{cell}
^cell^	produces \textsc{cell}

Multicolumns support
Starting a cell with a tag as "<M2>" --> produces multicolumns{2}

Empty cells
Use <E> and separate with a tab as with normal cells. The LaTex output will be
an empty cell. Do not use blanks or double tabs: the results will be a wrong
LaTeX code.

EXAMPLE
snobol4 -b tab4tex.sno r=7 a=c b=y h=y c=y <tab.txt >tab.tex
or, if compiled (Dos-Windows):
tab4tex r=7 a=c b=y h=y c=y <tab.txt >tab.tex
a	align (center,left,right)
b	vertical bar (y/n)
c	complete LaTeX document (y/n)
h	hline (y/n)
r	rows

EXAMPLE OF INPUT FILE
See files test1.txt and test2.txt
*	test1 is very simple. The output file is obtained running
	snobol4 -b tab44tex.sno r=5 a=c b=y h=y c=y <test1.txt>test1.tex
*	test2 is taken from an example found at:
	http://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Tables.html
	--> To read this file with a text editor set your tabs at 12 <--
	Please notice that some additional features, as double separation lines
	between cols, can be easily added in the final LaTeX file.
	The output file is obtained running
	snobol4 -b tab44tex.sno r=5 a=l b=y h=y c=y <test2.txt>test2.tex
	Notice a=l in this example (alignment = left)


EXAMPLE OF OUTPUT FILE
See files test1.tex and test2.tex

HOW TO GET SNOBOL
This program is written in Snobol4, a language very poweful for pattern matching
and text processing.

Windows-Dos:
For Windows-Dos a compiled version is provided so you do not need the interpreter.
The program needs at least a 386 and Windows 95 or more.
If you are interested, or if you run the program with an older system,
you can get a freeware version of the Snobol4 interpreter from Catspaw, inc.,
at <http://www.snobol4.com>
The EXE file provided here is compiled with Spitbol and should run faster than
the interpreted file with Snobol4. Spitbol is a professional version of Snobol4
and is sold by Catspaw (it is not freeware).

Linux and Unix(es)
A freeware version of Snobol4 (due to Phil Budne) can be downloaded from
<http://www.snobol4.org>
Compilation is easy. For any problem, Phil is extremely helpful.
The interpreter is necessary to run the program under Unix(es).

Mac
Not tested. There is a Mac version of Snobol (see Catspaw) but with OSX Phil's
Snobol4 may be compiled, I believe.

TODO
* Escape sequences for '<E>' and for chars used to format text
* Better support for multicolumns
* Use of tabularx and longtable
* Some more formatting aids.

BUGS
None known.

LICENCE
Copyright (C) 2007 Guido Milanese guido.milanese@unicatt.it
under the terms of the GNU General Public License

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.

If you do not have a copy of the GNU General Public License write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

If the author of this software was too lazy to include the full GPL text along
with the code, you can find it at: http://www.gnu.org/copyleft/gpl.html