TransWikia.com

Mimic layout LaTeX Companion (memoir) - OneSide Chapter Heading problems

TeX - LaTeX Asked on June 17, 2021

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}

newcommandMnote[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

One Answer

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}

newcommandMnote[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}

Answered by Mafsi on June 17, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP