When writing a memoir document it's easy to focus on just one chapter by using \includeonly.



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.

  1. Disable the output of the title page and preface.
  2. 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.


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?

  • 1
    This has nothing to do with 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
    – daleif
    Feb 27 at 15:52
  • 1, you can \include the titlepage, 2. the whole point of include is to preserve all numbers, you could use \input instead. Feb 27 at 16:06
  • @daleif \includeonly has indeed nothing to do with memoir—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?
    – Sam
    Feb 27 at 16:06
  • @DavidCarlisle Does the rephrasing under "alternative" make more sense than my original question?
    – Sam
    Feb 27 at 16:14
  • do you have to solve this at the latex side eg you could have another .org file that only references one chapter, if you use article class option \chapter acts like \section Feb 27 at 16:35


You must log in to answer this question.

Browse other questions tagged .