I would like to expect the below output in my LaTeX.
The figure
caption should be place in the bottom of the figure
. The text should be plurred
with opacity
. How do achieve this?
My MWE is:
\documentclass{book}
\usepackage{graphics}
\usepackage{caption}
\DeclareCaptionFormat{overlay}{\gdef\capoverlay{#1#2#3\par}}
\DeclareCaptionStyle{overlay}{format=overlay}
\begin{document}
\begin{figure*}
\includegraphics{example-image-a}
\caption{Many of the simple rexpressions in algebra can be thought of interms of the areas of rectangles.}
\end{figure*}
\end{document}
Best Answer
I suggest the following:
This is realized using the
tcolorbox
package:I made a macro
\mygraphics
which takes two mandatory parameters: the name of the image file and the caption text. Further, a key list can be given as optional parameter. The keys can be anytcolorbox
keys. The image is made afloat*
as was given by the OP.In this application, the following options are especially interesting:
width
to set the width of the image (shown in the example code). The default is the complete text width.caption color
to set the background color of the caption (show in the example code). The default is white.floatplacement
to set the float options likehtb
etc.Update:
To scale the figure according to the natural size of included image, the
hbox
option can be added. But, many pictures may become larger than the textwidth. However, to give options to the underlying\includegraphics
macro, you can usegraphics options
if needed.The following code has the
hbox
option set as default. Also, the second example shows how to put ascale=0.5
option to a picture: