0

I'm using the KOMA-SCRIPT class for my two-column journal article, and I'm struggling to place a figure where it should be (near its explanation).

I tried the {figure*}[option] environment with \twocolumn option with [h], [t], [htbp], etc. ''options'' to span the figure to all the two columns and place them where they should be. Nothing worked. However, the compiler threw the figures far away from where they needed to be placed. Also, I tried [H] of "float," which also did not work out..!

I also tried \includegraphics with the \captionof command outside the floats. but they placed the figure to span for a single column with more or less required placement.

I tried to use the {minipage} environment, that also places the figure within a single column.

If I use the "multicol" package and use the {minipage} or {figure} outside the {multicols}{} environment, then it gives improper/unusual/unconventional continuity for the text content, (i.e., for ex. the column will break at half a page and continue to the next column. and the content of the next {multicols} will be placed below both the above columns. which is improper and unconventional).

So, please help me to solve this issue. So that I can place the figure where it should be (near its explanation and at the top of the page) by spanning (spreading) all the two columns.

Certainly, How to correctly use fullwidth in a two column document? has answers to similar issues but which exclusively addressed text thing. where the proper/conventional content continuity will be lost. whereas this issue is exclusively related to the pictures, tables, and graphs kind of stuff, where conventional content continuity (i.e. if the picture is placed in between sections, the text content stopped above the picture should continue from below the picture with the same column if the picture placed in between the page or from next column if the picture placed at the topside of the page) is necessary.

MWE:

\documentclass[DIV=12, a4paper,twocolumn, headsepline=true, fontsize=11.0pt]{scrartcl}
%\usepackage[a4paper,left=0.6in,right=0.5in,top=0.4in,bottom=0.2in, includehead,includefoot]{geometry}
\usepackage{geometry}  \geometry{a4paper,left=0.6in,right=0.5in,top=0.4in,bottom=0.2in, includehead, includefoot, footskip=\dimexpr\footheight+2mm\relax,    bottom=\baselineskip,  headsep=\dimexpr\footheight+2mm\relax,  heightrounded}

\usepackage[english]{babel}
\usepackage[babel]{microtype}
\usepackage[babel, english, german=guillemets]{csquotes}

\usepackage[table, dvipsnames]{xcolor} 

\usepackage{makecell}

\usepackage[version=4]{mhchem} 
%\usepackage{multicol}

\usepackage{float}
\usepackage{amsmath,graphicx} %eps figures can be used instead
\usepackage{lastpage}
\usepackage[format=plain,justification=raggedright,singlelinecheck=false,font=small,labelfont=bf,labelsep=space]{caption}

\usepackage{incgraph, subcaption, lipsum}
\usepackage{newtx}
\usepackage[T1]{fontenc}

\begin{document}
\lipsum[1-9]
\begin{figure*}[htbp]
    \includegraphics[width=0.8\textwidth]{example-image}
\end{figure*}
\lipsum[1]
\end{document}

in this example, I need the figure on the second page, but it has gone to the third one (though here we can do that by playing with the order of lipsum), that is to say how to do this without using the floats.

4
  • 1
    LaTeX's twocolumn mode does only support placement options t and p and not before the next page. With stfloats also b can be used. float does not support column spanning floats. Using multicol for a column-spanning forced here placement is usual and the result is the one I would also prefer. In my answer to the duplicate question, I've shown how to do it manually, if you really, really want it.
    – cabohah
    Commented Jun 14 at 17:30
  • And once again. Please show a minimal working example. And “Nothing worked” is not a sufficient description. What does not work? What should be different?
    – cabohah
    Commented Jun 14 at 17:35
  • Another related question: Using figure* moves image to a new page in a 2-column document. Is there a way to prevent it? and the questions linked there.
    – cabohah
    Commented Jun 14 at 17:36
  • 1
    It's hard to tell without code, but "the compiler threw the figures far away" sounds like you didn't use p, but the picture was big enough that tex would only place it on a p page. In that case, tex delays the picture until you get to a \clearpage at the end of the chapter or document.
    – Teepeemm
    Commented Jun 14 at 18:03

1 Answer 1

2

Your example results in two pages only and the figure is shown at the top of the second page:

Result of the original example from the question

So your “I need the figure on the second page, but it has gone to the third one” cannot be reproduced or the shown result is already the wanted.

