New MembersHello and a small question!

You would like to introduce yourself before starting to post? That's a nice idea and here is the forum for you...
Post Reply
niketas
Posts: 2
Joined: Sat Jul 05, 2008 2:35 pm

Hello and a small question!

Post by niketas »

Hi people,

I am Niketas Constantinidis from Thessaloniki, Greece. It has only been three weeks since I have first been introduced to LaTeX. Trying to figure out a feature, but then I bump into another one and another one... :D

I have a question that most of you guys will find rather easy. :) It is about inserting an equation into particular cells of a table which shall also include plain text. The code is like

-----------

\begin{table}[htb]
\caption{Conventional relations}
\begin{center}
\begin{tabular}{llll}
\toprule
Correlation
&\multicolumn{2}{l}{Conditions}
& Range of validity \\
\cline{2-3}
& Geometry & Flow regime \\
\hline
$equation goes here$
& & \\
$equation goes here$
\end{tabular}
\end{center}
\end{table}

---------------------

which works fine but I also need to number the mathematical formulae. So I wrap them inside \begin{equation}...\end{equation}, but then I get "LaTeX error: Bad math environment delimiter". I included the \usepackage{amsmath} preamble. The editor is Winefish LaTeX editor on Ubuntu Linux.

After many searches over the Internet and in this forum, I couldn't find anything related to my problem. Since I didn't want to open a new topic for this simple question, I wanted to append it to a warm hello note.

Any help would be appreciated.

Thanks in advance,

Niketas

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Hello and a small question!

Post by Stefan Kottwitz »

Hi Niketas,

welcome to the forum!

The equation environment will work in p, b or m columns. If you want to use it in a l column, you could do it by using \parbox or a minipage environment. For example:

Code: Select all

...
\hline
\parbox{3cm}{\begin{equation}
  y = mx + n
\end{equation}}
& & \\
...
When you have questions feel free to open new topics in the appropriate subforum.

Stefan
LaTeX.org admin
niketas
Posts: 2
Joined: Sat Jul 05, 2008 2:35 pm

Hello and a small question!

Post by niketas »

Thank you, Stefan, for answering in short time!

Using \parbox I get the output, but the equation number appears on the line below the equation. What do I need to do next? :oops:

I am sure many new questions will arise as I proceed with my thesis. Then I am going to open new topics where appropriate. Thank you for your understanding...

Edit: Update and follow-up: I think I corrected it by changing the width; however, I cannot get it flushedleft, the equation is centered.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Hello and a small question!

Post by Stefan Kottwitz »

Hi Niketas,

for flushed left equations use the fleqn option for the document class, like

Code: Select all

\documentclass[a4paper,10pt,fleqn]{article}
Perhaps you want to change also the indent, you can set \mathindent like

Code: Select all

\setlength{\mathindent}{0pt}
in your preamble or just local in the table environment.

Stefan
LaTeX.org admin
Post Reply