Graphics, Figures & TablesTable layout

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
vbenitocoelho
Posts: 4
Joined: Tue Jul 15, 2014 10:14 am

Table layout

Post by vbenitocoelho »

Hello people,

I am really sorry to bother you with this stupid question. I am really new in this.

I have this code and I don't know how to center this table.

\documentclass[10pt,a4paper]{article}


\begin{document}


\begin{table}[htbp]
\centering%
\caption{}
\begin{tabular}{rrrrrrrrrrrr}{>{\centering}p{10cm}}

Periodo & FC & EDPR\textbackslash{}\_FS & Telvent & Vector & GarradHassan & MetOffice & MeteoGroup & Tier & MeteoLogica & GWC & Registros(\textbackslash{}\%) \\
\hline
20140101 & 7 & NA & 102.5 & 65.7 & 60.5 & 95.4 & 54.0 & 64.9 & 54.4 & 57.3 & 1.00 \\
20140108 & 25 & NA & 81.1 & 52.1 & 51.0 & 51.6 & 49.7 & 49.4 & 45.2 & 43.5 & 1.00 \\
20140115 & 18 & NA & 103.6 & 53.9 & 55.7 & 66.3 & 51.0 & 55.0 & 58.4 & 54.2 & 1.00 \\
20140122 & 42 & NA & 19.6 & 21.7 & 18.3 & 22.7 & 14.9 & 19.8 & 17.8 & 18.6 & 1.00 \\
20140129 & 32 & NA & 45.3 & 43.7 & 46.7 & 71.8 & 44.8 & 58.0 & 51.8 & 54.4 & 1.00 \\
20140205 & 16 & NA & 56.7 & 74.9 & 41.3 & 52.3 & 47.9 & 49.7 & 38.4 & 50.3 & 1.00 \\
20140212 & 10 & NA & 136.6 & 99.6 & 102.8 & 83.9 & 118.8 & 97.1 & 97.4 & 67.9 & 1.00 \\
20140219 & 23 & NA & 60.5 & 56.5 & 42.0 & 51.3 & 44.7 & 45.0 & 44.4 & 44.8 & 1.00 \\
20140226 & 17 & 71.1 & 67.0 & 87.9 & 72.0 & 70.1 & 56.0 & 66.1 & 61.8 & 47.9 & 1.00 \\
20140305 & 48 & 27.1 & 44.8 & 30.2 & 26.5 & 36.4 & 20.5 & 27.3 & 21.2 & 29.3 & 1.00 \\
20140312 & 41 & 42.6 & 49.1 & 40.6 & 46.8 & 44.2 & 40.9 & 45.7 & 36.4 & 35.1 & 1.00 \\
20140319 & 29 & 42.2 & 46.2 & 37.6 & 47.6 & 41.9 & 46.4 & 38.5 & 40.3 & 48.4 & 1.00 \\
20140326 & 10 & 101.5 & 149.9 & 116.1 & 105.8 & 105.5 & 109.4 & 96.9 & 109.9 & 78.9 & 1.00 \\
20140402 & 31 & 29.9 & 37.0 & 31.7 & 31.3 & 32.0 & 26.8 & 23.5 & 25.7 & 22.7 & 1.00 \\
20140409 & 14 & 54.0 & 66.1 & 61.1 & 62.0 & 70.2 & 60.7 & 68.1 & 59.4 & 47.3 & 1.00 \\
20140416 & 26 & 41.1 & 52.7 & 40.7 & 39.4 & 45.7 & 37.5 & 42.6 & 33.9 & 29.7 & 1.00 \\
20140423 & 21 & 36.2 & 47.6 & 57.5 & 41.7 & 46.8 & 36.6 & 42.4 & 41.5 & 38.8 & 1.00 \\
20140430 & 16 & 56.5 & 55.4 & 74.7 & 61.4 & 63.6 & 50.0 & 60.5 & 54.6 & 49.7 & 1.00 \\
20140507 & 18 & 49.5 & 51.2 & 50.8 & 50.5 & 50.4 & 42.0 & 48.8 & 48.5 & 44.4 & 1.00 \\
20140514 & 16 & 63.9 & 116.0 & 68.8 & 62.7 & 83.0 & 80.0 & 65.3 & 63.7 & 54.3 & 1.00 \\
20140521 & 5 & 87.5 & 141.8 & 144.7 & 91.8 & 110.2 & 84.5 & 95.8 & 101.6 & 84.8 & 1.00 \\
20140528 & 12 & 97.7 & 82.5 & 101.3 & 66.2 & 85.6 & 83.2 & 90.7 & 65.2 & 74.3 & 0.86 \\
20140604 & 25 & 50.5 & 68.1 & 47.2 & 44.3 & 46.8 & 47.8 & 44.9 & 44.2 & 41.4 & 1.00 \\
20140611 & 9 & 91.4 & 91.2 & 99.0 & 64.7 & 67.3 & 69.5 & 68.5 & 73.5 & 68.4 & 1.00 \\
20140618 & 22 & 62.8 & 73.8 & 67.3 & 45.1 & 48.5 & 48.6 & 50.5 & 43.9 & 49.0 & 1.00 \\
20140625 & 20 & 56.0 & 61.8 & 61.3 & 44.1 & 53.2 & 47.6 & 56.1 & 45.5 & 50.1 & 1.00 \\
20140702 & 12 & 62.1 & 59.5 & 49.0 & 53.3 & 71.0 & 63.1 & 51.2 & 46.5 & 55.7 & 1.00 \\
20140709 & 22 & 39.7 & 44.1 & 55.3 & 41.4 & 47.1 & 44.5 & 41.7 & 44.1 & 46.8 & 0.71 \\
\hline

