summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/crossword/AcrossLite/README
blob: 8555f2a213a5d8b19abaaaeb5997521c95e515d7 (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Here are three programs and a script for use with Gerd
Neugebauer's excellent cwpuzzle.sty package for typesetting
crossword puzzles in LaTeX.

The purpose of the programs is to convert the popular 
Across Lite(R) puzzle formats, both binary and text, to 
LaTeX input suitable for use with Gerd's package.

Build the programs like this:

gcc -o nytconv nytconv.c
gcc -o nytsconv nytsconv.c
gcc -o usaconv usaconv.c

1. nytconv

This program converts Across Lite(R) binary puzzle files:

nytconv puzzlefile.puz >puzzlefile.tex

where of course 'puzzlefile' is the name of the binary
input file.  The program is best suited to puzzles up to
size 15x15, which is the standard daily puzzle size for 
the New York Times.  NYT puzzles are distributed from their
web site in Across Lite binary format.  The web site is
http://www.nytimes.com  but registration (currently free)
is needed to access the contents of the site.

2. nytsconv

This program is very similar to the previous one except
it's for the larger Sunday puzzles, up to about 23x23.

nytsconv puzzlefile.puz >puzzlefile.tex

3. usaconv

This program converts Across Lite(R) text files.  Puzzles
such as the USA Today daily puzzle and the Times of London
daily puzzle are converted to LaTeX input via a two step
process.  You should go to the Across Lite web site,
http://www.litsoft.com to pick up a USA Today conversion
program and a Times of London conversion program.  You can
then pick up the puzzles (http://www.usatoday.com, or
http://www.the-times.co.uk), convert to Across Lite text form, 
and then convert to LaTeX.

usaconv puzzlefile.txt >puzzlefile.tex

Well, you might say, what's the point?  There are several.
I don't want to solve crosswords on screen; I want printed
copy to work with.  So, why not just print from the Across
Lite program?  Because (1) I'm a LaTeX fanatic, and more
importantly (2) I use an automated procedure to download
the NYT and USA puzzles every morning, format them, and
ready them for printing whenever I want a fresh puzzle!
The only work I have to do is to actually solve the
puzzle.  (I don't have the skill needed to solve difficult
cryptics such as the Times of London puzzles so I don't 
download them regularly.)

Another important point is generating your own crosswords
with computerized tools.  Tools such as Crossword Express
(http://www.puzzledepot.com/cwe) help you to produce
crosswords quickly and effectively.  One of the output
format is Across Lite binary.  This can then be converted
(with the nyt- or nyts- conversion program, depending on
puzzle size) and dropped into a LaTeX document.  This is
nice for newsletters, educational material, etc.

There is still another possibility using postscript tools
usually found on Unix systems.  You might collect, say,
100 puzzles, convert them all to LaTeX input, and process
them.  Then you can use tools such as psbook to make books
of puzzles to take along on boring business trips or 
interesting vacation trips.

For those of you with an interest, here is my automated
Perl script for downloading and formatting puzzles.  It
requires the program 'wget' which can be found at
ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/
(This site is sometimes hard to reach.  Keep trying.  Or
contact me for alternatives.)

Now, the script, which will require local site modification:
---------------
#!/usr/bin/perl

chdir("/usr/games/crossword");
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);

# NY Times

	$mpart = (Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec)[$mon];
	if ($mday lt 10){$puzzle = $mpart."0".$mday.$year;}
	else {$puzzle = $mpart.$mday.$year;}
	system("/usr/bin/wget --http-user=myname --http-passwd=secret http://www.nytimes.com/partners/xword/$puzzle.puz");
	if ($wday ne 0) {system("./nytconv $puzzle.puz >$puzzle.tex");}
	else            {system("./nytsconv $puzzle.puz >$puzzle.tex");}         
	system("/usr/bin/latex $puzzle");
	if ($wday ne 0) {system("/usr/bin/dvips  -x 1400 $puzzle");}
        else            {system("/usr/bin/dvips  -x 1100 $puzzle");}
	system("/usr/bin/psnup  -l -2 -pletter $puzzle.ps $puzzle.wps");
	system("echo \"quit\" >>$puzzle.wps");
	system("/usr/bin/gs -q -sDEVICE=laserjet -r300 -dQUIET -dNOPAUSE  -sOutputFile=$puzzle.lj $puzzle.wps ");
        system("gzip -9 -f $puzzle.lj");
	system("/bin/rm *dvi *ps *log *aux *tex");

# USA Today

if ($wday ne 6 && $wday ne 0) {   # no weekend puzzles 
    $month = $mon + 1;
    if ($month lt 10) {$directory  = $year."0".$month;}
    else {$directory = $year.$month;}
    if ($mday lt 10){$puzzle = "ut".$directory."0".$mday;}
    else {$puzzle = "ut".$directory.$mday;}
    system("/usr/bin/wget http://www.usatoday.com/life/puzzles/$directory/$puzzle.puz");
        system("./usa-acl $puzzle.puz $puzzle.txt");     
	system("./usaconv $puzzle.txt >$puzzle.tex");
	system("/usr/bin/latex $puzzle");
	system("/usr/bin/dvips  -x 1400 $puzzle");
	system("/usr/bin/psnup  -l -2 -pletter $puzzle.ps $puzzle.wps");
	system("echo \"quit\" >>$puzzle.wps");
	system("/usr/bin/gs -q -sDEVICE=laserjet -r300 -dQUIET -dNOPAUSE  -sOutputFile=$puzzle.lj $puzzle.wps ");
	system("gzip -9 -f $puzzle.lj");
	system("/bin/rm *dvi *ps *log *aux *tex *txt");
}

exit;
--------------

For any questions, bug reports, or especially improvements, please
contact me:

bnewell@btigate.com
http://www.btigate.com/~bnewell


Bob Newell
Bismarck, North Dakota 
28 November, 1996