2

I would like text with a large left margin, chapter titles and floats using a normal left margin, and section titles halfway between the two. This code:

\documentclass{memoir}
\usepackage{lipsum}

\setlrmarginsandblock{1in}{1in}{*}
\setulmarginsandblock{1in}{1in}{*}
\checkandfixthelayout

\begin{document}
\chapter{Chapter Title}
\lipsum[1]
\section{Section Title}
\lipsum[2]
\subsection{Sub Section Title}
\lipsum[3]
\newpage
\lipsum[4]
\section{Section Title}
\lipsum[5]
\subsection{Sub Section Title}
\lipsum[6]
\end{document}

gives this:

enter image description here

I want it to look like this:

enter image description here

(Notice in particular that the header shouldn't be in line with the paragraph text, and the extra margin for the text is always on the left, whether or not inside and outside margins differ.)

Is there a simple way?

(Document class is memoir, and I am using XeLaTeX, in case that matters.)

1
  • Just an observation. Even though this layout can be obtained, I personally think it is distracting. Are you planning to put margin notes to fill the space that seems to be there for the shifted Section titles? This might help rebalance the otherwise zig-zag flow. Commented Nov 9, 2018 at 22:03

2 Answers 2

1

Perhaps you should consider the textblock first and adjust the division headings with respect to that. I hope that the following will help (minus any typos and plus your adjustments).

\documentclass[oneside]{memoir} % oneside to make all pages look the same
\usepackage{lipsum}
\newlength{\secprob} % a working length
\setlength{\secprob}{2in}
\setulmarginsandblock{1in}{1in}{*}
\setlrmarginsandblock{1.5\secprob}{1in}{*} % wider left margin
\checkandfixthelayout

\makeatletter
\renewcommand*{printchaptername}{\hspace{-\secprob} \chapnamefont \@chappap} % outdent chapter name
\renewcommand*{\printchaptertitle}[1]{\hspace{-\secprob} \chaptertitlefont #1} % outdent chapter title
\setsecindent{-0.5\secprob} % outdent for sections
\makepagestyle{secprob} % the page style
  \makeevenhead{secprob}{\hspace{-\secprob}\thepage}{}{\leftmark}
  \makeoddhead{secrob}{\hspace{-\secprob}{\thepage}{}{\rightmark}
\makeatother

\pagestyle{secprob}
\begin{document}
% then as the questioner's code for the rest
\end{document}

For more information see the manual (> texdoc memoir) chapters 6 and 7.

1

The adjustwidth environment is your friend here.

\documentclass[11pt]{memoir}

\usepackage{lipsum}
\usepackage{calc,environ}

%% page size and text block sizes
\setstocksize{9.25in}{6.125in}
\settrimmedsize{\stockheight}{\stockwidth}{*}
\setulmarginsandblock{0.85in}{*}{1}
\setlrmarginsandblock{0.5in}{*}{3.5}
\newlength{\margindiff}\setlength{\margindiff}{\foremargin - \spinemargin}
\newlength{\mpsep}\setlength{\mpsep}{2em}
\newlength{\mwidth}\setlength{\mwidth}{\margindiff -\mpsep}
\setmarginnotes{\mpsep}{\mwidth}{0.25\baselineskip}
\checkandfixthelayout

%% FULL PAGE
\NewEnviron{FullPage}{%
    \begin{adjustwidth*}{0em}{-\margindiff}
    \BODY
    \end{adjustwidth*}
    }

%% HALF PAGE
\NewEnviron{HalfPage}{%
    \begin{adjustwidth*}{0.5\margindiff}{-0.5\margindiff}
    \BODY
    \end{adjustwidth*}
    }

\begin{document}

\begin{FullPage}
\chapter{First One}

This sentence shows how the text flows over the entire line of the page without having margins set on the left or right.

\end{FullPage}

\lipsum[1]

\begin{HalfPage}

\lipsum[2]

\end{HalfPage}

\end{document}

You may also need to indent any section headers with the margin difference offset, e.g.:

\usepackage{titlesec}
\titlespacing{\section}{-\margindiff}{...}{...}%

You must log in to answer this question.

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