Article View: comp.text.tex
Article #121Strange /end{} error from emTeX to LaTeX
From: Robert Schmidt
Date: Fri, 30 Oct 1992 14:15
Date: Fri, 30 Oct 1992 14:15
82 lines
2672 bytes
2672 bytes
I've made a *simple* environment for writing pseudocode in emTeX, which
I thought was pretty near compatible with LaTeX. In emTeX, the file
compiled nicely, in LaTeX I got this reply:
! Use of \endpseudocode doesn't match its definition.
\end #1->\csname end#1\endcsname \@checkend
{#1}\if@endpe \global \let \@gte...
l.398 \end{pseudocode}
My document looks like this ([...] means cut-out material):
\documentstyle[emlines2]{artikkel}
% Artikkel is a Norwegian version of Article, which has just some words
% translated.
% emlines2 is needed for special line drawing in emTeX.
% what follows are some simple macros
\newcommand{\preadytabs}
{
\=012345\=012345\=012345\=012345\=012345\=012345\= \kill
}
\newcommand{\pnew}[0] %/pnew starts a new pseudocode line
{
\ifnum \value{pseudoline} >0 \\ \fi
\addtocounter{pseudoline}{1}
\>\rm\arabic{pseudoline}\> % number each line
}
\newcommand{\pline}[1] %\pline just outputs its argument
{#1}
[...]
\newcommand{\pcomm}[1] %\pcomm outputs a pseudocode comment
{\pline{$\rhd$\'#1}}
\newenvironment{pseudocode}[1]
{ % begin
% \setcounter{pseudotabs}{1}
\setcounter{pseudoline}{0}
\begin{tabbing}
{\large\tt #1}\\ % output algorithm name
\preadytabs % set up tab stops
}
{ % end
\end{tabbing}
}
\begin{document}
[...]
\begin{pseudocode}{pack(inFileName, outFileName)}
\pnew\pcomm{Open input and output files}
[...]
\pnew\pcomm{Avslutt}
\end{pseudocode} % this is line 398, where the error
% occurs
\begin{pseudocode}
[...etc]
\end{document}
Can anyone explain why LaTeX won't accept this, while emTeX does?
I will gladly e-mail the tex file to anyone interested in checking it
out for themselves.
--
Cheers from Robert Schmidt, aka Ztiff Zox, aka Buuud (IRC). E-mail to
robert@solan.unit.no, snail-mail to Stud.techn. Robert Schmidt, Stud.post 170,
Norwegian Institute of Technology, 7034 Trondheim, NORWAY
Warlords: Now do you think my .sig is boring enough?
Technical Details
Message-ID:
<1992Oct30.141541.272@ugle.unit.no>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!ugle.unit.no!solan1.solan.unit.no!robertShow Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!ugle.unit.no!solan1.solan.unit.no!robert
From: robert@solan.unit.no (Robert Schmidt)
Subject: Strange /end{} error from emTeX to LaTeX
Message-ID: <1992Oct30.141541.272@ugle.unit.no>
Sender: news@ugle.unit.no (NetNews Administrator)
Organization: Norwegian Institute of Technology
Date: Fri, 30 Oct 92 14:15:41 GMT
Lines: 82