## LaTeX forum ⇒ LyX ⇒ table inserted through code tex does not appear in the next page

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
poofidoudou
Posts: 1
Joined: Mon Aug 07, 2017 12:59 pm

### table inserted through code tex does not appear in the next page

Hello everyone,
I am using Lyx to write my master thesis. I insert lot of tables with code tex for example in page 2.
The problem is that the table appears in page 5 or 6 and not in page 3.
Does S.O has the solution ?
Thank you

Tags:

thomasb
Posts: 76
Joined: Thu Aug 03, 2017 10:54 am
Location: france
Try to code the document yourself...
In handmaid Latex, the ! option forces the figure "here" :

1. \documentclass{article}
2. \usepackage{graphicx}
3.
4. \begin{document}
5.
6. \listoffigures
7.
8. \begin{figure}[!h] % "!h" means "absolutely here"
9. \centering
10. \includegraphics{Tux.png}
11. \caption{Tux, le pingouin}
12. \label{Tux}
13. \end{figure}
14.
15. \end{document}

It should be the same for tables. Do you have access to the code generated by Lyx ?

Stefan Kottwitz
Posts: 8544
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Welcome to the forum!

There are float options (for figures and tables that you can set. Have a look at this settings window:

lyx-table-float.png (27.5 KiB) Viewed 198 times

Click "Here Definitely" as last option, bur better click everything except that, allowing all possible placement for optimal page breaks and nearest positioning.

Thomas: "!" is a code for "relaxed" positioning, with less typographic restrictions. So !h means "here, take it easy". But the best is "!htbp" for "here, top, bottom, or float page, take it easy" that gets vey flexible near placement and keeps good page filling for good page breaks.

Stefan