0

I'm trying to set a document using companion layout as page and chapter, but for one-side. It is a mess. Two-sided is working.

I read 100 pages from manual. I'm not a programmer, but - no offense - most of the manuals are written by programmers for programmers. The memoir manual is no exception.

  1. Chapter heading & margins are not display correctly with oneside option, only with twoside

Here is the MWE:

\documentclass[12pt,a4paper,oneside]{memoir}  % <-- oneside is not working, only twoside
\usepackage{librecaslon}
\usepackage[T1]{fontenc}
\usepackage[svgnames]{xcolor}
\usepackage{kantlipsum}
\usepackage{layout}
%\usepackage[outer=6cm,inner=2cm,heightrounded,marginparwidth=3.5cm,%
%marginparsep=.5cm,bindingoffset=14pt,bottom=2.5cm,top=2.5cm]{geometry}
\usepackage{tikz}

%\setlength{\headwidth}{\textwidth}
%\addtolength{\headwidth}{\marginparsep}
%\addtolength{\headwidth}{\marginparwidth}
\setmarginnotes{10pt}{100pt}{\onelineskip}

\newcommand\Mnote[2][Black]{\mbox{}\marginpar{\small%
        {\emph{\color{#1}\hspace{0pt}#2}}}}

\pagestyle{companion}
\chapterstyle{companion}

\title{Title}
\author{Author}
\date{\today}

\begin{document}
\layout


\maketitle
\pagestyle{empty} 
\cleardoublepage

\tableofcontents* 
\pagestyle{empty} 

\chapter{Intro}
\Mnote[Crimson]{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}%
\kant[1]
\Mnote[ForestGreen]{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\kant[2]
\section{Section}  % <-- has chapter name in Heading insted of section
\Mnote[MidnightBlue]{The reader should be careful to observe that the objects in space and time are the clue to the discovery of, certainly, our a priori knowledge, by means of analytic unity.}
\kant[4]
\subsection{Subsection}   % <-- not added to TOC
\kant[5]
\chapter{Acknowledgment}
\kant[6]

\end{document}

for no. 1

enter image description here

9
  • 1
    Please tell us in words what you're trying to achieve.
    – Mico
    Commented Mar 6, 2021 at 8:27
  • @Mico I edited the post.
    – Mafsi
    Commented Mar 6, 2021 at 8:32
  • 1
    1. I have no idea what "is not working" entails; sadly, my mind-reading abilities are simply worthless. 2. Place \thispagestyle{empty} after, not before, \maketitle. 3. Place \thispagestyle{empty} after, not before, \tableofcontents. 4. Issue the instructions \setcounter{secnumdepth}{2} and \setcounter{tocdepth}{2} in the preamble. (In the memoir class, the default value of both counters is 1.)
    – Mico
    Commented Mar 6, 2021 at 8:42
  • @Mico thanks for 2,3, & 4 I added a screnshot for 1. If I set document to \documentclass[12pt,a4paper,twoside]{memoir} is working, but not for oneside
    – Mafsi
    Commented Mar 6, 2021 at 8:53
  • 1
    You changed the width of the marginnotes to a width that does not fit onto the page. In your screenshot you can see that the colored text is being cut off. Since the companionchapter style takes into account the width of the margin note when positioning the chapter titles, this leads to chapter titles being cut off as well. Therefore: Use a more suitable width for your margin notes and the chapter titles should adapt to this change, resulting in a more pleasant output.
    – leandriis
    Commented Mar 6, 2021 at 9:55

1 Answer 1

0

This is a partial answer to my problem. The original idea was to mimic The Companion style for one side since with two side option all elements are displayed correct.

Remark: I'm not either a programmer nor a mathematician (I'm teaching literature) and the below solution is based on my understanding on page geometry. I think a programmer would come up with a solution more elegant & simple to this.

First of all: thank you @Mico for pointing out the initial problem regarding thispagestyle{empty}& thank you @leandriis to show me that my marginnote size caused the problem.

So,

After 2 days searching to tex.stackexchange.com I came up with a partial solution. It seems that using A4paper in documentclass memoir is not a good solution since it has predefined sets of dimensions.

Therefore I had to reconstruct the page in order to accommodate 30mm size of marginnotes.

There is still remaining a problem: the page Title which is not centered because of the page setup. Maybe someone will help me fix this.

I also get help to set up the page from this post: Margins not properly set in memoir after fixing textblock and ratio margins combined with searching memoir manual to better understand the macros since they are different from geometry package.

Bellow is the partial solution

\documentclass[12pt,oneside,draft]{memoir}
\usepackage[svgnames]{xcolor}
\usepackage{kantlipsum}
\usepackage{layout}
\usepackage{tikz}

\newcommand\Mnote[2][Black]{\mbox{}\marginpar{\small%
        {\emph{\color{#1}\hspace{0pt}#2}}}} % set marginnotes

\setstocksize{297mm}{210mm} % set the stock size at A4 (297x210mm)
\settrimmedsize{270mm}{180mm}{*} % set the page size at 24x17cm
%\settrims{15mm}{23mm} % center the page on the stock
\settrims{15mm}{15mm} % center the page on the stock / see sec. 2.7 PUTTING IT TOGETHER in manual
\settypeblocksize{200mm}{140mm}{*} % set the textblock size
\setlrmargins{*}{35mm}{*} % set the fore-edge margin 1.5 times the spine margin
\setulmargins{*}{*}{2} % set the lower margin the same as the upper margin
\setmarginnotes{7pt}{30mm}{\onelineskip} % set marginnotes {<separation>}{<width>}{<push>}
\checkandfixthelayout


\pagestyle{companion} % use Companion style as page (header&footer)
\chapterstyle{companion}  % use Companion style for chapter (header&footer)
\setcounter{secnumdepth}{2} % Set number for subsection 
\setcounter{tocdepth}{2}  % Set TOC to show subsection

\title{Title}
\author{Author}
\date{\today}

\begin{document}

\layout % show layout of the page

\maketitle  
\thispagestyle{empty}
\cleardoublepage

\tableofcontents*
\thispagestyle{empty} 

\chapter{Intro}
\thispagestyle{empty}
\Mnote[Crimson]{The reader should be careful to observe that the objects}%
\kant[1]
\section{Section}
\Mnote[ForestGreen]{The reader should be careful to observe that the objects}
\kant[2]
\vfil  % <-- just to push marginnote to the next page since they don't break
\subsection{Subsection} 
\Mnote[MidnightBlue]{The reader should be careful to observe that the objects}
\kant[3]

\end{document}

You must log in to answer this question.

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