2

I've written an introductory logic book in LaTeX and I want to have it in ConTeXt. I've made use of a .sty file (fitch.sty, authored by Peter Selinger, not distributed by TeXLive), downloadable here1. (I don't put the code here cause it has over 200 lines), and I'd like to make it work under ConTeXt, cause the use of graphic packages for making derivations is daunting. In a file called fitch.hacker.tex, Selinger says:

"The macros provided by this package mix TeX and LaTeX primitives. LaTeX is used for \rule, \settowidth, \addtolength, \hspace... All macros are assumed to be called in math mode."

If you try to compile fitch.sty with mkiv, you have only two error messages:

1) At lines

\newenvironment{nd}{\begingroup\nd*init\nd*beginc}{\nd*endc\endgroup}
\newenvironment{ndresume}{\begingroup\nd*init\nd*resumec}{\nd*endc\endgroup} 

near the end of the file, and

2) At line 85:

\newlength{\nd*dim} 

I think error 1) is easily subsanable, I mean, to make it work under ConTexT is enough to define the pertinent commands. But I cannot figure out how to "translate" line 85 to ConTexT, cause \newlength is a macro that defines a length register. So:

¿Can anyone tell me if I'm right about error 1? ¿Can anyone tell me if exists a command or a script in ConTexT with the effect of \newlenght?

  • May be \newdimen and \newskip from plain TeX are available? I don't know ConTeXt enough. \newlength equals, more or less, \newskip. – Manuel Sep 14 '16 at 7:44
  • \newenvironment{nd} could be translated as \def\startnd{\begingroup\nd*init\nd*beginc and \def\stopnd{\nd*endc\endgroup}. – Aditya Sep 14 '16 at 17:43
  • Thank you very much. And, mutatis mutandis, the same for \newenvironment{ndresume}? – Miguel Sep 14 '16 at 18:24
5
\newlength{\nd*dim} 

is

\newskip\nd*dim

note that * is a letter here (as normally @ in latex is a letter in package code) due to the

\catcode`\*=11

near the top of the file

so this is just defining a single skip register token, with name nd*dim

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.