You are not logged in.

#1 2013-04-03 19:36:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,452
Website

[SOLVED - indirectly] LaTeX Error: File `cwebbase.tex' not found

Background:
Having recently taken up using sweave (R stats + TeX) and seeing how easy and productive it was, I wanted to get more into literate programming in C.  My first challenge is that the format of the "web" files - or the original source input - seems very far removed from the core ideas of literate programming and from sweave.  Noweb(AUR package) has a much cleaner input-file syntax IMHO, but I just can't get it to properly "weave" or "tangle", so I am using the cweave and ctangle tools that come with extra/texlive-bin.

Error:
I've tried to follow along with some of the example .w files here.  `ctangle <filename>.w` does produce a .c file as expected, and `cweave <filename>.w` produces a .tex file as expected, but when I try to process the .tex file (with latexmk, latex, or pdflatex) I get the following error message ("<SNIP>" representing the long list of languages):

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Arch Linux)
 restricted \write18 enabled.
entering extended mode
(./flat.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english <SNIP> loaded.
(/usr/share/texmf-dist/tex/plain/cweb/cwebmac.tex)
(/usr/share/texmf-dist/tex/latex/cweb-latex/cweb.cls
Document Class: cweb 1995/11/30 v3.6 LaTeX markup for CWEB sources
(/usr/share/texmf-dist/tex/latex/cweb-latex/keyvald.sty)
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))

! LaTeX Error: File `cwebbase.tex' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)

Enter file name:

Question:
The file cwebbase.tex does not belong to texlive-bin, nor any other package (according to pkgfile), nor can I find it in any AUR source.  I have found links where I could download it directly, but I can't imagine that that would be the right solution as all the other cweb tools are part of the texlive-bin package.  So, I suspect my tex system must be misconfigured or I must be missing something obvious.  Does anyone else "cweave" successfully in arch?  And how do I "fix" the above error?


Edit:
I've downloaded the cwebbase.tex file, and when pdflatex gives that error, I enter the file name.  But this leads to yet another error:

Enter file name: ~/cwebbase.tex

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.465 \input{cwebbase}
                      
? 

Solution:
This was being such a hassle that I gave noweb a second (actually 4th) shot and found the problem I was having there: I didn't realize noweb's noweave command generated a latex preamble of it's own and wrapped the resulting tex file in it.  This lead to some horrendously ugly output or errors in the pdfs.  I discovered the "-delay" parameter was what I needed for `noweave` and it is doing exactly what I hoped/expected now.

I'd have preferred to have figured out how to use the "basic" texlive-bin tools for this, but now that I got the right parameters, noweb is working wonderfully and has a *much* nicer looking source file syntax (basically just like a sweave .Rnw file ... as sweave uses noweb).

Summary: Install noweb and icon (dependency) both from AUR.  Read man page. Be happy.

Last edited by Trilby (2013-04-04 01:05:01)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB