1

enter image description hereI'm trying to insert an image into a 2 column page, and yet no matter what I try the text of the paragraph immediately following the image starts at the same line as the top of the image, outside the margins, resulting in a ridiculous look: enter image description here The code is:

\begin{wrapfigure}{l}{1.0\linewidth}
\frame{\includegraphics[keepaspectratio=true, width=1.0\linewidth]{./Stack.png}}
\caption{TCP/IP and Application stacks} 
\label{fig:Architecture}
\end{wrapfigure}

If anyone has any ideas that would be great, I've exhausted google.

I've also provided a screenshot of a test doc showing the lack of rendering.

genysis
  • 11
  • 2
    you should never use wrapfig with more than about .5\linewidth (and so rarely use it in 2-column documents where the linewidth is small) it is for making small cutouts which insert an image within the paragraph block. – David Carlisle Jun 28 '18 at 09:23
  • Thanks Zarko, I'm a complete noob to Latex but loving it compared to Word. Thanks for your comment David, I'll make the necessary adjustments. – genysis Jun 28 '18 at 18:41

2 Answers2

1

if i understood you correctly, than you looking for

\begin{figure}[htb]
\frame{\includegraphics[width=1.0\linewidth]{./Stack.png}}
\caption{TCP/IP and Application stacks} 
\label{fig:Architecture}
\end{figure}

which gives something like this:

enter image description here

note: wrapfigure is designed for including image in part of column, i.e. that text can be around that image.

i haven't you image, so i use demo option for graphicx.also didn't provide complete small document since you not provide any information about yours.

Zarko
  • 296,517
  • Thanks Zarko, tbh I'm suspecting the LNCS template I'm using (downloaded direct from the Springer site and unfortunately a requirement for the conference paper I'm writing) hates me, as I tried your fix and the image disappeared. If the deadline wasn't so close I;d start again as ShareLatex has some templates. it's been a good learning experience :-) – genysis Jun 28 '18 at 18:46
  • I've found defining the graphics path ib the headers and using: \includegraphics[width=0.8\columnwidth]{./Stack} worked in terms of inserting the image and it showing, although it's without a figure label - the \begin{figure} is the element that's broken. – genysis Jun 28 '18 at 19:10
  • @genysis, sorry, i don't understand you. in all document classes figure works. if you like to receive more help, you should in question provide mwe (minimal working example): complete but small document beginning with \documentclass{...} and ending with \end{document}, which show your problem. for text in document use dummy text generated by package lipsum. – Zarko Jun 28 '18 at 19:38
  • I'm not saying you're wrong. nor your example was incorrect, so my apologies if it seemed that was the case. No, all I'm saying is that for reasons best known to the compiler, when I build the document using the \figure{} approach the image disappears from the document - there are no errors thrown by the compiler. – genysis Jun 29 '18 at 09:38
  • I know there's a way to markdown but I don't know how to do it, but here're my headers: \documentclass[runningheads,a4paper]{llncs}
    \usepackage{amssymb}
    \setcounter{tocdepth}{3}
    \usepackage{graphicx}
    \graphicspath{ {./llncs2e/} }
    \usepackage{url}
    \usepackage{multicol}
    \usepackage{wrapfig}
    \usepackage{float}
    \usepackage[margin=0.5in]{geometry}
    
    
    \newcommand{\keywords}[1]{\par\addvspace\baselineskip
    \noindent\keywordname\enspace\ignorespaces#1}
    
    \begin{document}
    
    – genysis Jun 29 '18 at 09:39
  • I've added a screenshot of a text example showing the problem with the \begin{figure} – genysis Jun 29 '18 at 10:00
  • and on my example if I take multicols off then image reappears. – genysis Jun 29 '18 at 10:09
  • @genysis, let me repeat again. your images and code snippet doesn't provide (by edit your question) necessary information, what you doing. please provide mwe (minimal working example): complete but small document beginning with \documentclass{...} and ending with \end{document}, which we can copy and compile in our computers and see your problem. all other discussions don't lead to a usable result. – Zarko Jun 29 '18 at 10:23
0

I found the answer here: Insert figure in a multicol article whereby using \begin{figure}[H] enabled the figure to be rendered in a multicol environment and stopped the clash with the float package.

Thanks for everyone's help, it was great to be able to ask questions.

genysis
  • 11