LaTeX forum ⇒ Graphics, Figures & Tables ⇒ How to anchor a box to place text in it

Information and discussion about graphics, figures & tables in LaTeX documents.
Phooey
Posts: 5
Joined: Sun Sep 29, 2019 4:18 pm

How to anchor a box to place text in it

Could someone kindly explain to me how the coordinates in this code works?

I am using this:

\begin{tikzpicture}	\draw (-3,0) rectangle (4,2) 	 node at (0, 1.5){UWE registration number};	\draw (4.25, 0) rectangle (7,2) 	 node at (5.5, 1.5){Mark \%}; \end{tikzpicture}

This giving me two boxes side by side with the text in and is correctly placed.

I need another larger box directly underneath

\begin{tikzpicture}	\draw (-3,0) rectangle (7,12) 	 node at (0, 1.5){lots ox text required in here};\end{tikzpicture}

The box appears correctly until I try to place the text into it. Then the box moves all over the place. It is a lot of text and with every line I get a complete movement of the box.

If I could understand how to anchor the box while placing the text I think it would help.

Cheers

Phooey
Posts: 5
Joined: Sun Sep 29, 2019 4:18 pm
I've just discovered \fbox{}

That might solve the immediate problem.