A necessary update is made since texlive version 2018
In memoir
class and for a two columns document the \marginparmargin{placement}
has no effect on notes created with \marginpar
so we use the \marginnote
command from the marginnote
package .
\documentclass[twoside,twocolumn,openright]{memoir}
\usepackage{kantlipsum,xcolor}
\usepackage{marginnote} % <-------------
\setmarginnotes{1cm}{4cm}{0mm}
\settypeblocksize{20cm}{14cm}{*}
\setlrmargins{6cm}{*}{*}
% Fix the margin to the left
\checkandfixthelayout
\setlength{\evensidemargin}{\oddsidemargin}
\newcommand*{\redtext}{\textcolor{red}{margin note inserted here}}
\marginparmargin{left} % <--------------
\begin{document}
\redtext
%
\marginnote{I'd like this to be on the left, and it is.}
\kant[1-3]
\redtext
\marginnote{I'd like this to be on the left as well, but it's not!}
\kant[4-5]
\redtext
\marginnote{I'd like this to be on the left, and it is.}
\kant[6]
\redtext
\marginnote{I'd like this to be on the left as well, but it's not!}
\kant[7]
\end{document}
The following is only relevant for texlive version up to 2017
However for a two columns two sided document if we use \marginparmargin{left}
we get all the odd page margin notes positioned on the left side while all the even page margin notes are positioned on the right side regardless from which column the \marginnote
is called and vice versa if we use \marginparmargin{right}
.
So we have to use \marginparmargin{left}
for odd pages and \marginparmargin{right}
for even pages
Therfore the solution could be to define a
\newcommand*{\mymarginpar}[1]{
\checkoddpage
\ifoddpage
\marginparmargin{left}
\else
\marginparmargin{right}
\fi
\marginnote{#1}}
The MWE for texlive version up to 2017
\documentclass[twoside,twocolumn,openright]{memoir}
\usepackage{kantlipsum,xcolor}
\usepackage{marginnote} % <-------------
\setmarginnotes{1cm}{4cm}{0mm}
\settypeblocksize{20cm}{14cm}{*}
\setlrmargins{6cm}{*}{*}
% Fix the margin to the left
\checkandfixthelayout
\setlength{\evensidemargin}{\oddsidemargin}
\newcommand*{\mymarginpar}[1]{ % <----------
\checkoddpage
\ifoddpage
\marginparmargin{left}
\else
\marginparmargin{right}
\fi
\marginnote{#1}
}
\newcommand*{\redtext}{\textcolor{red}{margin note inserted here}}
\begin{document}
\redtext
%
\mymarginpar{I'd like this to be on the left, and it is.}
\kant[1-3]
\redtext
\mymarginpar{I'd like this to be on the left as well, but it's not!}
\kant[4-5]
\redtext
\mymarginpar{I'd like this to be on the left, and it is.}
\kant[6]
\redtext
\mymarginpar{I'd like this to be on the left as well, but it's not!}
\kant[7]
\end{document}
odd page
even page
Best Answer
As tohecz mentions in his comment, you can use
\marginpar
for your purpose; using\captionof
(from thecaption
orcapt-of
packages) you can provide the captions.In the code above I used the
\reversemarginpar
command and thegeometry
package to customize the page layout in order to obtain the result shown in the original question (images in the left margin for odd-numbered pages and images in the right margin for even-numbered pages). Those settings are, of course, optional.