I am using TeX Live 2010 on Windows 7. I have no experience to compile a plain TeX input file.

  1. Is my input file below correct?

    % gettingstarted.tex
    \input pstricks
  2. What is the plain TeX compiler I must execute to get DVI output? And what is the syntax?

I have tried using tex gettingstarted.tex and I got the following errors:

enter image description here

  • 7
    I strongly suggest you start simple with plain TeX, reading The TeXbook and working up from basic examples. – Joseph Wright Jul 18 '11 at 7:38

You can use pdftex, if you want to profit from e-TeX extensions; on TeX Live it's available for DVI output as etex or, from the command line,

pdftex --output-format=dvi

Plain TeX has not many page format parameters: the upper left corner of the type block is 1in from the left edge and 1in from the upper edge of the paper.

In order to shift the text block it's necessary to either modify the output routine or to set \hoffset and \voffset. So



\input pstricks



Without \nopagenumbers you'd have the number "printed" outside the page area.

A modified output routine that makes unnecessary to act on \hoffset and \voffset is

  \ifnum\outputpenalty>-\@MM \else\dosupereject\fi}

One can change the two parameters to \xportoutput, for example to adapt the position of the text block to A4 paper. The arguments are respectively the horizontal and the vertical displacements with respect to the default reference point. It's better to use truept in order not to apply the \mag factor.

  • 1
    That option is passed to xcolor. There's no xcolor for Plain. – egreg Jul 18 '11 at 12:16
  • It loads xcolor in LaTeX. – egreg Jul 18 '11 at 13:15

Your input file is not right, as the various dimensions you've tried to use are not defined by the plain TeX format.

On the tool itself, it's just tex:

tex <filename>
% gettingstarted.tex
\input pstricks


  • \leftskip=-in and vor the vertical space I forgot it – user2478 Jul 18 '11 at 9:14
  • xcolor is a LaTeX package! – user2478 Jul 18 '11 at 13:35

You could \input eplain* to have those commands available, with the exception of \oddsidemargin for which you could use (for the purposes of this particular question) the command \leftmargin.


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.