Apart from that, all the facts are actually already listed and explained in my answer to the question linked in your question, the questions linked there, the question also linked as an alternative in the comments and some additional questions. Nevertheless, I will summarize them again below:

  • LaTeX's twocolumn mode does only support placement options t and p for column spanning floats like figure* or table*. Such floats are not printed before the next page. So if you need the table* or figure* at page n, search a place at page n-1, where you can move it in the source → Barbara's answer to the already linked question. And also best is, to remove the [htbp] or any other optional floating argument from figure* and table*.

  • With package stfloats resp. package dblfloatfix also b is supported and sometimes column spanning floats can even be printed on the same page, where they occur in the source code. See the stfloats manual for more information about the limitations. → My answer to the question linked in your question.

  • Neither LaTeX itself nor any package support h for column spanning floats. → The comments and answers to several questions, e.g., David's comment here and Frank's explanation.

  • Package float does not support column spanning non-floats (option H). → Table disappears when using [H]

  • Package multicol can be used to start and stop multiple columns in one page. So you can stop the multiple columns, print a non-floating figure or image within the current one-column mode and restart multiple columns below. With this solution there are the average problems using non-floating large boxes, e.g., underfull \hbox, too early page breaks etc.

  • Placing column spanning material in two-column mode manually would be possible, but is not easy and every change can force to start the whole manual adding of empty vertical spaces again. → The last example in my answer to the already linked question.

    Note: A non-floating figure or table, e.g., using KOMA-Script's figure- or table- environment or using a minipage and \captionof (see also the KOMA-Script classes or package caption) does not really differ from text. Just replace the content of the addmargin environment. Users of other classes can use package scrextend to get the addmargin environment (or replace it, by a combination of \makebox and minipage). However, due to the huge amount of work and all the associated problems, this possibility is considered more of a theoretical option. Its use is only realistic in rare cases, for example for very few pages with very few cross-column figures or tables.

  • There is also a package midfloat in the sttools collection. But this package can fail with LaTeX Error: Strip needs more place!. In my tests this always happens, when used on the first page. It also can fail with LaTeX Error: Strip is used only on left column!. This happens if the strip environment is placed in source, when LaTeX already has build the left column. So if it happens, you should move the strip environment in the source code. However in some cases like the following one, it works and is more or less successful.

    \documentclass[twocolumn,headsepline=true]{scrartcl}
    \usepackage[left=0.6in,right=0.5in,top=0.4in,bottom=0.2in, includehead, includefoot, footskip=\dimexpr\footheight+2mm\relax,    bottom=\baselineskip,  headsep=\dimexpr\footheight+2mm\relax,  heightrounded]{geometry}
    
    \usepackage[english]{babel}
    \usepackage[babel]{microtype}
    
    \usepackage{midfloat}
    \usepackage{mwe}
    \usepackage{newtx}
    \usepackage[T1]{fontenc}
    
    \begin{document}
    \lipsum[1-11]
    \begin{strip}
      \includegraphics[width=0.8\textwidth]{example-image}
      %\captionof{figure}{Figure titles are possible, too}
    \end{strip}
    \lipsum[1-3]
    \end{document}
    

    using package midfloat

    Note: I was not able to automatically continue the second column at the same vertical position used at the first column):

    Note: I've minimized your preamble by removing all not used packages and not needed options. And I've added extra text before the image, because it does not work with the image either initialized in a right column or on the first page.

  • As an alternative to midfloat also package cuted can be used. Here the continue of the columns seems to be better aligned, but IMHO the splitting in the second column of this example is too early and there can be strange stretches of vertical spaces:

    \documentclass[a4paper,twocolumn,headsepline=true,fontsize=11.0pt]{scrartcl}
    \usepackage[left=0.6in,right=0.5in,top=0.4in,bottom=0.2in, includehead, includefoot, footskip=\dimexpr\footheight+2mm\relax,    bottom=\baselineskip,  headsep=\dimexpr\footheight+2mm\relax,  heightrounded]{geometry}
    
    \usepackage[english]{babel}
    \usepackage[babel]{microtype}
    
    \usepackage{cuted}
    \usepackage{mwe}
    \usepackage{lipsum}
    \usepackage{newtx}
    \usepackage[T1]{fontenc}
    
    \begin{document}
    \lipsum[1-11]
    \begin{strip}
      \includegraphics[width=0.8\textwidth]{example-image}
    %  \captionof{figure}{Figure titles can be used, took}
    \end{strip}
    \lipsum[1-3]
    \end{document}
    

    with cuted

    This package also works in the first column of the first page, but the result at least in this example is still not the best:

    \documentclass[a4paper,twocolumn,headsepline=true,fontsize=11.0pt]{scrartcl}
    \usepackage[left=0.6in,right=0.5in,top=0.4in,bottom=0.2in, includehead, includefoot, footskip=\dimexpr\footheight+2mm\relax,    bottom=\baselineskip,  headsep=\dimexpr\footheight+2mm\relax,  heightrounded]{geometry}
    
    \usepackage[english]{babel}
    \usepackage[babel]{microtype}
    
    \usepackage{cuted}
    \usepackage{mwe}
    \usepackage{lipsum}
    \usepackage{newtx}
    \usepackage[T1]{fontenc}
    
    \begin{document}
    \lipsum[1-3]
    \begin{strip}
      \includegraphics[width=0.8\textwidth]{example-image}
    %  \captionof{figure}{Figure titles can be used, took}
    \end{strip}
    \lipsum[1-11]
    \end{document}
    

    enter image description here

    But the package provides several options to influence the result. So maybe with some effort the result can be improved.

  • Last but not least package flowfram can be used. But it is very special and there are also some limitations, because you first have to define the columns as frames on pages and then use them. → Three-columns text with figures of 2\columnwidth.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .