Graphics, Figures & Tablesplacing figures with wrapfigure

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

placing figures with wrapfigure

Post by dmuthu_cse »

hello friends,

i would like to know where i can use wrap figure.

Is it possible to use wrapfigure, in the right side of environments like itemize and tabbing..

if so please give me an example.. For me, i am able to wrap figures in a full fledged text area.

But it does not allow me to do so in a tabbing area. i wanted a the image on the right side of my problem solution.. i am attaching the code herewith

Code: Select all

\documentclass[10.5pt,english]{book}
\usepackage{fancybox,array,amsmath}
\usepackage[  centering,
  headheight=14pt,
  headsep=10pt,
  includehead,
  papersize={7in,9.5in},
  text={6in,8in},
  dvips=false,
  pdftex=false,
  vtex=false]{geometry}
\usepackage[cam,a4,center,dvips]{crop}
\usepackage{graphicx,colortbl,wrapfig,babel}

\begin{document}

\thispagestyle{empty}

\section*{} \vspace{-47pt}
\begin{enumerate}
\item \begin{enumerate}
\item [a)]\textbf{What is a node?} 
\item [b)]\textbf{What is your inference if the global stiffness matrix is observed to be singular matrix?}\\

a) A node is a point at which the field variable is unknown and to be determined.\\
b) If the body is not constrained, the stiffness matrix becomes singular.
\end{enumerate}\vspace{10pt}
\item \textbf{In terms of natural coordinates, write the expressions for shape functions of one dimensional linear element.}
\begin{wrapfigure}[6]{r}{100mm}
\centering
\includegraphics{SQA-1.eps}
\caption{}
\end{wrapfigure}

\textit{Shape functions:}
\begin{tabbing}
\hspace{10mm} \= ${{N}_{i}}=\displaystyle \frac{1-\xi }{2}$ \hspace{50mm} i want to place the image here\\
\> ${{N}_{j}}=\displaystyle \frac{1+\xi }{2}$
\end{tabbing}

Where $\xi$ is a natural coordinate. \vspace{10pt}
\end{enumerate}
\end{document}
I have mentioned "where i want the picture" n the attached pdf.
Thanks in advance..

Regards,
Muthu
Attachments
k.pdf
(45.11 KiB) Downloaded 352 times

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

placing figures with wrapfigure

Post by gmedina »

Hi,

from wrapfig.sty:
package documentation wrote:
- You must not specify a wrapfigure in any type of list environment or
or immediately before or immediately after one. It is OK to follow
a list if there is a blank line ("\par") in between.
I would suggest you to use a tabular environment instead of a tabbing one, and to use the \multirow command from the multirow package, as the following example suggests:

Code: Select all

\documentclass{book}
\usepackage{array,amsmath}
\usepackage{multirow}

\begin{document}

\begin{tabular}{@{\hspace{10mm}}l@{\hspace{50mm}}c}
  ${{N}_{i}}=\displaystyle \frac{1-\xi }{2}$ & \multirow{2}{*}{\rule{4cm}{1cm}}\\
  ${{N}_{j}}=\displaystyle \frac{1+\xi }{2}$ &
\end{tabular}

\end{document}
Remarks: 1) of course, in my example I only loaded the packages that are needed to compile my code; you can use your complete preamble (by the way, 10.5pt is not a valid class option and you can safely remove it).
2) I used a \rule command to simulate an actual image making the code compilable for everyone. You can, of course use in its stead the \includegraphics command to include your image.
3) Feel free to modify my example according to your needs.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply