tony@cm.deakin.oz.au (Anthony D. Klemm) (12/17/90)
Help! Sorry to trouble people, but I have a problem. I am writing an article and am using an environmental layout as per the LATEX guide "Essential LATEX" by Jon Warbrick. This sets up two minipages alongside each other -- in his case in order to have manual type examples i.e., xxxxxxxxxxxxx|aaaaaaaaaaaaa yyyyyyyyyyyy |bcd efg |dddddddd ddd zzzzzzzzzzzz | eeeee eee ^(This is to represent the separation of sides. It is not a vertical line) The commands work OK if both sides are text. However my problem example is whan the left side is text and the right side is a picture. The result is that the picture is offset i.e., | | |_____________ | | | | xxxxxxxxxxxxx| yyyyyyyyyyyy | | zzzzzzzzzzzz | If I specify the reference x-offset and y-offset as (0,0) the result does not change. If I specify them as (0,55) then what happens is that the picture moves DOWN to the text and a gaping hole is left above i.e., | | | | xxxxxxxxxxxxx| | yyyyyyyyyyyy |_____________ | | zzzzzzzzzzzz | | Anyway, below is a bare-bones version of the environment with the offending example. To try it just cut off where indicated. If anyone can offer a solution I would appreciate it. %----cut here for example------------****** \documentstyle[12pt,a4]{report} \begin{document} \pagestyle{plain} \textwidth 6in \textheight 8.5in \topmargin 0in % commands to do 'LaTeX Manual-like' examples % This is the side-by-side box environment creator % copied from Jon Warbrick's "Essential LATEX" \newlength{\egwidth}\setlength{\egwidth}{0.42\textwidth} \newenvironment{eg}% {\begin{list}{}{\setlength{\leftmargin}{0.05\textwidth}% \setlength{\rightmargin}{\leftmargin}}\item[]}% {\end{list}} \newenvironment{egbox}% {\begin{minipage}[t]{\egwidth}}% {\end{minipage}} \newcommand{\egstart}{\begin{eg}\begin{egbox}} \newcommand{\egmid}{\end{egbox}\hfill\begin{egbox}} \newcommand{\egend}{\end{egbox}\end{eg}} % This is the first use of the above environment in % which one side of the pair is script and the other a picture The question that should \underline{always} be asked is: \nolinebreak \egstart \underline{Is there a solution}? \vspace{5mm} For the above function \vspace{5mm} $f(1) = -1,\;\;\;f(2) = 5.$ \\ Now polynomials are continous. Therefore at least one zero in the interval $(1,2)$. (Intermediate Value Theorem.) \egmid% \setlength{\unitlength}{1mm} \begin{picture}(65,55) \put(27,50){$f(x)$} \put(30,0){\vector(0,1){49}} \put(1,25){\vector(1,0){60}} \put(62,24){$x$} \end{picture} \egend \end{document} %-- %Anthony D. Klemm %Department of Computing & Mathematics , Deakin University, %Victoria, 3217 . AUSTRALIA. % %ACSnet: tony@cm.deakin.oz.au %--------------------------