TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i try to draw a split rectangle like this:

enter image description here

And this is my current state :/ Any ideas?

enter image description here

share|improve this question
Not necessarily a rectangle split is the best approach; for your purpose, I think you can get some insights from How to draw a thin rectangle. – Claudio Fiandrino Mar 20 '14 at 7:58
And what is the code of your current state? – Stefan Kottwitz Mar 20 '14 at 8:00
Add rectangle split draw splits=false to splitted node options – Ignasi Mar 20 '14 at 8:24
Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Benedikt Bauer Mar 20 '14 at 8:32
up vote 3 down vote accepted

On this task you can use the tikz package along with the array environment, if you don't need some inside/outside ticks in it. If you do, there are better ways how to get them.

\node[draw=blue, fill=blue!30, line width=2pt]
  x_1\\ x_2\\[9pt] \vdots\\[6pt] x_n


share|improve this answer

An alternative using stacks.

\fcolorbox{black}{gray!40}{\ensurestackMath{\Centerstack{\,x_1\, x_2 {} {\vdots} {} x_n}}}

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.