General ⇒ text on left and graphics(Fig.) image on the right
text on left and graphics(Fig.) image on the right
I use latex to prepare question papers for my class, for geometry i used jpg files (for geometric figs) and then give there path in latex.
The image comes below the question, i always try to get them to the right side of question on the same line, but am unable to do so, can any one show me how to do that.
IT show look some thing like this
show that triangel ABC cong. triangel PQR,
Given that AB is cong. to PQ,~~~~~~~~~~~~~~~~~~~~~~~~Fig. of the questn. should
BC is cong. to QR.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~be here.
angle B is cong. to angle Q
~ in above text means blank space
Pls. help how can i do this, Pls. I use mitex for windows.
Thanks,
Metric.
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
text on left and graphics(Fig.) image on the right
Code: Select all
\documentclass[BCOR13mm,DIV15]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{blindtext}
\parindent0pt
\begin{document}
\blindtext
\medskip
\begin{wrapfigure}{r}{7cm}
\centering
\rule{6.4cm}{3.6cm}
\caption{Dummy figure}\label{fig:dummy}
\end{wrapfigure}
\blindtext
\medskip
\blindtext
\end{document}
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: text on left and graphics(Fig.) image on the right
Thanks for the info., i used the wrap command and was able to get the desired result, however when i used it along with enumerate command and used \item command. am unable to get the desired output.
Pls. assit , in short am unable to use wrapfigure command along with \item command, Pls. can you let me know how to do that.
Thank you,
metrics
text on left and graphics(Fig.) image on the right
Code: Select all
\documentclass{article}
% To get the \captionof command, load
% capt-of or caption
\usepackage{caption}
%\usepackage{capt-of}
\begin{document}
\noindent
\begin{minipage}{0.45\linewidth}
Here we have a list:
\begin{enumerate}
\item One
\item Two
\item Three
\end{enumerate}
\end{minipage}%
\hfill
\begin{minipage}{0.45\linewidth}
\centering
\rule{0.9\linewidth}{0.5\linewidth}
\captionof{figure}{Dummy figure}\label{fig:f1}
\end{minipage}
\bigskip \bigskip
\noindent
\begin{minipage}[t]{0.45\linewidth}
\vspace{0pt}
Here we have a list:
\begin{enumerate}
\item One
\item Two
\item Three
\end{enumerate}
\end{minipage}%
\hfill
\begin{minipage}[t]{0.45\linewidth}
\vspace{0pt}
\centering
\rule{0.9\linewidth}{0.5\linewidth}
\captionof{figure}{Dummy figure}\label{fig:f2}
\end{minipage}
\end{document}
Re: text on left and graphics(Fig.) image on the right
B.A.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
text on left and graphics(Fig.) image on the right
Code: Select all
\documentclass[BCOR13mm,DIV15]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[font=small,labelfont=bf]{caption}
\parindent0pt
\begin{document}
\begin{wrapfigure}[10]{r}{7cm}
\centering
\rule{6.4cm}{3.6cm}
\caption{Dummy figure}\label{fig:dummy}
\end{wrapfigure}
~
\vspace{-\baselineskip}
\begin{enumerate}
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\item The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
\end{enumerate}
\end{document}
As additional alternatives to that given by balf I suggest the floatflt package or the picins package.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: text on left and graphics(Fig.) image on the right
B.A.
text on left and graphics(Fig.) image on the right
Sorry, am unable to get the result i want, below is a sample of the output result i would like to get but am unable to do so even after exprimenting with above code, pls. assist ...Juanjo wrote:Use two parallel minipages:The precise alignment of the minipages depends on their contents.Code: Select all
\documentclass{article} % To get the \captionof command, load % capt-of or caption \usepackage{caption} %\usepackage{capt-of} \begin{document} \noindent \begin{minipage}{0.45\linewidth} Here we have a list: \begin{enumerate} \item One \item Two \item Three \end{enumerate} \end{minipage}% \hfill \begin{minipage}{0.45\linewidth} \centering \rule{0.9\linewidth}{0.5\linewidth} \captionof{figure}{Dummy figure}\label{fig:f1} \end{minipage} \bigskip \bigskip \noindent \begin{minipage}[t]{0.45\linewidth} \vspace{0pt} Here we have a list: \begin{enumerate} \item One \item Two \item Three \end{enumerate} \end{minipage}% \hfill \begin{minipage}[t]{0.45\linewidth} \vspace{0pt} \centering \rule{0.9\linewidth}{0.5\linewidth} \captionof{figure}{Dummy figure}\label{fig:f2} \end{minipage} \end{document}
1) prove that triangle ABC is cong to trian PQR
Given : some given conditions ..... ~~~~~~~~~~~~~~~
............................~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~Fig. for question 1)
.........................
2) prove that some of the measure of a triangle
is 180 degree~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fig. for Q2)
3) Prove that sum of the measure of 2 angles in a
triangle is greater than or equal to 3rd angle~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Fig for Q. 3
text on left and graphics(Fig.) image on the right
1) prove that triangle ABC is cong to trian PQR
Given : some given conditions ..... ~~~~~~~~~~~~~~~
............................~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~Fig. for question 1)
.........................
2) prove that some of the measure of a triangle
is 180 degree~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fig. for Q2)
3) Prove that sum of the measure of 2 angles in a
triangle is greater than or equal to 3rd angle~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Fig for Q. 3
Thanks for devoting the time, i really want to get the output as listed above, thanks for the efforts put in by the forum members.
Pls. help me in letting me knew on how to get the output,
Thanks,
metric
text on left and graphics(Fig.) image on the right
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\usepackage[font=small]{caption}
\begin{document}
\begin{enumerate}
\item
\begin{minipage}[t]{0.45\linewidth}
Prove that triangle $ABC$ is congruent to triangle $PQR$.
Given these conditions blah blah blah.
\end{minipage}%
\hfill
\begin{minipage}[t]{0.45\linewidth}
\centering
\vspace{-1.5ex}
\rule{0.9\linewidth}{0.5\linewidth} %
\captionof{figure}{See triangles $ABC$ and $PQR$}\label{fig:f1}
\end{minipage}
\item
\begin{minipage}[t]{0.45\linewidth}
Prove this and that. Try this and that blah blah blah.
\end{minipage}%
\hfill
\begin{minipage}[t]{0.45\linewidth}
\centering
\vspace{-1.5ex}
\rule{0.9\linewidth}{0.5\linewidth}
\captionof{figure}{This picture exemplifies blah blah}\label{fig:f2}
\end{minipage}
\end{enumerate}
\end{document}