! You can't use `the character 1' after \divide.
My code is:
[...]
\usepackage{pstricks}
\newcommand{\XMAX}{10}
\newcommand{\YMAX}{10}
\newcommand{\XMIN}{0}
\newcommand{\YMIN}{0}
\newcommand{\XUNIT}{1}
\newcommand{\YUNIT}{1}
\setlength{\unitlength}{.3cm}
\begin{picture}(10,10)(\XMIN,\YMIN)
\put(0,0){\line(0,1){\XMAX}}
\put(0,0){\line(1,0){\YMAX}}
\put(0,0){\line(0,-1){\XMIN}}
\put(0,0){\line(-1,0){\YMIN}}
\multiput(0,0)(0,\XUNIT){\XMAX \divide \XUNIT}{\line(-1,0){.2}}
\put(0,0){\circle{.2}}
\end{picture}
[...]
\divide isn't a binary operator, it's described in the texbook, not in
any latex manual.
syntax
\divide <register> by <number>
(iirc); <register> is a \count or a \dimen. it's a tex primitive,
nothing (direct) to do with latex.
>My code is:
>
>[...]
>
>\usepackage{pstricks}
>
>\newcommand{\XMAX}{10}
>\newcommand{\YMAX}{10}
>\newcommand{\XMIN}{0}
>\newcommand{\YMIN}{0}
>\newcommand{\XUNIT}{1}
>\newcommand{\YUNIT}{1}
>
>\setlength{\unitlength}{.3cm}
>
>\begin{picture}(10,10)(\XMIN,\YMIN)
>\put(0,0){\line(0,1){\XMAX}}
>\put(0,0){\line(1,0){\YMAX}}
>\put(0,0){\line(0,-1){\XMIN}}
>\put(0,0){\line(-1,0){\YMIN}}
>\multiput(0,0)(0,\XUNIT){\XMAX \divide \XUNIT}{\line(-1,0){.2}}
>\put(0,0){\circle{.2}}
>\end{picture}
>
>[...]
(a) it's not a minimal example -- i can't compile that
(b) i don't understand what pstricks has to do with it
(c) latex provides a package package calc for doing calculations,
which hides the use of \divide (which i had to dig in my memory about,
since i've not used it for ages ... having first used it in the 1980s).
--
Robin Fairbairns, Cambridge
>\divide isn't a binary operator, it's described in the texbook, not in
>any latex manual.
Having learnt by jumping manual to manual, I haven't read any
textbooks on the matter. Which would you recommend?
see comp.text.tex(Writing something left-justified and something right-
justified), 01-06-2009, re the last entry, by
buyoni...@bluebottle.com.
it depends what you're trying to do. if you're trying to use pstricks
(as your code suggested), then there's some good pstricks manuals on
the web and so on. i believe there are ways of doing arithmetic in
pstricks, but i'm really no expert.
if you want to use latex picture mode, then you have to fall back on
the calc package to do your sums. "texdoc calc" on a texlive or tetex
system would help; otherwise grab it from the web
http://mirror.ctan.org/macros/latex/required/tools/calc.pdf
--
Robin Fairbairns, Cambridge