The figure
environment in the jfm document class does not appear to accept optional positioning arguments. If you include them, they end up typeset as part of the figure.
\documentclass{jfm}
\begin{document}
\begin{figure}[ht]
\rule{4cm}{4cm}
\end{figure}
\end{document}
![figure](https://i.stack.imgur.com/vWmmS.png)
An old set of guidelines for jfm.cls
said the following.
The JFM class will cope with most figure positioning problems and you
should not normally use the optional positional qualifiers 't', 'b',
'h' on the figure environment, as this would override these decisions.
The current version of the guidelines doesn't appear to mention this, but it is noticeable that none of the figures in jfm-instructions.tex uses optional positioning arguments. Therefore it is probably best to avoid them.
There are two issues, it would appear from the OP's comments: 1) insetting an image, and 2) eliminating/masking the transparancy of the inset. I will address the issues in turn:
IMAGE INSET
Here I give two examples using \stackinset
. The first flush to the bottom right corner, and the second with some border. I use \includegraphics
for the images, but tikz
code or similar things can go in their place.
\documentclass{article}
\usepackage{stackengine,graphicx}
\begin{document}
\noindent\stackinset{r}{}{b}{}{\includegraphics[width=2in]{example-image-A}}
{\includegraphics[width=\textwidth]{example-image-B}}\medskip
\noindent\stackinset{r}{15pt}{b}{25pt}{\includegraphics[width=2in]{example-image-A}}
{\includegraphics[width=\textwidth]{example-image-B}}
\end{document}
![enter image description here](https://i.stack.imgur.com/9awNY.jpg)
Here's a version with a white border:
\documentclass{article}
\usepackage{stackengine,graphicx,xcolor}
\begin{document}
\fboxrule=5pt\relax
\fboxsep=0pt\relax
\noindent\stackinset{r}{}{b}{}
{\color{white}\fbox{\includegraphics[width=2in]{example-image-A}}}
{\includegraphics[width=\textwidth]{example-image-B}}\medskip
\end{document}
![enter image description here](https://i.stack.imgur.com/5q5hZ.jpg)
MASKING INSET TRANSPARANCY
To deal with a transparent inset image-A, place it on a white \colorbox
:
\documentclass{article}
\usepackage{stackengine,graphicx,xcolor}
\begin{document}
\fboxrule=5pt\relax
\fboxsep=0pt\relax
\noindent\stackinset{r}{}{b}{}
{\colorbox{white}{\includegraphics[width=2in]{example-image-A}}}
{\includegraphics[width=\textwidth]{example-image-B}}\medskip
\end{document}
Best Answer
These are optional parameters to fine tune the placement of tables and figures, with the following meaning:
h
, heret
, topb
, bottomp
, page of floatand LaTeX will try to honour the placement with respect to the actual place, the top or bottom of the page, or a separate page of floats coming immediately after the present insertion point. For example, when using
ht
LaTeX will try to put the figure at the insertion point, then on the top of the next page if it happens to violate its typesetting rules. You may also force LaTeX to "insist" on these specifications by adding an exclamation mark (!) before the placement parameters, e.g.\begin{figure}[!htb]
.