Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating PDFs of the modules #6

Closed
fredyouhanaie opened this issue Sep 29, 2022 · 4 comments
Closed

Generating PDFs of the modules #6

fredyouhanaie opened this issue Sep 29, 2022 · 4 comments
Labels

Comments

@fredyouhanaie
Copy link

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
Copy link
Owner

What is the issue?

@fredyouhanaie
Copy link
Author

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
Copy link
Owner

ascherer commented Sep 30, 2022

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants