When writing a memoir
document it's easy to focus on just one chapter by using \includeonly
.
\documentclass{memoir}
\title{title}
\author{author}
\includeonly{chap-3}
\begin{document}
\include{chap-0}
\mainmatter
\include{chap-1}
\include{chap-2}
\include{chap-3}
\end{document}
But when using memoir
through org-mode
on Emacs
#+title: title
#+author: author
#+LATEX_CLASS: memoir
#+INCLUDE: "chap-0.org"
#+LATEX_HEADER: \mainmatter
#+INCLUDE: "chap-1.org"
#+INCLUDE: "chap-2.org"
#+INCLUDE: "chap-3.org"
the document becomes monolithic and it is no longer possible to use \includeonly
.
#+LaTeX_HEADER: \includeonly{chap-3}
Is there a way to \includeonly
when the memoir document is monolithic?
Two more issues would be nice, but I'm not hopeful either is possible, because I believe they cannot be done directly from LaTeX.
- Disable the output of the title page and preface.
- Number what's being
include-ded-only
from page number 1, for convenient use as an independent handout.
If none of these questions has an answer, I'm quite content with editing the text by hand to make an individual chapter an independent article, but that doesn't fly with memoir
because, like koma-script
, only the book type is supported, and this requires maintaining an additional style that mimics what's done under memoir
.
Edit:
Alternative way of asking the question
After writing a memoir
manuscript, how can I produce a PDF document of just one chapter formatted as an independent article?
memoir
. You should probably explain what exactly you mean by monolithic. I've interpreted it as the out put is one single file, not separate files. As a single file, I don't think there is much you can do without introducing extra syntax\include
the titlepage, 2. the whole point of include is to preserve all numbers, you could use\input
instead.\includeonly
has indeed nothing to do withmemoir
—not directly at least. I am happy to hear any ideas. Is there, for example, a way to do the effect of\includeonly
if you are not using\include
in the first place?article
class option\chapter
acts like\section