1

I am sorry if this is already covered, but all the tips I've found seemed very hard to implement. You'll need the Mikodacs font in FONTDIR.

\documentclass[book,dvipsnames]{memoir}
\usepackage{xcolor}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\newfontfamily{\archivo}[Path=/FONTDIR/]{Mikodacs.ttf}
\makechapterstyle{lucknerto}{%
\setlength{\beforechapskip}{-2\onelineskip}%
\setlength{\afterchapskip}{2\onelineskip}%
\renewcommand*{\printchaptername}{}%
\renewcommand*{\chapternamenum}{}%
\renewcommand*{\chapnumfont}{\normalfont\large\sffamily\bfseries}%
\renewcommand*{\afterchapternum}{}%
\renewcommand{\printchaptertitle}{\centering\archivo\color{White}\fontsize{23}{27.6}\selectfont\MakeUppercase}
}
\chapterstyle{lucknerto}

\begin{document}
\chapter*{Foobar}
\addcontentsline{toc}{chapter}{Foobar}
\end{document}

I am looking for something like this:

outlined a

I hope you can help!

1 Answers1

1

I couldn't get your MWE to compile, even after having commented out the font-specific commands, so I minimised it further:

\documentclass{book}
\usepackage{xcolor}

\usepackage[outline]{contour}
\contourlength{0.01em}

\newcommand\contourchap[1]{\chapter*{\color{white}\contour{black}{#1}}}

\begin{document}
\contourchap{Foobar}
\end{document}

screenshot

The reason your approach with \contour in the comments doesn't compile is that \contour requires two arguments, the latter holds the content that gets the contour applied. You can't use such a command in \renewcommand{\printchaptertitle}{...}, because only switches are allowed there that are executed before printing the chapter title. Because of this, my MWE defines a new chapter command where the title is put inside the \contour command.

lblb
  • 3,454
  • Hmm. This works in itself, but it fails when I add it to my document. With xelatex I get ! TeX capacity exceeded, sorry [main memory size=16999999] (after fiddling with memory settings) and with lualatex I get 830 words of node memory still in use: 7 hlist, 1 vlist, 4 rule, 3 glue, 1 kern, 1 penalty, 1 glyph, 8 attribute, 14 9 glue_spec, 8 attribute_list, 2 if_stack, 1 write, 1 dir, 1 pdf_colorstack node s avail lists: 1:3,2:261,3:35,4:292,5:64,6:301,7:14,8:1,9:123,10:44,11:1 ! ==> Fatal error occurred, no output PDF file produced! after removing the archivo font. – Kristian Nordestgaard Apr 13 '17 at 10:48
  • Maybe contour is only compatible with pdflatex, I can't check now. – lblb Apr 13 '17 at 13:51