2

I'm trying to present a equation in this way

Example of Table

I don't know if it's the best way to present this information, but i got that example from a reference guide.

3

i suspect that you looking for the following:

enter image description here

\documentclass[10pt,letterpaper]{report}
\usepackage{amsmath,amssymb}
\usepackage{array,multirow}

\usepackage{lipsum}
\begin{document}
\lipsum[66]
    \[\setlength\extrarowheight{1pt}
\begin{tabular}{r c >{$}r<{$:} l}
\multirow[t]{3}{*}{$
Q_r=\dfrac{W}{\gamma\times t}
                  $}    & where & W         & Weight \\
                        &       & \gamma    & Specific weight\\
                        &       & t         & Average time
\end{tabular}
    \]
\lipsum[66]
\end{document}
  • Yes, this is what i was looking for. Can you elaborate on what does \[\setlength\extrarowheight{1pt}? – kraDracsO Dec 13 '18 at 2:42
  • 3
    \[ and ] are delimiters for math environment (equivalent for \begin{equation*} and \end{equation}. with \setlength\extrarowheight{1pt} is added vertical space of 1pt above cells' contents. you can omit this space, if you like to have more dense text in tabular. – Zarko Dec 13 '18 at 3:03
3

Here's a solution that uses a single array environment.

enter image description here

\documentclass{article}
\usepackage{amsmath,array}
\newcolumntype{L}{>{$}l<{$}}
\begin{document}
\[
Q_r=\frac{W}{\gamma\times t} \qquad\text{where}\qquad
\begin{array}[t]{@{} r<{\colon} L @{}}
   W      & Weight \\
   \gamma & Specific weight\\
   t      & Average time
\end{array}
\]
\end{document}
0

I read this post and got this

\documentclass[10pt,letterpaper]{report}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}
\begin{document}
\begin{tabular}{rcl}
$Q_r=\dfrac{W}{\gamma \times t}$& where & \begin{tabular}{rl}
&\\
&\\
$W$:&Weight\\
$\gamma$:&Specific weight\\
$t$:&Average time
\end{tabular}
\end{tabular}
\end{document}

But this creates a space above the table. I could add a \vspace{-0.5cm} before the table.

  • The reason for the whitespace above the tabular environment is that the tabular environment comprises 5 rather than just 3 rows, with the first two rows being left empty. Assuming you wanted to keep using nested tabular environments, the best way to get rid of the unwanted whitespace is to replace both instances of \begin{tabular} with \begin{tabular}[t], i.e., to require top-alignment, and to get rid of the two blank rows. Do note that you don't actually need the "outer" tabular environment. Just encase formula and its legend in a display-math environment. – Mico Dec 13 '18 at 7:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.