3

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}}}
1
  • 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/ Nov 16, 2012 at 13:05

2 Answers 2

4

Is this what you are looking for?

\documentclass{article}

\begin{document}

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

\end{document}

enter image description here

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

1
  • 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,....?
    – user10274
    Nov 16, 2012 at 21:29
3

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

enter image description here

Notes:

  • 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).

Code:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\[ 
  \frac{\frac{a}{b}}{\frac{c}{d}}  \quad \frac{\dfrac{a}{b\mathstrut}}{\dfrac{c\mathstrut}{d}}
\]
\end{document}
2
  • Add \mathstrut next to the c: \dfrac{\mathstrut c}{d}. You may be wanting to do the same for b.
    – egreg
    Nov 16, 2012 at 21:16
  • This is a much clearer solution.
    – user10274
    Nov 16, 2012 at 21:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .