0

I'm pretty inexperienced with LaTex, but I'm trying to make this table, and all of the cells are finally lined up correctly with their text in them, etc., etc., but for some reason the very last cell's text "0.9" is lifted above the others. I'm not sure why, the number may feel a bit elitist, or maybe he got caught up on a cliff and can't come down. Either way, I need the text to be level with the other numbers. Here's the code I used:

\documentclass{article}

\usepackage{calc}
\usepackage{ifthen}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{mathtools}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{array}
\begin{document}
\begin{center}

\begin{flushleft}Figure 1
\end{flushleft}
Average Percent of \textit{Doremifasolati Arangeous} Frequencies (\%)
\begin{tabular}{ | m{2cm} | m{2cm}| m{2cm} | m{2cm} | m{2cm}| m{2cm} | m{2cm} | } 
\hline
Doramus & Refaltido & Misanit & Fanatha & Sonphay & Laoli & Tidanme\\ 
\hline

$ 60%
$
& $17%
$
& $6%
$
& $6%
$
& $5.1%
$
& $5%
$
& $0.9%
$

\\
\hline
\end{tabular}

\end{document}

And here's the result of the code. Thank you.

3
  • 2
    drop off the blank line before \\, this should do it. By the way, your $$ are not usefull at all, you don't need math mode here. Your % are not so usefull either.
    – sztruks
    Aug 31, 2017 at 16:40
  • 1
    It is because that blank line before \\, for a type m column, is interpreted as a paragraph break. Aug 31, 2017 at 16:42
  • Ah oh, thanks guys, sorry about the duplicate question. :) Sep 1, 2017 at 1:48

1 Answer 1

2

The last cell text is raised because of blank line before \\, for a type m column, it is interpreted as a paragraph break, as pointed out by @StevenB.Segletes above. The figure cation is automatically inserted by LaTeX using the \caption command, you needn't write Figure 1 manually. I removed unrelated packages and used booktabs for a nice output. Also, since almost all entries are percentages data and no paragraph text, using just the c column seems reasonable instead of m.

\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{booktabs}
\begin{document}

\begin{table}
  \centering
  \caption{Average Percent of \textit{Doremifasolati Arangeous} Frequencies (\%)}
  \smallskip
  \begin{tabular}{ @{}*7{c}@{} } 
    \toprule
    Doramus & Refaltido & Misanit & Fanatha & Sonphay & Laoli & Tidanme \\ 
    (\%)    & (\%)      & (\%)    & (\%)    & (\%)    & (\%)  & (\%)    \\ \midrule
    60      & 17        & 6       & 6       & 5.1     & 5     & 0.9     \\ 
    60      & 17        & 6       & 6       & 5.1     & 5     & 0.9     \\ 
    60      & 17        & 6       & 6       & 5.1     & 5     & 0.9     \\ \bottomrule
  \end{tabular}
\end{table}

\end{document}

enter image description here

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