5

The Danish translation of Murakami's The Wind-Up Bird Chronicle uses the following chapter style. Is it possible to somehow recreate this as a memoir chapter style?

The text circle always has the same radius and always starts at the same angle on the left; then the text just distributes itself along the circle as shown. So technically, if one continued the text for too long, it would bite its own tail. Don't worry about this, though, the text is not going to become much longer than this.

The position of the text circle is independent of the width of the chapter number on the left, which will have at most two digits.

enter image description here

A modification of Giacomo's answer that is a bit more true to the book in terms of angle and radius. Now we just need to turn it into a chapter style:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.text}

\begin{document}

\begin{tikzpicture}
\pgfmathsetmacro\startang{170}

\coordinate (start) at (-3,0);
\path [postaction={decorate,decoration={raise=1ex,text along path,text align=left,text={|\sffamily|Sult som smerte {\textbullet} Kumikos lange brev {\textbullet} Fuglen som profet}}}] (start) arc (\startang:{\startang-360} :4 );
\end{tikzpicture}

\end{document}

enter image description here

The braces around \textbullet are necessary; else they break TikZ.

Gaussler
  • 12,801
  • About the bullets: I just want to insert those manually, so don't worry about making support for multiple headings. Just treat the text circle as one big heading. – Gaussler Apr 19 '15 at 15:51
  • 2
    As long as you can find a macro that can typeset a string along a path, then it is doable. Isn't it possible to do that using tikz? – daleif Apr 19 '15 at 16:37
  • I guess it should be; there are some other questions that reveal that circular text paths are possible in TikZ. To me, the problem is more related to turning it into a chapter style, with the correct way of automating everything. All my attempts so far at getting an overview of the memoir chapter style syntax have failed. – Gaussler Apr 19 '15 at 16:39
  • Not that I know how to make ordinary circular text in TikZ.http://tex.stackexchange.com/questions/75638/recreating-a-logo-text-around-a-circle shows that TikZ is capable of doing, but I don't think that solution is immediately applicable in this situation. – Gaussler Apr 19 '15 at 16:44
  • 2
    Then provide the code for the failure. We usually do not like "make this for me" - questions – daleif Apr 19 '15 at 16:44
  • 1
    The percusse one should be usable. Works just fine with pdflatex and the extra fonts removed. – daleif Apr 19 '15 at 16:47
  • "The percusse one?" – Gaussler Apr 19 '15 at 16:50
  • http://tex.stackexchange.com/a/75652/3929 – daleif Apr 19 '15 at 16:50
  • @daleif, the above code works for me now. – Gaussler Apr 19 '15 at 17:21
  • The problem with that one is the bounding box, the size of the image is actually the full circle! (add an \fbox around it). My tikz foo is quite basic so I'm not sure what the best approach is. – daleif Apr 19 '15 at 17:27
  • That could be a problem. But I think we may as well assume that the text will never go more than half way around the circle. So we may cut the below semicircle off. – Gaussler Apr 19 '15 at 17:29
  • That depends greatly on the chosen fontsize – daleif Apr 19 '15 at 17:33
  • That just means that we get a chapter style where you shouldn't put too much text. Isn't actually that different from other chapter styles. – Gaussler Apr 19 '15 at 17:34
  • See my answer below – daleif Apr 19 '15 at 17:39

2 Answers2

5

As a memoir chapter style

\documentclass[a4paper,draft]{memoir}

\setlrmarginsandblock{3cm}{3cm}{*}
\checkandfixthelayout

\usepackage{tikz}
\usetikzlibrary{decorations.text}

\def\startang{170}

% title on curve
\newcommand\ToC[1]{
\begin{tikzpicture}
  % depends on the chosen font size
  \clip (-1.1em,0.05) rectangle (9,4.5);
\path [postaction={decorate,decoration={raise=1ex,text along path,text align=left,
text={#1}}}] (0,0)
arc (\startang:{\startang-360} :4cm );
\end{tikzpicture}
}


\providecommand\curvefont{}
\makechapterstyle{G}{
  \renewcommand\printchaptername{}
  \renewcommand\printchapternum{}
  \renewcommand\afterchapternum{}
  \renewcommand\curvefont{\large\sffamily\bfseries}
  \renewcommand\printchaptertitle[1]{%
    \chaptitlefont\thechapter~%
    % visual baseline
    %\rlap{\kern-2em\smash{\rule{\textwidth}{0.4pt}}}%
    \curvefont\ToC{##1}
  }
  \setlength{\beforechapskip}{-\baselineskip}
}
\chapterstyle{G}




\begin{document}

\setcounter{chapter}{10}

\chapter{Sult som smerte {\textbullet} Kumikos lange brev {\textbullet} Fuglen som profet}

\end{document}
daleif
  • 54,450
  • 1
    Tak skal du have! – Gaussler Apr 19 '15 at 17:50
  • How do I remove all the space above? The memoir manual mentions setting \beforechapskip to zero, but nothing happened. – Gaussler Apr 19 '15 at 18:15
  • 1
    See the update. Note you can use \aliaspagestyle{chapter}{showlocs} to see where the boundaries are. Because \beforechapskip is added via \vspace* we may have to go negative or simply redefine \chapterheadstart. BTW: depending on what you are doing, you may need to explicitly define a style for unnumbered chapters, like the TOC. – daleif Apr 19 '15 at 18:22
  • 1
    PS: one can learn a lot by just looking in the memoir source code. I have it on speed dial in my editor. – daleif Apr 19 '15 at 18:22
  • Thank you for your help. A side question that I have been thinking about: Why do you call yourself daleif? :-) – Gaussler Apr 19 '15 at 20:34
1
\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.text}

\begin{document}
\begin{tikzpicture}
\node (One) at (-4,0) [shape=point] {}; 
\node (Two) at (4,0) [shape=point] {};
\draw [hidden,postaction={decorate,decoration={raise=1ex,text along path,text align=left,text={|\sffamily|How to make this as a memoir chapterstyle?}}}] (One) to [bend left=45] (Two);
\end{tikzpicture}

\end{document}

Maybe there are more elegant ways to solve your question. This is the most simple I have thought.

Result