\end{tabular}%
\label{tab:addlabel}%
\end{table}%


\end{document}





Could you help me on this please? I have tried yo look in other topics but it was usefull.

:roll: :roll: :roll:

thank you very much

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Table layout

Post by Johannes_B »

There are no stupid questions. Your table is simply to wide for the page. I wanted to know how wide and turned it (using sidewaystable). It is still too wide.

Code: Select all

\documentclass[10pt,a4paper]{article}
\usepackage{showframe}
\usepackage{rotating}
\begin{document}

\begin{sidewaystable}
%\begin{table}[htbp]
\centering%
\caption{}
\begin{tabular}{rrrrrrrrrrrr}%{>{\centering}p{10cm}}
Periodo & FC & EDPR\textbackslash{}\_FS & Telvent & Vector & GarradHassan & MetOffice & MeteoGroup & Tier & MeteoLogica & GWC & Registros(\textbackslash{}\%) \\
\hline
20140101 & 7 & NA & 102.5 & 65.7 & 60.5 & 95.4 & 54.0 & 64.9 & 54.4 & 57.3 & 1.00 \\
20140108 & 25 & NA & 81.1 & 52.1 & 51.0 & 51.6 & 49.7 & 49.4 & 45.2 & 43.5 & 1.00 \\
20140115 & 18 & NA & 103.6 & 53.9 & 55.7 & 66.3 & 51.0 & 55.0 & 58.4 & 54.2 & 1.00 \\
20140122 & 42 & NA & 19.6 & 21.7 & 18.3 & 22.7 & 14.9 & 19.8 & 17.8 & 18.6 & 1.00 \\
20140129 & 32 & NA & 45.3 & 43.7 & 46.7 & 71.8 & 44.8 & 58.0 & 51.8 & 54.4 & 1.00 \\
20140205 & 16 & NA & 56.7 & 74.9 & 41.3 & 52.3 & 47.9 & 49.7 & 38.4 & 50.3 & 1.00 \\
20140212 & 10 & NA & 136.6 & 99.6 & 102.8 & 83.9 & 118.8 & 97.1 & 97.4 & 67.9 & 1.00 \\
20140219 & 23 & NA & 60.5 & 56.5 & 42.0 & 51.3 & 44.7 & 45.0 & 44.4 & 44.8 & 1.00 \\
20140226 & 17 & 71.1 & 67.0 & 87.9 & 72.0 & 70.1 & 56.0 & 66.1 & 61.8 & 47.9 & 1.00 \\
20140305 & 48 & 27.1 & 44.8 & 30.2 & 26.5 & 36.4 & 20.5 & 27.3 & 21.2 & 29.3 & 1.00 \\
20140312 & 41 & 42.6 & 49.1 & 40.6 & 46.8 & 44.2 & 40.9 & 45.7 & 36.4 & 35.1 & 1.00 \\
20140319 & 29 & 42.2 & 46.2 & 37.6 & 47.6 & 41.9 & 46.4 & 38.5 & 40.3 & 48.4 & 1.00 \\
20140326 & 10 & 101.5 & 149.9 & 116.1 & 105.8 & 105.5 & 109.4 & 96.9 & 109.9 & 78.9 & 1.00 \\
20140402 & 31 & 29.9 & 37.0 & 31.7 & 31.3 & 32.0 & 26.8 & 23.5 & 25.7 & 22.7 & 1.00 \\
20140409 & 14 & 54.0 & 66.1 & 61.1 & 62.0 & 70.2 & 60.7 & 68.1 & 59.4 & 47.3 & 1.00 \\
20140416 & 26 & 41.1 & 52.7 & 40.7 & 39.4 & 45.7 & 37.5 & 42.6 & 33.9 & 29.7 & 1.00 \\
20140423 & 21 & 36.2 & 47.6 & 57.5 & 41.7 & 46.8 & 36.6 & 42.4 & 41.5 & 38.8 & 1.00 \\
20140430 & 16 & 56.5 & 55.4 & 74.7 & 61.4 & 63.6 & 50.0 & 60.5 & 54.6 & 49.7 & 1.00 \\
20140507 & 18 & 49.5 & 51.2 & 50.8 & 50.5 & 50.4 & 42.0 & 48.8 & 48.5 & 44.4 & 1.00 \\
20140514 & 16 & 63.9 & 116.0 & 68.8 & 62.7 & 83.0 & 80.0 & 65.3 & 63.7 & 54.3 & 1.00 \\
20140521 & 5 & 87.5 & 141.8 & 144.7 & 91.8 & 110.2 & 84.5 & 95.8 & 101.6 & 84.8 & 1.00 \\
20140528 & 12 & 97.7 & 82.5 & 101.3 & 66.2 & 85.6 & 83.2 & 90.7 & 65.2 & 74.3 & 0.86 \\
20140604 & 25 & 50.5 & 68.1 & 47.2 & 44.3 & 46.8 & 47.8 & 44.9 & 44.2 & 41.4 & 1.00 \\
20140611 & 9 & 91.4 & 91.2 & 99.0 & 64.7 & 67.3 & 69.5 & 68.5 & 73.5 & 68.4 & 1.00 \\
20140618 & 22 & 62.8 & 73.8 & 67.3 & 45.1 & 48.5 & 48.6 & 50.5 & 43.9 & 49.0 & 1.00 \\
20140625 & 20 & 56.0 & 61.8 & 61.3 & 44.1 & 53.2 & 47.6 & 56.1 & 45.5 & 50.1 & 1.00 \\
20140702 & 12 & 62.1 & 59.5 & 49.0 & 53.3 & 71.0 & 63.1 & 51.2 & 46.5 & 55.7 & 1.00 \\
20140709 & 22 & 39.7 & 44.1 & 55.3 & 41.4 & 47.1 & 44.5 & 41.7 & 44.1 & 46.8 & 0.71 \\
\hline
\end{tabular}%
\label{tab:addlabel}%
%\end{table}%
\end{sidewaystable}
\end{document}
Hint: Click on »Open in WriteLaTeX« to see the output.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
vbenitocoelho
Posts: 4
Joined: Tue Jul 15, 2014 10:14 am

Re: Table layout

Post by vbenitocoelho »

Is that posible to do it in several pages with this page orientation?

thank you
vbenitocoelho
Posts: 4
Joined: Tue Jul 15, 2014 10:14 am

Re: Table layout

Post by vbenitocoelho »

Or to reduce even more the the size of this table....


thank you
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Table layout

Post by Johannes_B »

A very simple approach: Use \small after caption. This reduces the font size and hence the tabular material.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply