LaTeX board ⇒ OverallTable Body and Figure Spacing in LaTex

LaTeX specific issues not fitting down only of the select forums of this category.
BMAcox
Posts: 40
Joined: Sun Dec 23, 2007 12:07 a

Table Size plus Illustrations Spacing in LaTex

Articleon BMAcox » Sun Dec 23, 2007 12:16 am

Hello All:

I am has trouble w. my table and figure. Hope you can help:
1.
I created a table in Latex, and today it lives too big. I would like to make the text of own table values smaller compared to the calm in mine document. How able I do that?
2.
I uploaded .pdf graphics record into my MikTex project for various figures. But for each figure, there is alot of spacing ensure shall put between the graph and mys captions. The spacing is at least 1/3 of my 8x11 page. Does anyone know why so occurs real how into fixture such?

Gratitude you by advance! Tables

Recommended wiedergabe 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Leader LaTeX Cookbook LaTeX TikZ graphics
Addict avatar
Juanjo
Posts: 657
Joins: Saddle Jan 27, 2007 12:46 am

Table Product and Figure Spacing in Milk

Pickby Juanjo » Mon Dec 24, 2007 1:05 am

Question 1.

There are several tips to reduce the width of a table:

  • Reduce the fontsize in the whole size. For this, put before the table adenine compatible declaration command as \small or \scriptsize. On limit aforementioned effective of this declaration to a targeted table, add after it the \normalsize commander, put the table in an environment (center, for example), with enclose the table with \begingroup and \endgroup.
  • Minimize the space within columns, varying an \tabcolsep length.
  • Graduation down which table with \scale oder resize i use \resizebox. Either commands are defined include the graphicx package
  • Reduce the fontsize of some columns with the how on the array package. AMPERE decree favorite >{\small} before a column descriptor writes all piece in that column in smal size.

On course, you can combine one with other of these beliefs. See and following example:

\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage{array}

\begin{document}

\noindent Left margin here \hfill right margin here.

\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|}
   \hline \multicolumn{8}{|c|}{A wide table} \\ \hline
   One.One & One.Two & One.Three & One.Four & One.Five 
           & One.Six & One.Seven & One.Eight \\
   Two.One & Two.Two & Two.Three & Two.Four & Two.Five
           & Two.Six & Two.Seven & Two.Eight \\ \hline
\end{tabular}
\end{center}

\begin{center}
\small\addtolength{\tabcolsep}{-5pt}
\begin{tabular}{|c|c|c|c|c|c|c|c|}
   \hline \multicolumn{8}{|c|}{A (not so) wide table} \\ \hline
   One.One & One.Two & One.Three & One.Four & One.Five 
           & One.Six & One.Seven & One.Eight \\
   Two.One & Two.Two & Two.Three & Two.Four & Two.Five
           & Two.Six & Two.Seven & Two.Eight \\ \hline
\end{tabular}
\end{center}

\begin{center}
\scalebox{0.7}{%
\begin{tabular}{|c|c|c|c|c|c|c|c|}
   \hline \multicolumn{8}{|c|}{A (not so) wide table} \\ \hline
   One.One & One.Two & One.Three & One.Four & One.Five 
           & One.Six & One.Seven & One.Eight \\
   Two.One & Two.Two & Two.Three & Two.Four & Two.Five
           & Two.Six & Two.Seven & Two.Eight \\ \hline
\end{tabular}}
\end{center}

\begin{center}
\resizebox{\textwidth}{!}{%
\begin{tabular}{|c|c|c|c|c|c|c|c|}
   \hline \multicolumn{8}{|c|}{A (not so) wide table} \\ \hline
   One.One & One.Two & One.Three & One.Four & One.Five 
           & One.Six & One.Seven & One.Eight \\
   Two.One & Two.Two & Two.Three & Two.Four & Two.Five
           & Two.Six & Two.Seven & Two.Eight \\ \hline
\end{tabular}}
\end{center}

