[MLton-user] PDF version of guide
Stephen Weeks
MLton-user@mlton.org
Fri, 28 Oct 2005 14:01:31 -0700
> http://www.cs.cmu.edu/~agoode/mlton.pdf
>
> It's not perfect, but it's a start.
>
> Made with:
>
> $ yes | html2ps -U -W bL -R -t -H -n -D -C fb http://localhost/~adam/guide/ > mlton.ps
An excellent start!
When I run html2ps on my Debian machine, I get the warning
Cannot open hyphenation file: /usr/share/texmf/tex/generic/hyphen/ushyph1.tex
Any ideas on how to fix this? There are lots of files in that
directory, just no ushyph1.tex.
More seriously, I get the following Ghostscript error.
----------------------------------------------------------------------
GPL Ghostscript 8.01: Unrecoverable error, exit code 1
GPL Ghostscript 8.01: Unrecoverable error, exit code 1
Error: /rangecheck in --get--
Operand stack:
--nostringval-- --nostringval-- 5
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 4 1 603 --nostringval-- %for_pos_int_continue --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue 2 1 1 --nostringval-- %for_pos_int_continue 1 1 2 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1048/1123(ro)(G)-- --dict:0/20(G)-- --dict:69/200(L)-- --dict:1933/2000(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 400429
----------------------------------------------------------------------
Any ideas?
> Anyway, I hope this is useful. Let me know what sort of tweaks you need.
I think it's very close. Here's some suggestions for improvement.
* Fix the table at the top. I agree that preprocessing the HTML looks
like the way to go. I don't think the table should be cut entirely.
Best would be to extract the page title and increase its font size
if possible. You might find some inspiration from the munging code
in bin/grab-wiki.
* Alphabetize all the pages.
* Avoid the duplicate "index.html" and "Home". Perhaps drop the -t
option?
* I didn't see the table of contents, but I'm fine with it being
dropped, since we already have an index. Perhaps drop the -C
option?
* Drop the pictures. It looks like -T will do this.
Maybe a reasonable way to call html2ps is with the URL
http://localhost/~adam/guide/Index
That way the Index will appear first, and all the other pages will be
in alphabetical order (I hope).