Skip to main content

The table environment



The tabular environment doesn't cover all that you need to do with tables. For example, you might want a caption for your table. For this and other reasons, you should typically place your tabular environment inside a table environment:


\begin{table}
  \caption{Performance at peak F-measure}
  \begin{tabular}{| r | r || c | c | c |}


      ...


  \end{tabular}
\end{table}


Why do the two different environments exist? Think of it this way: The tabular environment is concerned with arranging elements in a tabular grid, while the table environment represents the table more conceptually. This explains why it isn't tabular but table that provides for captioning (because the caption isn't displayed in the grid-like layout).


A table environment has a lot of similarities with a figure environment, in the way the "floating" is handled etc. For instance you can specify its placement in the page with the option [placement], the valid values are any combination of (order is not important):
h where the table is declared (here)
t at the top of the page
b at the bottom of the page
p on a dedicated page of floats
! override the default float restrictions. E.g., the maximum size allowed of a b float is normally quite small; if you want a large one, you need this ! parameter as well.


The default is [tbp]. If you want to place a table in the place where it's declared, do not just write [h]; if the table cannot fit (because the text is near the bottom of the page, say) it will float to a dedicated page of floats (as if it were a p float) which can be some distance away in the document. A good rule of thumb is to always use htbp until the document is finished, at which stage the final float parameters can be fine-tuned.


The table environment is also useful when you want to have a list of tables at the beginning or end of your document with the command \listoftables; it enables making cross-references to the table with:


You may refer to table~\ref{my_table} for an example.


...


\begin{table}
  \begin{tabular}
     ...
  \end{tabular}
  \caption{An example of table}
  \label{my_table}
\end{table}


Comments

Popular posts from this blog

CKA Simulator Kubernetes 1.22

  https://killer.sh Pre Setup Once you've gained access to your terminal it might be wise to spend ~1 minute to setup your environment. You could set these: alias k = kubectl                         # will already be pre-configured export do = "--dry-run=client -o yaml"     # k get pod x $do export now = "--force --grace-period 0"   # k delete pod x $now Vim To make vim use 2 spaces for a tab edit ~/.vimrc to contain: set tabstop=2 set expandtab set shiftwidth=2 More setup suggestions are in the tips section .     Question 1 | Contexts Task weight: 1%   You have access to multiple clusters from your main terminal through kubectl contexts. Write all those context names into /opt/course/1/contexts . Next write a command to display the current context into /opt/course/1/context_default_kubectl.sh , the command should use kubectl . Finally write a second command doing the same thing into ...

OWASP Top 10 Threats and Mitigations Exam - Single Select

Last updated 4 Aug 11 Course Title: OWASP Top 10 Threats and Mitigation Exam Questions - Single Select 1) Which of the following consequences is most likely to occur due to an injection attack? Spoofing Cross-site request forgery Denial of service   Correct Insecure direct object references 2) Your application is created using a language that does not support a clear distinction between code and data. Which vulnerability is most likely to occur in your application? Injection   Correct Insecure direct object references Failure to restrict URL access Insufficient transport layer protection 3) Which of the following scenarios is most likely to cause an injection attack? Unvalidated input is embedded in an instruction stream.   Correct Unvalidated input can be distinguished from valid instructions. A Web application does not validate a client’s access to a resource. A Web action performs an operation on behalf of the user without checkin...