TeX - LaTeX Asked by shamalaia on December 27, 2020
I want to add an image in a text with the following code:
documentclass[english]{article}
usepackage{babel}
usepackage{graphicx}
newcommand*lavanda{vcenter{hbox{includegraphics[height=5cm,width=1.5cm,angle=-60]{lavande_col}}}}
begin{document}
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA qquad qquad qquad$lavanda$
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
end{document}
The result is this:
I would like to force the text to follow the contour of the image. So that I would have: (i) the same interspace before and after the image; and (ii) the text not stopping at the border of the image but at the border of the drawing.
And yeah… Unfortunately I do not know how to do that. Can someone help, please?
It is very easy with the insbox
plain macro-package: it defines an InsertBoxR
command, to be used before a paragraph. It takes two mandatory arguments: the number of untouched lines before the insertion, and the inserted object, and one optional argument: the number of supplementary shorter lines, in case TeX doesn't make a correct computation of the necessary line.
There's like wise an InsertBoxL
command.
documentclass[12pt]{article}
usepackage{lipsum}
usepackage{graphicx}
input{insbox}
makeatletter
@InsertBoxMargin=1.5ex
makeatother
begin{document}
InsertBoxR{3}{includegraphics{lavender-drawing}}[1]
lipsum[1-3]
end{document}
Correct answer by Bernard on December 27, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP