• No results found

The Memoir Experimental Support package Lars Madsen

N/A
N/A
Protected

Academic year: 2021

Share "The Memoir Experimental Support package Lars Madsen"

Copied!
4
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

The Memoir Experimental Support package

Lars Madsen∗,†

March 20, 2008

Contents

Introduction 1

Making marks for page styles 1

Chapterprecis in article mode 3

Multi page titlingpage 3

Bibliography 4

Introduction

This package is meant as a sort of experimental playing ground for code that at some later point might make it into the memoir core.

Anyone with an interest in improving the memoir class is encouraged to par-ticipate.

Whenever Peter Wilson decides to include something from this package into the memoir core, this package will be updated and the macros, earlier provided here, will be removed. For this reason, we have prefixed all user macros with »MXS«.

It is also the idea that the package by it self does not alter anything in memoir by just loading the package. The user has to do something actively to use the features in this package.

Making marks for page styles

One of memoirs advantages over the standard classes is it much improved sys-tem of page style. The page styles are often broken out over different names, such as »chapter« for chapter title pages or »cleared« for blank pages before a right-hand-side chapter (via\cleardoublepage). These styles can easily be redefined or aliased.

Email: daleif@imf.au.dkVersion: 0.1, 2008/03/20

(2)

2 MAKING MARKS FOR PAGE STYLES

The downside of this improved system is that even though page styles are now easy to handle, creating the\...markcommands is still hard to understand for a novice, who might just want the standard headers but without the upper-case stuff.

In an ealier version of this document we suggested some generic macros for helping users to create these\...markmacros. Those older macros was not par-ticularly user friendly. In contrast, most users are more or less happy with the usual\...markdefinitions, though they sometimes would like to change them a little bit. To help with this we have created the following macros:

\MXScreatesimplemark{〈type〉}{〈text〉}

\MXScreatemark{〈type〉}{〈macro-type〉}{〈visib.〉}{〈prefix〉}{〈postfix〉} \MXSaddtopsmarks{〈pagestyle〉}{〈before〉}{〈after〉}

Explanation:

\MXScreatesimplemark{toc}{\contentsname}

is the same as\tocmarkbeing equal to

\markboth{\memUChead{\contentsname}}{\memUChead{\contentsname}}

where\memUCheadis an internal memoir macro introduced in MemPatch ver-sion 4.9a. Use the simple mark construction fortoc,lot,lof,bibandindex.

The in pseudo-code the\MXScreatemarkmacro corresponds to:

if section or chapter number required if mainmatter

if 〈visib.〉 equal true

〈prefix〉〈corresponding sectional number〉〈postfix〉

end if end if end if

〈the title given by\chapteretc.〉

Whether this is given to \markright or \markboth, depends on the value of 〈macro-type〉, possible values are: both or right. The 〈type〉 here corresponds to

chapter,section,subsection, andsubsubsection.

Using \MXSaddtopsmarksone can add code at the beginning or the end of an existing ps marks registration. The syntax for the last two arguments is the same as for memoirs\addtomacro.

Using the constructions above the marks settings for memoirs default pagestyle,

headings can now be written as (for a twoside setup)

\makeatletter

\makepsmarks{headings}{

(3)

3 \MXScreatemark{section}{right}{true}{}{. \ } \MXScreatesimplemark{toc}{\contentsname} \MXScreatesimplemark{lof}{\listfigurename} \MXScreatesimplemark{lot}{\listtablename} \MXScreatesimplemark{bib}{\bibname} \MXScreatesimplemark{index}{\indexname} } \makeatother

where\@chapappis a standard macro which under normal circumstances holds the chapter name, but under an appendix holds the appendix name. Note the dots and the spaces. Quite clearly a lot easier to understand than the actual code in the memoir source.

As one notices the standard headings only includes marks for chapter and section. But this is easy to fix:

\MXSaddtopsmarks{headings}{}% not adding anything at the beginning {

\MXScreatemark{subsection}{right}{true}{}{. \ } \MXScreatemark{subsubsection}{right}{true}{}{. \ } }

And if we just wanted to add the titles, but not the numbers, then change true to

false.

Chapterprecis in article mode

Removed, fixed in mempatch 4.9.

Multi page titlingpage

If one does a naive multi page titlingpage in memoir, such as

\documentclass{memoir} \begin{document} \begin{titlingpage} \begin{center} cover page \end{center} \newpage \begin{center}

back of cover page \end{center}

(4)

4 BIBLIOGRAPHY \begin{center} title page \end{center} \newpage \begin{center}

back of title page \end{center}

\end{titlingpage} \end{document}

You will soon discover that some of these pages actually have headers or footers in contrast to the fact that the titlingpage environment should use the titlingpage page style for its pages. There is no easy way around this so theMXStitlingpage

environment solves this problem by redefining macros such as\newpage and

\clearpageto locally make sure the titlingpage page style is used on the next page.

Just remember that if you have the habit of using\cleartorectothen you might end up with a page where the page style actually used, is not titlingpage but rather cleared (they are initially aliased to the same page style).

If anyone have better ideas for fixing this problem regarding the

ti-tlingpage environment, please let me know.

Bibliography

[1] Peter Wilson, The Memoir Class for Configurable Typesetting, The Herres Press, 2004.

[2] Peter Wilson, Addendum – The Memoir Class for Configurable Typesetting;

Referenties

GERELATEERDE DOCUMENTEN

Therefore our question for vital social institutions, that ‘breathe along‘ with de changing spirit of the age, is not a search for the revitalization of the

A regression analysis shows that for homosexual men, their significantly higher education level, larger work experience and higher occupational status are associated with an

A limited and rich HMI information quantity (LI-HMI vs. RI-HMI), the driver’s locus of control (LOC) and lastly an interaction effect between HMI information quantity

Since the MB dealership network encompasses 315 dealerships that in some cases have different characteristics, it was determined, in cooperation with the management of

D the uniqueness of the inhabitants of British seaside towns Tekst 6 The allure of the British seaside.. 1p 20 How does the writer introduce the subject of this text in

Lasse Lindekilde, Stefan Malthaner, and Francis O’Connor, “Embedded and Peripheral: Rela- tional Patterns of Lone Actor Radicalization” (Forthcoming); Stefan Malthaner et al.,

• You may use results proved in the lecture or in the exercises, unless this makes the question trivial.. When doing so, clearly state the results that

Centraal vertrekpunt bij begeleidingsprogramma’s voor startende leraren zou daarom de visie van de school op goed onderwijs moeten zijn, zowel voor leerlingen als voor leraren..