ascherer / sgb

Stanford GraphBase
27 stars 7 forks source link

Generating PDFs of the modules #6

Closed fredyouhanaie closed 1 year ago

fredyouhanaie commented 1 year ago

Hi Andreas

I needed to create the PDFs for my own use. I can send you a PR, if you're accepting to contributions :-)

Fred

ascherer commented 1 year ago

What is the issue?

fredyouhanaie commented 1 year ago

Not an issue as such.

I've modified the Makefile to generate PDFs of the modules for my own use.

It may also be useful for anyone wanting to read the cweave output as a PDF file.

I was wondering if you're interested in adding the change to your repo.

ascherer commented 1 year ago

I see. AFAIK, Don Knuth still accepts reports for SGB directly.

Personally, I use shell scripting, when I want to procude PDF output from the SGB sources

for f in assign_lisa book_components econ_order football girth ladders miles_span multiply queen roget_components take_risc word_components; do cweave $f; pdftex $f; done

or library modules

for f in gb_*.w; do f=`basename $f .w`; cweave $f; pdftex $f; done

Alternatively, you can use the Makefiles from MMIX or CWEB, e.g.,

sgb> $ make -f ../mmix/Makefile PDFTEX=dvipdfm gb_io.pdf
sgb> $ make -f ../cweb/Makefile PDFTEX=xetex gb_basic.pdf

or even

sgb> $ make -f ../cweb/Makefile PDFTEX=hitex gb_games.pdf

although this produces gb_games.hnt.

You can apply any of these approaches locally it you like.

fredyouhanaie commented 1 year ago

OK, understood.

I hadn't realised that Makefile is DEK's original. I won't contact him, I expect he's very busy with TAOCP vol 4 ;-)

My PR was against your local branch, and by the way, thanks for all your work here, it worked for me without any trouble.

The update in the PR lets one type make pdfs or make gb_games.pdf to generate all or specific docs.

All the best f.