
村上春樹的丹麥文譯本發條鳥編年史使用以下章節樣式。是否有可能以某種方式將其重新建立為memoir
章節樣式?
文字圓始終具有相同的半徑,並且始終以左側相同的角度開始;然後文字就會沿著圓圈分佈,如圖所示。所以從技術上來說,如果一個人繼續文字太久,它就會咬到自己的尾巴。不過,不用擔心,文字不會比這長得多。
文字圓圈的位置與左側章節編號的寬度無關,章節編號最多為兩位數。
賈科莫答案的修改,在角度和半徑方面更符合書中的要求。現在我們只需要把它變成章節樣式:
\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}
周圍的大括號\textbullet
是必要的;否則他們會破壞 TikZ。
答案1
作為memoir
章節樣式
\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}
答案2
\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}
也許有更優雅的方法來解決你的問題。這是我想到的最簡單的。