Artikel-Schlagworte: „LaTeX“

Cropping marks are important for print versions of documents. In LaTeX, this can be done with various options of document classes. However, sometimes the packages one uses do not fit together – especially in cases when only some parts of a package are interesting/ needed and other parts of other packages.

The following preamble describes the conjoint use of ‚memoir‘ document class and the packages ‚geometry‘ and ‚crop‘:

\DisemulatePackage{crop} %to allow package 'crop'
                         %instead of emulation by 'memoir'
\setstocksize{297mm}{210mm} %a4 paper as base -> redundant
\settrimmedsize{210mm}{148mm}{*} %use only a5paper area
                         % -> redundant
\usepackage[driver=none]{geometry} %to allow usage of 'crop'
          textwidth=100mm, textheight=147mm} %text area
\usepackage[cam,a4,center]{crop} %load package 'crop'

In the text, just use the following LaTeX command:


to get plain cropping marks. Other options are available and can be get from the respective manuals.

crop marks with LaTeX

I like efficient but also nice looking page styles. One important thing for me is to see chapter as well as section-/ sub-section titles together with page numbers on the same vertical level. This looks like the following:

latex page style

latex page style

You will see that the page numbers are outside the text area. This can be accomplished while working with ‚memoir class‘ with the following code in the preamble that produces a page style:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
% headers and footers
% PW
% LG
%%%%%%%%%%%%%%%%%%%%%%%%%%%%\makeatletter % because of \@chapapp
\makepsmarks {abook}{
\createmark {chapter} {both} {shownumber}{\@chapapp\ }{. \ }
\createmark {section} {right}{shownumber}{} {. \ }
\createmark {subsection} {right}{shownumber}{} {. \ }
\createmark {subsubsection}{right}{shownumber}{} {. \ }
\createplainmark {toc} {both} {\contentsname}
\createplainmark {lof} {both} {\listfigurename}
\createplainmark {lot} {both} {\listtablename}
\createplainmark {bib} {both} {\bibname}
\createplainmark {index} {both} {\indexname}
\createplainmark {glossary} {both} {\glossaryname}

The output can be seen here as .pdf and the .tex file is here. Thanks to Lars Madsen and Peter Wilson for their help to realize that. If you work with komascript, it is easy as well. The following code is necessary for the preamble:

% make headrule
% produce page numbers - different for even and odd pages

Do you also think that (La)TeX is wonderful, but most styles are a little bit boring and they do not look very exciting? Maybe this is not really important for scientific publications, but as long as people from practice or non-scientific fields of interest are part of the intended audience, it makes really sense to think seriously about the layout. In the past, I used koma-script which works fine and produces very good results. It is fitted for European needs and its special local requirements. Some time ago, I needed a better style for title pages and chapters. In ‚memoir class‘ from Peter Wilson I found the right document class for LaTeX. It provides a lot of styles that can be changed quite easily and without much effort to fit personal requirements. It allows for nice looking epigraphs and all that stuff of page layout which is necessary (many different font sizes, etc.). For the bad news – memoir is incompatible with ‚fancyhdr‘ – and for the good news – it provides equivalent opportunities. The user guide of memoir is very comprehensive. However, the short guide written by Lars Madsen is a good starting point to produce page styles together with memoir. Further styles can be found on the pages of Vincent Zoonekynd. There are chapter styles and title page styles available together with TeX-code and how the output looks like. He even produced section styles. At this point it must be mentioned that Zoonekynd also offers a huge free R-book on his website. Although it is not finished yet, it provides many examples of how to use R for statistical analyses, graphics, and demonstrations. If you use Lyx instead of plain TeX, the Lyx-Wiki contains a special page dedicated to the memoir class.