Hi there,
I hope this two UseNet-Groups (comp.programming.literate
and comp.text.tex) are the right place to put my question into
(and to recieve a helpfully answer) :-)
I'm sorry for my broken English. It is not my native language.
After having some experience in using LaTeX [but not TeX] and
programming C/C++ and Java I am now trying to learn CWEB.
I have tried to "cweb"-ing a localized (german) version of a simple
cweb-Programm: "Hello World -- in C und TeX via CWEB"
CWEAVE (Version 3.64e Win32) [.w-> .tex]
CTANGLE (Version 3.64e Win32)[.w -> .c]
both from cweb.exe at [1]
workes very well on my web-file :-)
gcc can compile the generated c-Code :-)
For me a bit strange situation:
- pdftex doesn't like the produced tex-file -> no direct pdf-file. :-(
- tex can generate a dvi-file :-) But not as I have expected. :-(
The dvi-file has two unwanted pages at the beginnig of the document.
The fist page is empty but the headline has an English notice
"<Name of title> CWEB OUTPUT 1"
The second page is empty but the headline has a German notice
"2 CWEB Ausgabe <Name of title>"
After these two pages the real document is started.
For better problem solving I have remove most contents from the
WEB-file. But the pdftex problem and the unwantend first two pages
in tex-output still remains.
I searched around but I can't find a method inside TeX to remove
the fist unwanted pages.
From the WEB and TeX code (down below) you can see, that I have
used \input verb.tex. The code from verb.tex was copy&pasted from [2].
If I don't use verb.tex I can't getting verbatim tex-code printed in
documentation. But if I don't use verb.tex the second unwanted page
doesn't occur. The fist one is still there.
If I don't use dcwebmac.tex from [3] pdftex does not produces
error-messages. But the automatical inserted text by cweave are English
and I want them to be German. (German inserts for a German documentation.)
For error message and Source-Code (mini-example CWEB-Code and TeX-Code)
see below.
Can someone please help me?
Best regards,
Robert Hartmann
[1] http://www.literateprogramming.com/cweb_download.html
[2] http://www.mail-archive.com/tex-...@sunsite.dk/msg01607.html
[3] http://mirrors.ctan.org/web/c_cpp/cwebbin/cwebbin.tar.gz
Here are the messages from pdftex:
*******************************
pdftex ultra
This is pdfTeX, Version 3.1415926-1.40.9 (MiKTeX 2.7)
entering extended mode
(ultra.tex ("C:\Program Files\MiKTeX 2.7\tex\plain\misc\cwebmac.tex"
("C:\Program Files\MiKTeX 2.7\tex\plain\misc\pdfcolor.tex"))
(E:\localtexmf\tex\plain\cwebbin-p20\dcwebmac.tex
(E:\localtexmf\tex\plain\cwebbin-p20\Xcwebmac.tex
("C:\Program Files\MiKTeX 2.7\tex\plain\misc\cwebmac.tex"
("C:\Program Files\MiKTeX 2.7\tex\plain\misc\pdfcolor.tex"
Runaway definition?
->\edef
! Forbidden control sequence found while scanning definition of
\makeheadline.
<inserted text>
}
<to be read again>
\M
l.153 \edef\M
{\topmark}
?
*******************************
Here are the messages from tex, just for your interest:
*******************************
tex ultra
This is TeX, Version 3.1415926 (MiKTeX 2.7)
(ultra.tex ("C:\Program Files\MiKTeX 2.7\tex\plain\misc\cwebmac.tex")
(E:\localtexmf\tex\plain\cwebbin-p20\dcwebmac.tex
(E:\localtexmf\tex\plain\cwebbin-p20\Xcwebmac.tex
("C:\Program Files\MiKTeX 2.7\tex\plain\misc\cwebmac.tex")))
(E:\localtexmf\tex\plain\cwebbin-p20\ecma94.sty ECMA94-to-TeX conversion)
(verb.tex) [1] [2] *1 [3] *2 Index: (ultra.idx) [4] Abschnittsnamen:
(ultra.scn
) Inhaltsverzeichnis: (ultra.toc) [0] )
Output written on ultra.dvi (5 pages, 2072 bytes).
Transcript written on ultra.log.
*******************************
Here is my WEB-code from file ultra.w:
@q*******************************@>
\input dcwebmac.tex %Eindeutschung des von CWEAVE
%automatisch eingefügten Textes
\input ecma94.sty %Sowas wie für LaTeX \inputenc{ansinew}
\input verb.tex %für Verbatim TeX-Code
%vgl. http://www.mail-archive.com/tex-music@@sunsite.dk/msg01607.html
\def\title{Ultra kurzer CWEB-Test}
\def\covernote{2011, Robert Hartmann -- Germany}
@** Ein ganz einfaches Beispiel.
Ein Test-Text gefolgt ein Verbatim-Block.
\verbatim
several lines of commandes
\test
\input test.tex
!endverbatim
Aber auch zwischen dem Text ist Verbatim möglich |@t\vrt|\input
verb.tex|@>| möglich.
@*Index.
@q*******************************@>
And here comes the woven tex-file ultra.tex:
%*******************************
\input cwebmac
\input dcwebmac.tex %Eindeutschung des von CWEAVE
%automatisch eingefügten Textes
\input ecma94.sty %Sowas wie für LaTeX \inputenc{ansinew}
\input verb.tex %fuer Verbatim TeX-Code
%vgl. http://www.mail-archive.com/tex-...@sunsite.dk/msg01607.html
\def\title{Ultra kurzer CWEB-Test}
\def\covernote{2011, Robert Hartmann -- Germany}
\N{0}{1}Ein ganz einfaches Beispiel.
Ein Test-Text gefolgt ein Verbatim-Block.
\verbatim
several lines of commandes
\test
\input test.tex
!endverbatim
Aber auch zwischen dem Text ist Verbatim möglich \PB{\hbox{\vrt|\input
verb.tex|}} möglich.
\fi
\N{1}{2}Index.
\fi
\inx
\fin
\con
%*******************************