1

I'm interested in using CWEB with LaTeX on Windows. Today I discovered my MikTeX installation comes with two interesting programs, cweave and ctangle. Are they Knuth and Levy's CWEB? When I try to run them, I get the following problem:

%cweave.exe cwebsync.w_h
This is CWEAVE, Version 3.64 (MiKTeX 2.9.6960)
Sorry, but c:\emacs\miktex\texmfs\install\miktex\bin\cweave.exe did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
  c:\emacs\miktex\texmfs\data\miktex\log\cweave.log
%

The log file reveals the following:

%cat c:\emacs\miktex\texmfs\data\miktex\log\cweave.log
[...]
2019-02-18 21:44:44,561-0300 INFO  cweave - starting with command line: c:\emacs\miktex\texmfs\install\miktex\bin\cweave.exe cwebsync.w_h
2019-02-18 21:44:44,644-0300 FATAL cweave - MiKTeX encountered an internal error.
2019-02-18 21:44:44,645-0300 FATAL cweave - Info: path="."
2019-02-18 21:44:44,645-0300 FATAL cweave - Source: Libraries\MiKTeX\Core\Session\miktex.cpp
2019-02-18 21:44:44,646-0300 FATAL cweave - Line: 675
2019-02-18 21:44:44,656-0300 INFO  cweave - finishing with exit code 1
%

I've seen this type of internal error before --- my MikTeX is the portable one and not everything works out of the box with this MikTeX portable version. So perhaps that's the same problem here. Nevertheless: should I bother with these programs from the MikTex installation?

1

Running a portable version should not be the issue if the miktex\bin is on path and the texmf's are well structured, I know because if I run from anywhere in the system my portable usb copy

ctangle C:\Users\myname\Desktop\cweb_tar\examples\wordtest.w
I correctly get wordtest.c and if I cweave I get the 30k of wordtest.tex

I did get an error message when I did not give the absolute address and sensibly did not run from a path with spaces etc.

Apart from the CTAN files an interesting related collection is at http://www.literateprogramming.com/cweb_download.html and of course the main site https://www-cs-faculty.stanford.edu/~knuth/cweb.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.