LaTeX/C3/Wrap-Text-Around-an-Image/English
Title of the script: Wrap Text Around an Image.
Authors: Ambika Vanchinathan
Keywords: LaTeX, wrapfig, wrapfigure, text wrapping, figure placement, floating figures, video tutorial.
| Visual Cue | Narration |
| Slide 1
Title Slide |
Welcome to this spoken tutorial on Wrap Text Around an Image. |
| Slide 2
Learning Objectives |
In this tutorial, we will learn how to
|
| Slide 3
System Requirements To record this tutorial, I am using:
|
To record this tutorial, I am using the following setup. |
| Slide 4
Pre-requisites |
To follow this tutorial, learners should have basic knowledge of LaTeX |
| Slide 5:
Code files The following code files are required to practice this tutorial: 1. wrapfig-eg.tex 2. Free-Stock-Photos.jpg These files are provided in the Code Files link of this tutorial page |
The following code files are required to practice this tutorial.
These files are provided in the Code Files link of this tutorial page. |
| Let us get started | |
| Highlight :
\usepackage{wrapfig} \usepackage{graphicx} |
The wrapfig package allows text to wrap around the figures.
We load the graphicx package to include images in our document. |
| Click the green Typeset button
Show the output |
Click the green Typeset button to run the code.
Output shows images placed normally with some white space around them. Let us see wrapping text around the figures. |
| Uncomment the lines 12, 14, 35, 41
Run the code Show the output |
Uncomment the lines 12, 14, 35, and 41
Run the code. We see the text wrapped around the figures Let us see how the code works. |
| Highlight :
lines 12 to 14 |
The environment wrapfigure is used to wrap the text around the figure.
Wrapfigure environment has 2 arguments in line 12. The argument {r} next to wrapfigure is used to position the figure to the right. Next argument {.4\textwidth} specifies the allotted width for the figure. The text will be wrapped around this width. Note that \includegraphics command is inside the wrapfigure environment. |
| Highlight :
lines 35, 39, 41 |
Here {L} positions the figure to the left side.
Width is .6\textwidth. The output shows one figure on the right and the other on the left side. |
| Let us see the width specifications in detail. | |
| Comment the line 35
Uncomment the line 36 Run the code and show the output |
Comment line 35.
Uncomment line 36. Run the code Here is the output of the code. We see some white space to the right of the second figure. |
| Highlight:
line 36, 39 |
Here the width of the actual figure (.6\textwidth) is much smaller than the allotted wrapfigure width (.8\textwidth).
So, we see the white space |
| Comment the line 36
Uncomment the line 37 Run the code and show the output |
Comment the line 36
Uncomment line 37. Run the code. Output shows, figure is overwritten by text. |
| Highlight:
line 37, 39 click the typeset button and show the output |
Here the width of the actual figure (.6\textwidth) is bigger than the allotted wrap figure width (.4\textwidth).
So we get the undesirable output. It is important to allocate proper space for wrapping based on the figure’s width. |
| Slide 6
Summary In this tutorial, we have learnt how to:
|
With this we come to the end of this tutorial.
Let us summarise. |
| Slide 7
Assignment |
As an Assignment
|
| Slide 8
Thank you |
Thank you for joining |