Graphics, Figures & Tablesproblem with image alignment in tables

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
singh.b86
Posts: 2
Joined: Wed Dec 02, 2009 8:41 am

problem with image alignment in tables

Post by singh.b86 »

Hi to all you fellow members and guests.
I am a rookie in TEX and LATEX documentation, still i was asked to work on it and had to do some documentation so i started goin thru TEX, learnt alotta things bout it, and eventually started working on TEX.

i have used MikTEX and TexLIVE for the documentation and i like TexLive more than MikTEX.

i have completed the whole documentation and now im stuck at 2 points and that in tables which is having images.

i have attached the images of those tables, and hence im also copying the code of the respective tables.

code for image 2.jpg(the small table) is as follows
\subsection{\textbf{\underline{Document Conventions}}}

\begin{center}
\begin{longtable}{|p{4cm}|p{10cm}|}
\caption[Document Conventions]{\textbf{Document Conventions}}\\
\hline
\textbf{Icon} & \textbf{Meaning}\\
\hline
\textcolor{blue}{{\underline{Text matter}}} & Click on link to reach target. \\
\hline
\includegraphics[width=5.5mm]{Images/Designer/General/trui_logo} & Note \\
\hline
\includegraphics[width=5.5mm]{Images/Designer/General/settings} & Tip \\
\hline
\end{longtable}
\end{center}

code for image 1.jpg(the long big table) is as follows
\begin{center}
\begin{longtable}{|p{3cm}|p{11cm}|}
\caption[Designer Tool Bar Table]{\textbf{Designer Tool Bar Table}}\\
\hline
\multicolumn{1}{|c|}{\textbf{Plug-in(s)}} &
\multicolumn{1}{c|}{\textbf{Description}} \\
\hline
\endfirsthead
\multicolumn{2}{c}%
{{\bfseries \tablename \thetable{} -- continued from previous page}} \\
\hline
\multicolumn{1}{|c|}{\textbf{Plug-in(s)}} &
\multicolumn{1}{c|}{\textbf{Description}} \\
\hline
\endhead
\hline
\multicolumn{2}{|r|}{{Continued on next page}} \\
\hline
\endfoot
\hline
\endlastfoot
\textit{\textbf{Plug-in(s)}} & \textit{}\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/select_tool} & Selects the Plug-in(s) that are used in the open presentation.\\
\hline
\textbf{\textit{Text}} & \textit{}\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/horizontal_ticker} & Adds a horizontal ticker (scrolling text) to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/rich_text} & Adds a rich-text control to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/vertical_ticker} & Adds a vertical ticker (scrolling text) to the open presentation.\\
\hline
\textbf{\textit{Clock}} & \textit{}\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/analog_clock} & Adds the analog clock to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/digital_clock} & Adds the digital clock to the open presentation.\\
\hline
\textbf{\textit{Shape:}} & \textbf{All shapes can be animated}\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/ellipse_shape} & Adds an ellipse shape to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/line_shape} & Adds a line shape to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/rectangular_shape} & Adds a rectangular shape to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/star_plugin} & Adds a star shape to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/triangle_shape} & Adds a triangular shape to the open presentation.\\
\hline
\textbf{\textit{Media}} & \textit{}\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/image_slideshow} & Adds an image slideshow to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/media_player} & Adds a media player to the open presentation.\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/external_capture} & Adds an external capture source plug-in such as a webcam or a capture card or a TV tuner card onto the presentation.\\
\hline
\textbf{\textit{Live}} & \textbf{}\\
\hline
\includegraphics[width=14mm]{Images/Designer/Plugin_Icons/weather_plugin} & Adds a weather plug-in to the presentation which is customizable as per the users preference.\\
\hline
\end{longtable}
\end{center}

now the problem is that the images are sticking to the upper margin of the row in which they are placed and text starts from the point where the lower end of the image is.

so i need your help in how to go about rectifying the problem that i am facing.

i am really counting on you guys.

please dont lemme down

thanks

waitin for positive replies

tc godblss all :)
Attachments
2.jpg
2.jpg (15.79 KiB) Viewed 2103 times
1.jpg
1.jpg (68.66 KiB) Viewed 2103 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

yago
Posts: 29
Joined: Sat Dec 13, 2008 6:40 pm

Re: problem with image alignment in tables

Post by yago »

Try using \usepackage{array} in your preamble, and changing all p{...cm} for m{...cm}
singh.b86
Posts: 2
Joined: Wed Dec 02, 2009 8:41 am

Re: problem with image alignment in tables

Post by singh.b86 »

hey yago, thanx alot for the help.
i tried doing what u asked me to do, i quite didnt understand what the package array does, i didnt see any change as such or may be i didnt closely notice it.
and secondly i did change all my p{...cm} to m{...cm}, that helped in the alignment of my text in the table but the images are still touching the upper margin of the row where it is placed.
does the original image size play a role in the placement of the image?
original size of all the images is 127x127 pixels and images are in png format.

lookin forward to get some help as im completly helpless... :cry:
Post Reply