# What is the most minimal code to work with ConTeXt?

What is the most minimal code to work with ConTeXt?

-
"work with"? What kind of work do you have in mind? –  Charles Stewart Jan 13 '11 at 9:51
@Charles: To make it compilable. –  xport Jan 13 '11 at 10:03
To test that your set up is working? –  Charles Stewart Jan 13 '11 at 10:09
@Charles: Yes. I want to make a test. –  xport Jan 13 '11 at 10:13

This is the most minimal. It just instructs TeX to stop.

\end


While I'm at it. It's also the most minimal code for plain TeX. For LaTeX, the best I could do is this.

\csname@@end\endcsname


I guess

\catcode@11 \@@end


is shorter, but it's less minimal since TeX has to execute two commands instead of just one.

-
@TH \stop for LaTeX should be the shorter? –  Yiannis Lazarides Jan 13 '11 at 7:11
@Yiannis: Ah yes. Probably the shortest, but not the most minimal. It invokes the output routine. –  TH. Jan 13 '11 at 9:22
What about \enddocument in LaTeX? Probably also not minimal, since that requires an aux file present. –  Konrad Rudolph Jan 13 '11 at 11:19
@Konrad: That doesn't work. As you mentioned, it looks for \jobname.aux. –  TH. Jan 13 '11 at 12:17
\starttext
Hello world.
\stoptext


or even simpler

Hello world.
\bye

-
Well, actually I'm not a ConTeXt user. wiki.contextgarden.net/First_Document –  Leo Liu Jan 13 '11 at 6:25
how about just \bye`? –  Yiannis Lazarides Jan 13 '11 at 6:30
@Yiannis: In fact, there's no difference, right? I think the key is "work" but not "most minimal". The first example works as most ConTeXt ducuments, and the second one works as Plain TeX. –  Leo Liu Jan 13 '11 at 10:29