I use showframe
package to show the margin box. If you draw the frame box of your picture, you will see a large empty space on the right. Because you set you picture boundary like \begin{picture}(400,140)
. As you see in the first picture, use \centering
before the pitcture env, the whole picture env is already centered however you actual drawing are not centered because the empty space. The second picture is centered properly because the boundary is set properly according to the drawing geometry. There are more advanced drawing packages are available such as tikz
. You should use try to use them.
\documentclass[a4paper,12pt]{article}
\usepackage[english]{babel}
\oddsidemargin 0mm
\oddsidemargin 0mm
\textheight 234mm \textwidth 154mm
\columnsep 8 mm \topmargin -15 mm
\usepackage{showframe} %show margin box
\begin{document}
{\centering
\fbox{\unitlength 0.75pt
\begin{picture}(400,140)
\put(100,20){\circle{20}}
\put(150,20){\circle{20}}
\put(110,20){\line(1,0){30}}
\put(100,70){\circle{20}}
\put(100,30){\line(0,1){30}}
\put(157,27){\line(1,1){36}}
\put(200,70){\circle{20}}
\put(107,27){\line(1,1){36}}
\put(150,70){\circle{20}}
\put(107,77){\line(1,1){36}}
\put(150,120){\circle{20}}
\put(93,77){\line(-1,1){36}}
\put(50,120){\circle{20}}
\put(100,120){\circle{20}}
\put(100,80){\line(0,1){30}}
\end{picture}
}\par}
{\centering
\fbox{\unitlength 0.75pt
\begin{picture}(250,140)
\put(100,20){\circle{20}}
\put(150,20){\circle{20}}
\put(110,20){\line(1,0){30}}
\put(100,70){\circle{20}}
\put(100,30){\line(0,1){30}}
\put(157,27){\line(1,1){36}}
\put(200,70){\circle{20}}
\put(107,27){\line(1,1){36}}
\put(150,70){\circle{20}}
\put(107,77){\line(1,1){36}}
\put(150,120){\circle{20}}
\put(93,77){\line(-1,1){36}}
\put(50,120){\circle{20}}
\put(100,120){\circle{20}}
\put(100,80){\line(0,1){30}}
\end{picture}
}\par}
\end{document}
