0

I insert a table command between two itemized items, but the table appears at the top of the page. please help me locate this at the right place it means to be. thank you.

Ardalan

  • 2
    if the table is part of the list just use tabular. You have probably surrounded it by table but the only purpose of that environment is to take its content out of the document flow and allow it to be re-inserted elsewhere to help with page breaking. – David Carlisle Jan 19 '21 at 14:43
  • Thank you very much David Carlisle, I changed it to tabular and error resolved. can I use caption for tabular either? it shows errors for that line: \caption{*} – Ardalan Marandi Jan 19 '21 at 17:59
  • using \begin{table}[h!], I was able to solve this problem, but what does [h!] mean? – Ardalan Marandi Jan 19 '21 at 18:46
  • [ht!] is the wrong answer although it may work in some cases. It means the table is removed from the document flow but may be added where it is in the source (h) or top of a later page (t latex may warn that it is adding this) the ! means to ignore the constraints set to enforce good typesetting. – David Carlisle Jan 19 '21 at 19:00
  • Thank you so much David, I learn so much from you. how can I solve this then? I can't make caption to tabular only. – Ardalan Marandi Jan 20 '21 at 08:57
  • arguably the reason for having a caption is because the table floats and you should reference it by "as seen in table \ref{zzz}" rather than assuming the table is immediately following teh text, but other wise you can use captionof or the [H] otption see https://tex.stackexchange.com/questions/8625/force-figure-placement-in-text – David Carlisle Jan 20 '21 at 09:13

0 Answers0