村上春树的丹麦语译本奇鸟行状录使用以下章节样式。是否可以以某种方式将其重新创建为memoir
章节样式?
文本圆始终具有相同的半径,并且始终从左侧的相同角度开始;然后文本会沿着圆自行分布,如图所示。因此从技术上讲,如果文本太长,它会咬住自己的尾巴。不过,不用担心,文本不会比这长很多。
文本圈的位置与左侧章节号的宽度无关,左侧章节号最多有两位数字。
对 Giacomo 的答案进行了修改,使其在角度和半径方面更符合书本内容。现在我们只需要将其转换为章节样式:
\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}
也许有更优雅的方法来解决您的问题。这是我想到的最简单的方法。