0

I use a memoir class to write my thesis, and i don't know why i write all my text using the twoside option.

Now i need oneside option to print - yes, this is a silly situation :( - for impression, and all my margin settings are broken.

I want the same assymmetric page for all recto printed page, with sidecaption to the right for each page.

enter image description here

About \sidecapmargin Memoir class say that :

the \sidecapmargin command controls the margin where the sidecaption will be placed. The possible values for margin are one of: left , right , inner , or outer . If left or right is specified the caption will go into the left or right margin. If inner or outer is specified then in a two sided document the caption will be on different sides of the typeblock according to whether it is a recto or verso page; in a one sided document the caption margin is fixed. The left margin is the default.

Using a class document with oneside, i want the sidecaption go to the right (and default is left as the manual of memoir say).

The \overridescapmargin{ right } work for only ONE sidecaption at a time. How can i automatize this to all sidecaption, because \sidecapmargin{} command is desactivated in oneside option.

% !TEX encoding =  UTF-8 Unicode
% -*- program: xelatex -*-
\documentclass[a4paper, 11pt,oneside, openright]{memoir}
\usepackage{polyglossia}
\setdefaultlanguage{french}
\usepackage{graphicx}
\usepackage[protrusion=true,final]{microtype}
%\usepackage[hang]{footmisc}
\usepackage{mwe} % just for dummy images
\usepackage{lipsum}

\checkandfixthelayout %or perhaps \checkandfixthelayout[lines]
\setlength{\evensidemargin}{\oddsidemargin}% after \checkandfix......

\raggedbottom
\enlargethispage{\baselineskip}


% SIDE CAPTION 
\newsubfloat{figure}{}
\newsubfloat{table}{}

\loosesubcaptions

\setsidecappos{t}

\strictpagecheck

\setsecnumdepth{paragraph}

\pagestyle{ruled}

\begin{document}

\frontmatter

\cleardoublepage

\chapterstyle{bringhurst}

\tableofcontents

\mainmatter
\chapter{my first chapter}

\lipsum

\begin{figure}[htbp]
  \overridescapmargin{right}
  \begin{sidecaption}[fortoc]{this is a very long comment on the margin this is a very long comment on the margin this is a very long comment on the margin
  this is a very long comment on the margin this is a very long comment on the margin this is a very long comment on the margin}[fig:S_VV1]
    \centering
   \includegraphics[]{example-image-c}
    \end{sidecaption}
\end{figure}

\lipsum  

\begin{figure}[htbp]
  \overridescapmargin{right}
  \begin{sidecaption}[fortoc]{this is a very long comment on the margin this is a very long comment on the margin this is a very long comment on the margin this is a very long comment on the margin this is a very long comment on the margin  this is a very long comment on the margin}[fig:S_VV2]
    \centering
   \includegraphics[width=.9\linewidth]{example-image-b}
    \end{sidecaption}
\end{figure}

\lipsum

\begin{figure}[htbp]
  \overridescapmargin{right}
  \begin{sidecaption}[fortoc]{this is a very long comment on the margin this is a very long comment on the margin this is a very long comment on the margin
  this is a very long comment on the margin  this is a very long comment on the margin  this is a very long comment on the margin}[fig:S_VV3]
    \centering
   \includegraphics[]{example-image-b}
    \end{sidecaption}
\end{figure}


\chapter{my second chapter}
\lipsum    

\begin{figure}[htbp]
  \begin{sidecaption}[fortoc]{this is a very long comment on the margin this is a very long comment on the margin  this is a very long comment on the margin this is a very long comment on the margin this is a very long comment on the margin}[fig:S_VV4]
    \centering
   \includegraphics[]{example-image-a}
    \end{sidecaption}
\end{figure}

\lipsum    

\listoftables

\listoffigures

\appendix
\appendixpage

\chapter{my first appendix}
\lipsum    

\chapter{my second appendix}
\lipsum    

\end{document}

What i want in the MWE :

enter image description here

  • Why do you need the oneside option for print? This makes all pages have a the oddpage layout. Oneside has nothing to do with whether or not you print single or double sided. – daleif Aug 7 '15 at 20:20
  • Because of the binding ? And because my margin are not the same for each page on recto printing ? I want symetric layout but not the oddpage :) – reyman64 Aug 7 '15 at 20:28
  • I still do not understand what it is you want. – daleif Aug 7 '15 at 20:38
  • updated with image, hope that help – reyman64 Aug 7 '15 at 20:45
  • 1
    "I want less space on the inner margin, more on the outer margin, with symmetric page like any thesis printed only in recto." -- what total margins do you want on each side (including binding), and how wide should the side captions be? Not sure how to reconcile less/more space on each margin with symmetric pages. – Mike Renfro Aug 8 '15 at 16:56
0
+100

There is a logical error in the oneside placement part.

This works better

\makeatletter
\renewcommand*{\m@mscapcheckregside}{%
    \if@twoside
      \checkoddpage
      \ifnum\m@mscapmarg<\@ne%      % left
        \scapmarglefttrue
      \else
        \ifnum\m@mscapmarg=\@ne%    % right
          \scapmargleftfalse
        \else
          \ifnum\m@mscapmarg=\tw@%  % outer
            \scapmarglefttrue
            \ifoddpage
              \scapmargleftfalse
            \fi
          \else%                  % inner
            \scapmargleftfalse
            \ifoddpage
              \scapmarglefttrue
            \fi
          \fi
        \fi
      \fi
    \else%     oneside
    % left and inner should be the same
    % right and outer should be the same
    \ifcase\m@mscapmarg\relax% 0
      \scapmarglefttrue
    \or% 1
      \scapmargleftfalse
    \or% 2
      \scapmargleftfalse
    \or% 3
      \scapmarglefttrue
    \fi
\fi}

\makeatother

In oneside we set left=inner and right=outer. The version in current memoir sets left=right and inner=outer.

It will be fixed in the next release.

  • Great news :) Is there a way to give more space to the right outer margin for sidecaption ? (for example like in two side ) – reyman64 Aug 10 '15 at 7:48
  • Not understood. You can just set \sidecapwidth – daleif Aug 10 '15 at 8:21
  • Using \setlength\sidecapwidth{<length of your choice>} i suppose, but how can i get the outer margin correct <length> ? Like the image – reyman64 Aug 10 '15 at 9:10
  • You cannot. The side caption is placed in the margin regardless of the size of the image. Other packages may provide similar functionality and does this differently. A better solution is on my TODO list, but is not going to be added any time soon. – daleif Aug 10 '15 at 10:14
  • Using your hack plus \checkandfixthelayout and \setlength{\evensidemargin}{\oddsidemargin} , and by replacing oneside by openany i have the good layout. Don't know why. – reyman64 Aug 10 '15 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.