将图片包裹在文本右侧

将图片包裹在文本右侧

我想将图像与右侧的文本一起包裹起来。现在它出现在文本下方。任何帮助都非常感谢。

\documentclass[12 pt]{article}
\usepackage[margin=.5in]{geometry}               
\geometry{letterpaper}                   
\usepackage{graphicx}
\usepackage{amsmath, amssymb, amsfonts}
\usepackage{epstopdf}
\usepackage{geometry}
\usepackage{enumerate}
\usepackage{bbm}
\usepackage{relsize}
\usepackage{textcomp}
\usepackage{tcolorbox}
\usepackage{wrapfig}
\usepackage{lipsum} 

\geometry{%
  letterpaper,
  lmargin=1 cm,
  rmargin=1 cm,
  tmargin=1 cm,
  bmargin=1 cm,
  footskip=20 pt,
  headheight=12pt}



\begin{document}


\begin{center}
    \textbf{Continued Fraction}
\end{center}


This is a very efficient method of finding the best rational approximations of a real number. Continued fractions are written as fractions within fractions which are added up in a special way, and which may go on indefinitely. Every number can be written as a continued fraction and the finite continued fractions are sometimes used to give approximations to numbers like $\sqrt{2}$ and $\pi$.

\medskip
\noindent
\textbf{Applications.} 

\begin{enumerate}
    \item Design of a calendar : A year is the orbital period of the earth moving in its orbit  around the Sun.  For an observer on Earth, this corresponds to the period it takes to the Sun to complete one rotation, which is approximately 365.2422 days whose continued fraction expression is 
            $$365.2422=[365,4,7,1,3,4,1]~.$$         
The second convergent is  $\displaystyle{365.25=365+\frac{1}{4}}$, which means a calendar of 365 days per year but a leap year every 4 years. The fourth convergent gives a better approximation
$$365.2424 \dots  =[ 365,4,7,1 ]= 365+\frac{8}{33}~.$$ 
%\begin{wrapfigure}{R}{5.5cm}
%\caption{A wrapped figure going nicely inside the text.}\label{wrap-fig:1}
%\includegraphics[width=8.6cm]{Greg.jpg}
%\end{wrapfigure}
The most commonly used civil calendar today is known as the \textbf{Gregorian calendar}, which is also called the Western calendar, or the Christian calendar. This calendar was named after Pope Gregory XIII, who introduced it in 1582. Today, the Gregorian calendar is part of our everyday lives, and most of us use it without really knowing its backstory, the reasons for its introduction, and the effects that it had on the world.

\begin{center}
   \includegraphics[width=84 mm, height=64 mm]{Greg.jpg}
\end{center}

This is based on a cycle of 400 years: there is one leap year every year which is a multiple of 4 but not of 100 unless it is a multiple of 400. 


\item Design of a planetarium : Christiaan Huygens (1629–1695) among being a mathematician was an astronomer, 
physicist, probabilist, and was also a great horologist. He
designed more accurate clocks then the ones available at his time. In particular, his invention of the pendulum clock was a breakthrough in timekeeping. Huygens also built a mechanical model of the solar system. He wanted to design the gear ratios in order to produce a proper scaled version of the planetary orbits. He knew that the time required for the planet Saturn to orbit around the Sun is about

\end{enumerate}

\end{document}

答案1

wrapfig使用常用的软件包( 、 )无法在列表环境附近插入图像floatflt。这里有一个解决方案,使用普通的 TeX 宏包insbox,结合enumitem,比 更强大enumerate。特别是,您可以设置列表的右边距,然后停止列表,然后恢复它,继续从上一个列表的值开始计数,使用不同的右边距(并根据需要更改其他参数)。

无关:我简化了你的序言,删除了重复的包加载。

\documentclass[12 pt]{article}
\usepackage{geometry}
\geometry{%
  letterpaper,
  margin=1 cm,
  footskip=20 pt,
  headheight=12pt}
\usepackage[demo]{graphicx}
\usepackage{epstopdf}
\usepackage[shortlabels]{enumitem}
\usepackage{amsmath, amssymb}
\usepackage{relsize}
\usepackage{textcomp}
\usepackage{tcolorbox}

\input{insbox}

\begin{document}

\begin{center}
    \textbf{Continued Fraction}
\end{center}

This is a very efficient method of finding the best rational approximations of a real number. Continued fractions are written as fractions within fractions which are added up in a special way, and which may go on indefinitely. Every number can be written as a continued fraction and the finite continued fractions are sometimes used to give approximations to numbers like $\sqrt{2}$ and $\pi$.
\bigskip

\InsertBoxR{1}{\raisebox{0pt}[\dimexpr\height+2.5ex]{\includegraphics[width=84 mm, height=64 mm]{Greg.jpg}}}
\noindent
\textbf{Applications.}
\begin{enumerate}[rightmargin=88mm]
    \item Design of a calendar : A year is the orbital period of the earth moving in its orbit around the Sun. For an observer on Earth, this corresponds to the period it takes to the Sun to complete one rotation, which is approximately 365.2422 days whose continued fraction expression is
            $$365.2422=[365,4,7,1,3,4,1]~.$$
The second convergent is $\displaystyle{365.25=365+\frac{1}{4}}$, which means a calendar of 365 days per year but a leap year every 4 years. The fourth convergent gives a better approximation
\[ 365.2424 \dots =[ 365,4,7,1 ]= 365+\frac{8}{33}~. \]
\end{enumerate}
\begin{enumerate}[resume]
\item[]
The most commonly used civil calendar today is known as the \textbf{Gregorian calendar}, which is also called the Western calendar, or the Christian calendar. This calendar was named after Pope Gregory XIII, who introduced it in 1582. Today, the Gregorian calendar is part of our everyday lives, and most of us use it without really knowing its backstory, the reasons for its introduction, and the effects that it had on the world.

This is based on a cycle of 400 years: there is one leap year every year which is a multiple of 4 but not of 100 unless it is a multiple of 400.

\item Design of a planetarium : Christiaan Huygens (1629–1695) among being a mathematician was an astronomer,
physicist, probabilist, and was also a great horologist. He
designed more accurate clocks then the ones available at his time. In particular, his invention of the pendulum clock was a breakthrough in timekeeping. Huygens also built a mechanical model of the solar system. He wanted to design the gear ratios in order to produce a proper scaled version of the planetary orbits. He knew that the time required for the planet Saturn to orbit around the Sun is about

\end{enumerate}

\end{document} 

在此处输入图片描述

相关内容