LyXtables centring when using numbered list

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
john12
Posts: 6
Joined: Thu Feb 23, 2012 3:51 pm

tables centring when using numbered list

Post by john12 »

I have a table on my numbered lists but the number is appearing in the middle, I want it to be at the top like normal. This is what it looks like when using tables.

I've attached a picture, I want the number 6 to be the top no the middle.

How can I achieve this? I've googled and googled.

Thanks
Attachments
Screen Shot 2012-02-23 at 01.54.17.png
Screen Shot 2012-02-23 at 01.54.17.png (7.15 KiB) Viewed 4755 times

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: 10330
Joined: Mon Mar 10, 2008 9:44 pm

tables centring when using numbered list

Post by Stefan Kottwitz »

Hi John,

welcome to the board!

There's an optional alignment argument for tabular environments. For top alignment use [t]:

Code: Select all

\item \begin{tabular}[t]{...}
Stefan
LaTeX.org admin
john12
Posts: 6
Joined: Thu Feb 23, 2012 3:51 pm

Re: tables centring when using numbered list

Post by john12 »

Thank you but this how do I implement this?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Re: tables centring when using numbered list

Post by Stefan Kottwitz »

You can implement it like I wrote. Or how is your code now? Perhaps show the code of your numbered list with the table if you would like to see how to adjust your code.

Stefan
LaTeX.org admin
john12
Posts: 6
Joined: Thu Feb 23, 2012 3:51 pm

tables centring when using numbered list

Post by john12 »

Code: Select all

% Preview source code for paragraph 9

\begin{enumerate}
\item %
\begin{tabular}{|c|c|}
\hline 
 & \tabularnewline
\hline 
\hline 
 & \tabularnewline
\hline 
 & \tabularnewline
\hline 
 & \tabularnewline
\hline 
\end{tabular}\end{enumerate}
I don't know how I can manually edit the source code to include that piece of code as well
thanks.
john12
Posts: 6
Joined: Thu Feb 23, 2012 3:51 pm

Re: tables centring when using numbered list

Post by john12 »

How do I insert the code into the lyx is what I'm currently stuck on. Thanks
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Re: tables centring when using numbered list

Post by Stefan Kottwitz »

Ah, it's LyX ... I don't have it installed. Perhaps something like right clicking on the table, opening tabular settings and looking for a top alignment option.

Stefan
LaTeX.org admin
john12
Posts: 6
Joined: Thu Feb 23, 2012 3:51 pm

Re: tables centring when using numbered list

Post by john12 »

I still can't seem to fix this.

Anyone got a solution please.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

tables centring when using numbered list

Post by localghost »

Just for information to other users to be aware of possibly already existing solutions. The question has also been posted to the {TeX} SE.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

tables centring when using numbered list

Post by Stefan Kottwitz »

Werner posted a screenshot on the other (above linked site), which shows what I meant above with tabular settings and vertical top alignment:
lyx.png
lyx.png (48.63 KiB) Viewed 4733 times
Stefan
LaTeX.org admin
Post Reply