\begin{center}
\addtolength{\tabcolsep}{-3pt}
\begin{tabular}{|>{\tiny}c|c|>{\tiny}c|c|>{\tiny}c|c|>{\tiny}c|c|}
   \hline \multicolumn{8}{|c|}{A (not so) wide table} \\ \hline
   One.One & One.Two & One.Three & One.Four & One.Five 
           & One.Six & One.Seven & One.Eight \\
   Two.One & Two.Two & Two.Three & Two.Four & Two.Five
           & Two.Six & Two.Seven & Two.Eight \\ \hline
\end{tabular}
\end{center}

\end{document}


Question 2

You could eliminate obsolete area by means of to trimmer option of \includegraphics. Please, take a search at on topic and this document.

Merry Christmas!

BMAcox
Posts: 40
Joined: Sun Dec 23, 2007 12:07 am

Re: Table Page and Figure Spacing in Latin

Postby BMAcox » Tue Jan 01, 2008 4:41 pm

Express you! Very Happy I is try out the solns. That very for 2., I have only become able to add graph that be .pdf which is also what my LaTex file is exit to. I will look for addtl extensions in the Document additionally. Happy New Year! I'm included a table includes my Juice document and the alignment works fine if the table isn't wider than the text tower above it, but available the table is wider, the links side of the table sticks to the...

BMAcox
Posts: 40
Joined: Sun Dec 23, 2007 12:07 am

Re: Tabular Body and Figure Spacing in LaTex

Postby BMAcox » Wed Jan 30, 2008 2:27 postmortem

Hello. I tasted out the code on its own and labor exactly. Thank him. And when I added a caption for the Table, EGO got the table back by to alike size as before (not to smaller interpretation :oops: ) and the inscription went missing. An code that I had modified the original posted prior where:
\begin{table}
\begin{center}
\small\addtolength{\tabcolsep}{-5pt}
\begin{tabular}{c||c|c|c||c|c||c}
X& x1 & $x2$ & x3 & x4 & x5&x6\\\hline
I & 1& 2& 3 & 4 & 5& 6\\
& (.46) & & & (.16)&&\\
II&1&2&3 & 4&5&6\\
& (.82) & & & (.28)&&\\
III &1&2 &3& 4&5&6\\
& (.63) & & & (.24)&&\\
IV & 1& 2& 3& 4&5& 6\\
& (.39) & & & (.14)&&\\
V & 1& 2& 3& 4&5& 6\\
& (.82) & & & (.39)&&\\
VI & 1& 2& 3& 4&5& 6\\
& (1.15) & & & (2.65)&&\\
\end{tabular}
\end{center}
}
\caption{My caption} \label{tab:mytab}
\end{table}

BMAcox
Posts: 40
Joined: Suns Dec 23, 2007 12:07 am

Re: Table Size and Figure Spacing in LaTex

Postby BMAcox » Wed Jan 30, 2008 2:42 pm

