figura não aparece

figura não aparece

Tenho esse código abaixo, que é o MWE. Basta usar qualquer imagem para ex.png

Eu tenho 2 perguntas:

Como posso adicionar legendas com numeração automática porque não consigo fazer funcionar?

Como posso fazer com que as figuras flutuem em vez de colocá-las manualmente?

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{newspaper}


\date{\today}
\currentvolume{1}
\currentissue{3}

%% [LianTze] The newspaper package also provides 
%% these commands to set various metadata:

%% The banner headline on the first page
%%   (The colon after s: is to get a more
%%   modern majuscule s in this font instead of 
%%   the medieval tall s. For anyone interested 
%%   in the history: 
%%  http://medievalwriting.50megs.com/scripts/letters/historys.htm)
\SetPaperName{The Report}

%% The name used in the running header after
%% the first page
\SetHeaderName{The Report}

%% and also...
\SetPaperLocation{\raisebox{-0.5\height}}
\SetPaperSlogan{``example''}
\SetPaperPrice{4\%}


% [LianTze] times (the package not the font) is rather outdated now; use newtx (see later)
% \usepackage{times}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{hyperref}
\usepackage{picinpar}
%uasage of picinpar:
%\begin{window}[1,l,\includegraphics{},caption]xxxxx\end{window}


%% [LianTze] Contains some modifications
\usepackage{newspaper-mod}
%%... so now you can redefine the headline and byline style if you want to.
%% These can be issued just before any
%% byline or headline in the paper, to
%% individually style each article
%%
% \renewcommand{\headlinestyle}{\itshape\Large\lsstyle}
% \renewcommand{\bylinestyle}{\bfseries\Large\raggedright}


%%%%%%%%%  Front matter   %%%%%%%%%%

\usepackage{lipsum}

\begin{document}
\maketitle

\begin{multicols}{2}

\byline{Abstract}{A.D}


\lipsum[1-3]



\headline{ex}




\begin{window}[2,r,\includegraphics[width=3.5in]
{ex.png},\centering{Fig. 1: Example.}]  
\end{window}





\closearticle

\end{multicols}

\end{document}

informação relacionada