Generalarray -- embedded normal lines

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
The_Watcher
Posts: 5
Joined: Mon Jul 09, 2007 8:01 pm

array -- embedded normal lines

Post by The_Watcher »

:geek:

Hi,

I specific question regarding arrary environment. I want to write out a mathematical table with colomns of numbers, but exceptionally I want a 'normal' line of text. For example,

1 2 3 4 5 6
2 3 4 5 6 7
This is odd
3 4 5 6 7 8

I know how to do a normal table, viz

$$
\begin{array}{ ccc ccc}
&1 &2 &3 &4 &5 &6 \\
&2 &3 &4 &5 &6 &7 \\
&3 &4 &5 &6 &7 &8
\end{array}
$$


But how do I get the exceptional "This is odd" line in between?

Thanks
The Watcher
London

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

array -- embedded normal lines

Post by Stefan Kottwitz »

Hi,

you could use \multicolumn:

Code: Select all

\[
\begin{array}{ ccc ccc}
  1 &2 &3 &4 &5 &6 \\
  2 &3 &4 &5 &6 &7 \\
  \multicolumn{6}{l}{\mbox{This is odd}} \\
  3 &4 &5 &6 &7 &8
\end{array}
\]
Use \[ ... \] instead of $$ ... $$, see the guide Obsolete commands and packages 1.6 Separating maths formulae from continuous text for an explanation.

Stefan
LaTeX.org admin
The_Watcher
Posts: 5
Joined: Mon Jul 09, 2007 8:01 pm

Re: array -- embedded normal lines

Post by The_Watcher »

Thanks, that's great. :)
The Watcher
London
Post Reply