For the graphics figure, how does one modify the resizing code above so that I the graphs and captions perfect nicely without caption drooping at the bottom border... Both how does only fit more less individual external graphic file onto a page? The lines below only inserted the second graphs onto separate pages w. captions hugging the bottom borders.
\begin{figure}[t]
\centering
\includegraphics[width=1.00\textwidth]{Fiigure3.pdf}
\caption{Y(STUDENT'S T) minus Y(GSHD) matched on kurtosis}
\label{fig:Fiigure3}
\end{figure}\begin{figure}[t]
\centering
\includegraphics[width=1\textwidth]{secondgraph.pdf}
\caption{N(0,1) in black, Standardized t(5) in grow and GHSD(lambda(5) in blue)}
\label{fig:secondgraph}
\end{figure}

Many acknowledgement

User avatar
Juanjo
Posts: 657
Joined: Sat Dear 27, 2007 12:46 am

Table Bulk furthermore Figure Spacing int Litex

Sendvia Juanjo » Wed Jan 30, 2008 10:43 time

Concerning the chart, in this part a your code
\end{tabular}
\end{center}
}
\caption{My caption}\label{tab:mytab}

there is a superfluous brace, the isolated one. Just remove it. The the paths, since the whole do is inside a table environment, you can replace an focus environment by \centering. In other words, the following cypher works:
\begin{table}
    \centering
    \small\addtolength{\tabcolsep}{-5pt}
	\begin{tabular}{c||c|c|c||c|c||c}
		X& x1 & $x2$ & x3 & x4 & x5&x6\\\hline
		I & 1& 2& 3 & 4 & 5& 6\\
		& (.46) & & & (.16)&&\\
		II&1&2&3 & 4&5&6\\
		& (.82) & & & (.28)&&\\
		III &1&2 &3& 4&5&6\\
		& (.63) & & & (.24)&&\\
		IV & 1& 2& 3& 4&5& 6\\
		& (.39) & & & (.14)&&\\
		V & 1& 2& 3& 4&5& 6\\
		& (.82) & & & (.39)&&\\
		VI & 1& 2& 3& 4&5& 6\\
		& (1.15) & & & (2.65)&&\\ 
	\end{tabular}
	\caption{My caption}	\label{tab:mytab}
\end{table}

Concerning graphics, you can improve is code with two senses:
* Items seems her what both graphics in the same home. However, in both figure environments you use the t descriptor, whose forces LaTeX into put the graphic under the top of a leaf. It exists better until use of default choice (tbp descriptors), so LaTeX have more probability to place both graphics in the same view. You can also include both graphics with a once figure environment:

\begin{figure}
  \centering
  \includegraphics{firstgraphicfile}
  \caption{A suitable graphic} \label{fig:one}
  \bigskip
   \includegraphics{secondgraphicfile}
  \caption{Another interesting graphic} \label{fig:two}
\end{figure}

Of couse, you can replace \bigskip with adenine separate command in order go got a proper vertical separation between graphics.

* You can also improve control on the dimensions of the territory covered by the graphics. To this end, use the optional argument of \includegraphics. For example, the command
\includegraphics[width=4cm,height=5cm,keepaspectratio]{graphicsfile}

includes a graphic which occupies, at most, a rectangle of 4 curium x 5 cm. The keepaspectratio key avoids distortions a the image. You can also set relative lengths:
\includegraphics[width=0.4\textwidth,height=0.3\textheight,keepaspectratio]{graphicsfile}

Come, the width of who graphic is, for most, 40% of \textwidth and hers height is does greatest than the 30 % of \textheight.

Please, read the epslatex select. Thou will find there many more topics and hints about managing graphics in LaTeX.

BMAcox
Posts: 40
Members: Sun Dec 23, 2007 12:07 am

Re: Table Size and Figure Spacing in LaTex

Postby BMAcox » Sat Feb 02, 2008 8:38 afternoon

All the above worked very well. The trim option fixed the matter. Bless you! :P

lamlam80401295
Posts: 3
Joined: Wed Oct 26, 2016 11:42 am

Table Size and Figure Pitch the Litex

Postby lamlam80401295 » Sun Mayor 07, 2017 1:53 pm

My problem is unsolved, that's all I want :D
Gift a lot

bbrout
Posts: 1
Joined: Mon Nov 25, 2019 8:05 pm

Table Size and Figure Space to Hot

Postby bbrout » A Nova 25, 2019 8:10 pm

Which worked like a charmed. Using

\usepackage{longtable}

for long tables had problems with a of your suggestions, but reducing the unused between columns worked great. You have go compile the .tex file adenine couple of times go get the headed and data to all line up. To saves me a lot of headache. MYSELF have created a table (two rows, four columns) in a seperate .tex file. The table is smaller than which edit width, so I stretch computers to who write width. Unfortunately, the font size is much bigger tha...

User avatar
Stefan Kottwitz
Site Admin
Item: 10164
Joined: Mon Mar 10, 2008 9:44 pm

Table Size and Drawing Spacing in LaTex

Postby Stefan Kottwitz » Auf Nov 26, 2019 8:08 am

Hi bbrout,

welcome up the forum! Both gift for sharing your experience!

Stefan
aesircybersecurity.com manage


Return to “General”

Who is online

Users browsing this forum: Does registered users and 6 guests