An even better example document created with memoir

Recently I had to work on writing a research report for a course teaching qualitative research. I had to work in a group with four other people. I asked them if it was okay if I would create the report with LaTeX, after showing them the beauty of my bachelor’s thesis which was also done with LaTeX they agreed. I don’t want to think of the horror if the report would have been created with OpenOffice.org Writer, or even Microsoft Word. The report (in Dutch) has already been submitted a few weeks ago and it was approved, so this is a good opportunity to demonstrate some new stuff I learned during the creation of the document. Here you can get the PDF document, here you can get it’s source. I’ll make some references to page numbers in the eigth edition of memoir’s manual.

I did some things differently in comparison to the document of my bachelor’s thesis. To start, I only specified A4 paper and 12 points font size as options for memoir. This means that the options twoside and openright are used because they are the defaults. The first option means that the document will be prepared for printing on both sides of the paper, the second option means that chapters always open on a right (recto) page. Memoir will insert a blank left (verso) page then if necessary. For my bachelor’s thesis I used oneside and openany (see page 4 in manual). Of course twoside would mean you print double sided instead of single sided for oneside, but I used double sided printing for bachelor’s thesis anyway.

Instead of using the \maketitle command, I used memoir’s titlingpage environment to create the title page (see pages 55-63 in manual). This allows for more flexibility which I required, but I think the title page could have been more attractive. I also used a table with fixed width columns which were respectively right and left aligned in order to align the names of the authors and their student numbers nicely. In LaTeX doing that was not as easy as it seems, see these and these instructions for more information. I used a different chapter style, called VZ23, which can be found here in a document with example chapter styles for memoir.

We needed to codify segments of interviews for our research, creating codes which divided into lower level codes. While I have not used them in the report, I wanted to make tree diagrams with LaTeX for use in a presentation (with the beamer package of course). I knew it could be done with the PGF and TikZ packages for LaTeX after looking at some examples. Those packages are very advanced, so advanced in fact that it’s manual contains a whopping 560 pages! That was overwhelming for me, but Google led me to a thread in a German newsgroup which contained some easy, simple code exactly right for the tree diagrams I wanted to create. This blog post also provided useful information.

Another challenge was creating a graph in the document. I had never done that before with LaTeX, until one of my colleagues asked me to insert a graph he had found in a research report he used as a source. He sent me a pixel based image, which was too small and blurry for my tastes. I don’t blame him of course, but I’m not content with anything less than vector graphics in a LaTeX document because those never get blurry no matter how far you zoom in. So I wanted to recreate the graph he sent me as closely as possible, which would also allow a larger graph to be inserted in the documented. I only knew how to create graphs with OpenOffice.org or Microsoft Office, but after looking some more at the examples of graphics created with PGF and TikZ, I stumbled on this example of a graph. In the comments the package pgfplots was recommended as more suitable for creating graphs than PGF and TikZ. After a few hours of reading the manual and experimenting with it I managed to create an almost exact copy (the source didn’t list exact numbers for the data displayed in the graph) of the graph displayed in the source. That required quite a bit of work, but the end result was totally worth it. The beautiful graph can be seen on the second page.

I followed this course at the Utrecht University School of Governance. They demand that the APA style be used for references, unlike the History department which requires the use of their custom style which employs footnotes. That’s fortunate, because I think I like the APA style more, and because there also is a biblatex-apa package for it designed for use with biblatex. It works like a charm.

I’m very content with it, but besides the title page there’s another reason why I’m not completely satisfied with the document. It’s the margins. I expected that the margins take some distance from respectively the right edge of the paper on a left (verso) page and from the left edge on a right (recto) page. Because at those edges the pages are connected to the spine, or in my case the place where I used a hole punch. That’s usually why you can’t completely see those edges, so that’s why I prefer the margin shifted to the outer edges of the pages. In memoir it’s the other way around, because space is reserved for margin notes (see page 8 in manual). Of course this is just a default which could be modified, but I didn’t bother.

4 thoughts on “An even better example document created with memoir”

  1. Hi there, thank you for providing this great example of using the memoir class! This is just great. I’ve been able to adapt this to my requirements. Unfortunately I’m having a hard time generating the bibliography.

    I wonder whether you might have any hints for me how I can compile it. I have a .bib file with it’s content in the form of @article{…}, @book{…} etc.
    I’m using texlive with texstudio as editor.

    I think my problem has got something to do with biber/bibtex/biblatex. Unfortunately I’m neither very good with Latex nor am I able to find any help using google.

    Would be glad, if you could at least drop a few lines…
    Thanks in advance!

  2. You’re welcome. I’m not sure at which point you experience problems, as you don’t provide an error message. So I can only give some generic pointers.

    Use the biblatex package in conjunction with biber [1]. Read the biblatex manual [2], page 116, for instructions on how to compile a document with biber.

    [1] http://biblatex-biber.sourceforge.net/
    [2] http://archive.cs.uu.nl/mirror/CTAN/help/Catalogue/entries/biblatex.html

    If you still experience difficulties, post another comment describing the exact error messages and post links to a TeX document and bibliography file which are minimal examples (meaning no extra packages besides memoir and biblatex to rule out other problems).

  3. Mentioning any errors would have not made any sense, as my log file was such an incredible mess. I did assume, I was doing something wrong when compiling. So, your answer was exactly what I needed:

    Following the compiling order mentioned on page 116 in the manual things got a lot better. Still, it seems to me the predefined commands in TexStudio somehow did not work properly. I created a user command:

    “txs:///xelatex | txs:///biber %.bcf | txs:///xelatex”

    which then did the job.

    I furthermore had to use “backend=bibtex” as biblatex option in order to get rid of that remnant error saying “Undefined control sequence \endentry” when processing my literature.bib.

    It is now compiling without any errors.
    Thanks so much!!! 🙂

  4. The “backend=bibtex” option sounds strange to me as I never had to use that. In fact, I believe that if it isn’t “backend=biber”, biber can’t be used, and that’s the recommended backend for biblatex now. If you need more help, I’d suggest taking a look at the biblatex website for instructions on where to ask questions. Anyway, I’m glad you got it working.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top