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

How to code the syntax like fraction, but with more than 2 components? Fractions consist of numerator and denominator while I need more. In other words: how to code column-matrix with horizontal lines separations (and without any surrounding brackets).

P.S. All components should be of equal size not like in

{a \over {b \over {c \over d}}}
share|improve this question
You didn't say what format you are using, mostly LaTeX is assumed but you mentioned \over which isn't really a LaTeX command. Something like {\scriptstyle\begin{array}{c}1\\2\\3\\4\\5\\6\end{array}}` should work in LaTeX/ – David Carlisle Nov 16 '12 at 13:05
up vote 4 down vote accepted

Is this what you are looking for?



$\begin{array}{c}a\\ \hline b\\ \hline c\\ \hline d\end{array}$


enter image description here

Alternatively you can use the matrix environment from amsmath instead of the array environment.

share|improve this answer
This is not very clear and I don't understand why this got accepted as an answer. For example, is this a/(b/(c/d)), (a/b)/(c/d). (a/(b/c))/d,....? – Marc van Dongen Nov 16 '12 at 21:29

I think array solution is probably what you are looking for, but can also do this with nested fractions:

enter image description here


  • The second \dfrac version has an issue with as the height/dept of the characters is not uniform. Adding a \mathstrut fixes that (Thanks to egreg).



  \frac{\frac{a}{b}}{\frac{c}{d}}  \quad \frac{\dfrac{a}{b\mathstrut}}{\dfrac{c\mathstrut}{d}}
share|improve this answer
Add \mathstrut next to the c: \dfrac{\mathstrut c}{d}. You may be wanting to do the same for b. – egreg Nov 16 '12 at 21:16
This is a much clearer solution. – Marc van Dongen Nov 16 '12 at 21:29

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.