Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
add comment

2 Answers

up vote 4 down vote accepted

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.

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
add comment

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}
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
add comment

Your Answer

 
discard

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.