mparticle and mpreport
The mparticle and mpreport LaTeX document classes are attempts at
a more modern layout for articles and reports. Here is an example
document formatted with mpreport, so you can see what the layout
looks like.
The latest changes:
If a chapter ends on a right page, there will be an empty page before the following chapter; don't number this page. (
mpreport1.20)Experimental for footnotes with hanging indent (use
\mp@setfnhangindent{2em}to use this style). (mpreport1.20)Put date below the author name(s). (
mparticle1.16)Redefine
\andto be useful with the redefined\maketitle. (mparticle1.16)Section titles should not be separated from the following text. (
mpreport1.19 andmparticle1.15)Footnote separator character is now defined in \mp@fnsep, so that it can be redefined. (
mpreport1.19 andmparticle1.15)Chapter definition fixed: The optional argument (short title) didn't work. (
mpreport1.19)The space after the footnote number was missing. (
mparticle1.14 andmpreport1.18)It seems that we've finally managed to fix the problem that, depending on the font, there could be a gap between the two rules (the long one and the short one) above chapters. (
mpreport1.17)The definition of
\@chapterwas missing the call to\chaptermark, which broke headers. Now that headers are working, also added definitions for all standard page styles. (mpreport1.16)Finally, footnotes are indicated with full figures, not superscript figures. (
mparticle1.13 andmpreport1.16)Reduce the use of slanted text.
Put marginnotes always in the left margin and make their style match that of captions.
Set
\parskipin the definition of chapters and sections to ensure that the rules are drawn correctly and to allow users to set\parskipfor their document. (Before, when a user said, e.g.,\parskip2.5ex, there would be a gap between the long thin rule and the short thick rule above the chapter title, and the distance between the rule above the section title and the section title itself would become too large.)In the definition of
\section, moved\addcontentslineafter\sectionmark. If the section happened to start on a new page, the table of contents would list the number of the previous page.
Using longtable with mpreport
There are apparently a number of people who are using the longtable
package with mpreport and who would like to have the longtable
captions look like the other captions. My current suggestion is to
put the following in the preamble of your document:
\makeatletter
\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\renewcommand{\LT@makecaption}[3]{%
\LT@mcol\LT@cols l{%
\settoheight{\mp@capht}%
{\parbox[b]{.9\mp@margwd}{\raggedleft\sffamily\slshape\small#1{#2}: #3}}%
\hspace{-\mp@margwd}%
\vspace{-\mp@capht}%
\parbox[t]{.9\mp@margwd}{\raggedleft\sffamily\slshape\small#1{#2}: #3}%
}
}
\makeatother
This worked fine in my tests, but I haven't tried it with “real” tables. If you're using this definition, successfully or not, I'd appreciate feedback.
Using listings with mpreport
If you want the captions of listings created with the listings
package to appear in the margin, try this definition in the preample
of your document:
\makeatletter
\renewcommand{\lst@MakeCaption}[1]{
\lst@ifdisplaystyle
\ifx #1t%
\ifx\lst@@caption\@empty\expandafter\lst@HRefStepCounter \else
\expandafter\refstepcounter
\fi {lstlisting}%
\ifx\lst@label\@empty\else \label{\lst@label}\fi
\let\lst@arg\lst@intname \lst@ReplaceIn\lst@arg\lst@filenamerpl
\global\let\lst@name\lst@arg \global\let\lstname\lst@name
\lst@ifnolol\else
\ifx\lst@@caption\@empty
\ifx\lst@caption\@empty
\ifx\lst@intname\@empty \else \def\lst@temp{ }%
\ifx\lst@intname\lst@temp \else
\addcontentsline{lol}{lstlisting}\lst@name
\fi\fi
\fi
\else
\addcontentsline{lol}{lstlisting}%
{\protect\numberline{\thelstlisting}\lst@@caption}%
\fi
\fi
\fi
\ifx\lst@caption\@empty\else
\lst@IfSubstring #1\lst@captionpos
{\begingroup \let\@@vskip\vskip
\def\vskip{\afterassignment\lst@vskip \@tempskipa}%
\def\lst@vskip{\nobreak\@@vskip\@tempskipa\nobreak}%
\par\@parboxrestore\normalsize\normalfont % \noindent (AS)
\ifx #1t\allowbreak \fi
\ifx\lst@title\@empty
\settoheight{\mp@capht}%
{\parbox[b]{.9\mp@margwd}{\raggedleft\sffamily\slshape\small%
\lst@makecaption\fnum@lstlisting\lst@caption}}%
\hspace{-\mp@margwd}%
\vspace{-\mp@capht}%
\parbox[t]{.9\mp@margwd}{\raggedleft\sffamily\slshape\small%
\lst@makecaption\fnum@lstlisting\lst@caption}%
% \lst@makecaption\fnum@lstlisting\lst@caption % (AS)
\else
\lst@maketitle\lst@title % (AS)
\fi
\ifx #1b\allowbreak \fi
\endgroup}{}%
\fi
\fi
}
\makeatother
mapcodes
mapcodes is a LaTeX package that allows to use various 8-bit codesets in LaTeX documents (similar to inputenc, but it works better in some situations, IMHO):
- mapcodes 1.04 (also available from other CTAN servers)