Rich Shepard writes:
> Thanks for your efforts. If you look at the .tex file I attached
> to my post you'll see that there are 286 little boxes (3mm wide x
> 2.54mm high). That's a lot of \picture{} environments to design and
> place. :-)
Why would you need 286 picture environments? Have you actually played
around with one of them?
Have you looked at \multiput?
http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/teTeX/latex/latex2e-html/ltx-269.html
Sounds like it might be useful.
I noticed while browsing yesterday that there are also several graphics
packages for LaTeX. Perhaps you would be better off with one of these.
Far be it from me to make this suggestion (since for some reason I've
not yet done it myself), but perhaps since you are working on something
specialized you should purchase one or two LaTeX reference books?
> For example a negative \vspace{} closes up lines
> rather than raising the \framebox a bit above the baseline. That's
> not helpful.
Perhaps it's the wrong tool for the job. It seems to me that the
\picture environment provides global positioning and the \put and
\multiput commands offers the same thing locally. I've attached my
sample file again, showing \multipart and also that one is not
restricted to the boundaries of the picture environment.
But as this all has little or nothing to do with LyX, perhaps we will
soon be \booted out of here? :-)
-Kevin
--
Kevin Pfeiffer <[EMAIL PROTECTED]>
Tiros-Translations
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language ngerman
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Standard
\added_space_bottom bigskip \align center
\series bold
\size larger
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
framebox{The Framebox}
\end_inset
\layout Standard
First create a picture environment.
The default
\backslash
unitlength is 1pt, so the picture environment below was created to be 72
x 72 points in size.
The 0,0 origin places it on the baseline following the last character typeset.
Then with the
\backslash
frame command a border is drawn around it.
\layout Standard
Inside the picture environment a
\backslash
put command adds a
\backslash
framebox slightly smaller than the picture environment.
Inside this is another
\backslash
framebox, 16 x 16 points in size.
The (28,28) origin (i.e.
72/2 - 16/2) of this second
\backslash
put command, translates (shifts) the our smaller box from the lower-left
corner of the picture environment to its center.
\layout Standard
The
\backslash
multiput command lets one create patterns by setting the starting x,y coordinate
s, delta x,y (the offset for each multiple), and the number of repeats;
and \SpecialChar \ldots{}
\layout Standard
finally an x marks the spot:
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
frame{
\layout Standard
\backslash
begin{picture}(72,72)(0,0)
\layout Standard
\backslash
linethickness{0.1pt}
\layout Standard
\backslash
put(2,2){
\backslash
framebox(68,68)[]{}}
\layout Standard
\backslash
multiput(6,61)(7,0){9}{
\backslash
framebox(4,4)[]{}}
\layout Standard
\backslash
multiput(6,7)(7,0){9}{
\backslash
framebox(4,4)[]{}}
\layout Standard
\backslash
linethickness{2pt}
\layout Standard
\backslash
put(28,28){
\backslash
framebox(16,16)[]{x}}
\layout Standard
\backslash
linethickness{0.5pt}
\layout Standard
\backslash
put(-22,-99){
\backslash
framebox(60,10)[c]{down here!}}
\layout Standard
\backslash
end{picture}%
\layout Standard
}
\end_inset
That's all.
The
\backslash
linethickness command can also be used.
Zoom in on the dvi output (or print the page) to see the difference.
\layout Standard
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
setlength{
\backslash
unitlength}{1em}%
\end_inset
\layout Standard
A further option would be to change the
\backslash
unitlength to something other than points.
Here the
\backslash
unitlength has been changed to 1 em
\begin_inset ERT
status Collapsed
\layout Standard
\backslash
begin{picture}(1,1)(0,0.2)
\layout Standard
\backslash
put(0,0){
\backslash
framebox(1,1)[c]{M}}
\layout Standard
\backslash
end{picture}
\end_inset
using the
\backslash
setlength command.
\layout Standard
And the placement of elements is not restricted to the boundaries of the
picture environment.
This box \SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\SpecialChar ~
\begin_inset Quotes eld
\end_inset
lives
\begin_inset Quotes erd
\end_inset
in the picture environment up above.
Of course there are probably other and even better ways of placing text
and boxes together -- especially when working on the baseline and inside
a paragraph of justified text!
\the_end