0

I have a twocolumn document with a large marginpar on right side. When I am including marginfigure it works correctly if it is in the right column. But if it is in the left column, the margin figure is pushed in the left side margin left and is not visible completely. How can I force the marginfigure to be in the marginpar from both the columns? Same issue is with the marginnote and sidenote as well.

I tried looking at a similar question with memoir class but no solution there.

marginfigure pushed to left margin

correct marginfigure

MWE

\documentclass[11pt,twocolumn,a4paper,landscape,twoside=semi]{scrbook}
\setlength{\columnsep}{25pt}
\usepackage{geometry}

\geometry{top=15mm,bottom=25mm, textheight=195mm, headsep=5mm, left=15mm, right=85mm, textwidth=100mm, marginpar=70mm,marginparsep=5mm}

\usepackage{graphicx} \usepackage{multicol}

\usepackage{sidenotes}

\usepackage{lipsum}

\usepackage{showframe}

\begin{document}

\begin{marginfigure} \centering \includegraphics[width=\textwidth]{ske.jpg} \caption{a figure} \end{marginfigure}

\lipsum

\lipsum[1-2]

\begin{marginfigure}%[!ht] \centering \includegraphics[width=\textwidth]{ske.jpg} \caption{a figure} \end{marginfigure}

\end{document}

Damitr
  • 1,889

1 Answers1

1

It's not ideal, but it might help you out. With the textpos package.

    \documentclass[11pt,twocolumn,a4paper,landscape,twoside=semi]{scrbook}
    \setlength{\columnsep}{25pt}
    %https://tex.stackexchange.com/questions/641760/issue-with-marginfigure-in-twocolumn-document/641859#641859
    \usepackage{geometry} 
    \geometry{top=15mm,bottom=25mm, textheight=195mm, headsep=5mm, left=15mm, right=85mm, textwidth=100mm, marginpar=70mm,marginparsep=5mm}                   
    \usepackage{graphicx}
    \usepackage{sidenotes}
    \usepackage{lipsum}
    \usepackage{showframe}
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %\usepackage[absolute,showboxes]{textpos}<--- for the test
    \usepackage[absolute]{textpos}
\textblockorigin{217mm}{15mm}%217&lt;---297mm-70mm-10mm?
\newcommand{\placemarge}[3]{%
% 3.8 per test
    \begin{textblock}{3.8}(0,#3)% postion absolue
        \centering
        \begin{figure}
            \includegraphics[width=70mm]{#1}
            \caption{#2}             
        \end{figure}
\end{textblock}
}

\begin{document}
\placemarge{example-image-a.jpg}{a figure A}{0} 
\lipsum
\placemarge{example-image-b.jpg}{a figure B}{1}
\lipsum[1-2]
\placemarge{example-image-c.jpg}{a figure C}{6} 
\end{document}

enter image description here

pascal974
  • 4,652