1

How can I proceed with LaTeX code such that to produce a table in which entire text to be showed normally. The photo is:

enter image description here

The code for last line is:

\hline 
VOLUMEN & $a^{3}$ & $\frac{\sqrt{2}}{12}\cdot a^{3}$ & $\frac{\sqrt{2}}{3}\cdot a^{3}$ & $\frac{\sqrt{15+ 7\sqrt{5}}}{4} \cdot a^{3}$ & $\frac{5 \sqrt{3+\sqrt{5}}}{12}\cdot a^{3}$ \\
\hline 
4
  • 2
    Please clarify a bit, what you really want! What do you mean by entire text? Do you have problems with to narrow boxes? Please show us an MWE with documentclass and so on.
    – LaRiFaRi
    May 1, 2014 at 22:04
  • 1
    I want to see $12$, $3$, $4$ and again $12$ from denominators clearly. thanks
    – Iuli
    May 1, 2014 at 22:06
  • The output would look better if you stayed away from \frac , here; try writing \sqrt{2}/12 instead \frac{\sqrt{2}}{12}, etc.
    – jub0bs
    May 1, 2014 at 22:14
  • Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. Sep 26, 2017 at 20:02

3 Answers 3

3

I would recommend using the booktabs package as it makes your table better readable and fixes your problem automatically:

% arara: pdflatex

\documentclass{article}
\usepackage{booktabs}
\usepackage[spanish]{babel}

\begin{document}
\begin{tabular}{rlllll}
\toprule 
POLIERDRO & CUBO & TETRAEDRO & OCTAEDRO & DODECAEDRO & ICOSAEDRO\\
\midrule
... & ... & ... & ... & ... & ...\\
VERTICES & 8 & 4 & 6 & 20 & 12\\
ARTISTAS & 12 & 6 & 12 & 30 & 30\\
? & $6 \cdot a^2$ & $\sqrt{3} \cdot a^2$ & $2 \cdot \sqrt{3} \cdot a^2$ & ... & ...\\
VOLUMEN & $a^3$ & $\frac{\sqrt{2}}{12}b\cdot a^3$ & $\frac{\sqrt{2}}{3} \cdot a^3$ & $\frac{\sqrt{15+7\sqrt{5}}}{4} \cdot a^3$ & $\frac{5 \sqrt{3+\sqrt{5}}}{12} \cdot a^3$ \\
\bottomrule
\end{tabular}
\end{document}

enter image description here

If you prefer to stick with your version, you have to enlarge all heights or the height of one row as explained here.

A last possibility would be to reduce the height of your equations by using a slash-notation, a -1 exponent, decimal numbers, or packages like xfrac or nicefrac. The last two will write your fractions in slash-notation. Search this side for examples. I don't know, if these packages are still actual.

2

A solution using the makecell package (to multiline centred cells and heads), cellspace package, to have a minimal vertical spacing at the top and borromm of cells, and nccmath to have medium-sized fractions.

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{array, makecell}
\renewcommand\theadfont{\rmfamily\bfseries}
\newcommand\multicolthead[3]{\multicolumn{#1}{#2}{\thead{#3}}}
\usepackage{cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\usepackage{nccmath}

\begin{document}

\begin{table}[!ht]
\begin{tabular}{ |l|*{5}{Sc|} }
\hline
\thead*{POLIEDRO} &\thead{CUBO} & \thead{TETRAEDRO} & \thead{OCTAEDRO} & \thead{DODECAEDRO} & \thead{ICOSAEDRO} \\
\hline
CARAS & 6 cuadrados & \makecell*{4 triangulos \\equilateros} & \makecell{8 triangulos \\equilateros} & \makecell{12 pentagonos \\ regulares} & \makecell{20 triangulos \\ equilateros} \\
\hline
VERTICES &8 & 4 & 6 & 20 & 12 \\
\hline
ARISTAS & 12 & 6 & 12 & 30 & 30 \\
\hline
????? & $ 6a² $ &$ \sqrt{3}a² $ & $ 2\sqrt{3}a² $ & $ 3\sqrt{25 + 10\sqrt{5}}a² $ & $ 5\sqrt{3}a² $ \\
\hline
VOLUMEN& $a^{3}$ & $\mfrac{\sqrt{2}}{12}\cdot a^{3}$ & $ \mfrac{\sqrt{2}}{3}\cdot a^{3}$ & $\mfrac{\sqrt{15+ 7\sqrt{5}}}{4} \cdot a^{3}$ & $\frac{5 \sqrt{3+\sqrt{5}}}{12}\cdot a^{3}$ \\
\hline
\end{tabular}
\end{table}

\end{document} 

enter image description here

0

You can use \def\arraystretch{1.5} before your tabular environment to extend the height of the rows in a table. The factor in the parentheses adjusts the relative height of the rows whereas a value of 1 (or 1.0) is default.

A good place to have it is right behind the \begin{table}. That way you can make shure it holds only for this particular table and not for all tables to come. Or ouy can use \bgroup and \egroup, respectively, to make it local.

You must log in to answer this question.

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