6

I've been trying to increase the spacing between letters in the diagram below: enter image description here

\documentclass[12pt]{standalone}
\usepackage{tikz}
\usepackage{fontspec}
\setmainfont{Brill}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
\draw [white] (-10,0) -- (-8,0) node [black, midway] {West};
\draw [white] (0,8) -- (0,11) node [black, rotate=90, midway] {North};
\draw [white] (8,0) -- (10,0) node [black, midway] {East};
\draw [white] (0,-8) -- (0,-11)  node [black, rotate=90, midway] {South};
\draw (-8,0) -- (8,0);
\draw (0,-8) -- (0,8);


\path[decorate,decoration={raise=-18pt, text along path, text={North East},text align=center}] (0,8) arc (90:0:8cm);
\draw [thick] (0,8) arc (90:0:8cm); 
\path[decorate,decoration={raise=-18pt, text along path, text={North West},text align=center, reverse path}] (0,8) arc (90:180:8cm);
\draw [thick] (0,8) arc (90:180:8cm);
\path[decorate,decoration={raise=-18pt, text along path, text={South West},text align=center, reverse path}] (-8,0) arc (180:270:8cm);
\draw [thick] (-8,0) arc (180:270:8cm);
\path[decorate,decoration={raise=-18pt, text along path, text={South East},text align=center, reverse path}] (0,-8) arc (270:360:8cm);
\draw [thick] (0,-8) arc (270:360:8cm);

\path[decorate,decoration={raise=18pt, text along path, text={N o r t h  E a s t},text align=center}] (0,8) arc (90:0:8cm);
\draw [thick] (0,8) arc (90:0:8cm); 
\path[decorate,decoration={raise=18pt, text along path, text={N o r t h  W e s t},text align=center, reverse path}] (0,8) arc (90:180:8cm);
\draw [thick] (0,8) arc (90:180:8cm);
\path[decorate,decoration={raise=18pt, text along path, text={S o u t h  W e s t},text align=center, reverse path}] (-8,0) arc (180:270:8cm);
\draw [thick] (-8,0) arc (180:270:8cm);
\path[decorate,decoration={raise=18pt, text along path, text={S o u t h  E a s t},text align=center, reverse path}] (0,-8) arc (270:360:8cm);
\draw [thick] (0,-8) arc (270:360:8cm);


\node  [above] at     (0,8) {\textit{b}};
\node  [below] at     (0,-8) {\textit{d}};
\node  [left] at     (-8,0) {\textit{a}};
\node  [right] at     (8,0) {\textit{c}};

\end{tikzpicture}
\end{document}

Ideally, the outcome would be as the decorations outside of the circle, if it weren't for the fact that the system counts two spaces as one. I don't want to use the option fit to path because the text is stretched throughout the arc. Do you have any suggestions (also if you spot any inconsistency)? Thank you!

1
  • Welcome to TeX-SE! You can achieve any stretching with the key text align=fit to path, which allows you to spread the letters over the path.
    – user121799
    Jul 1, 2019 at 23:26

2 Answers 2

3

Mostly off-topic (with some ideas on how to make your code more concise), solution for for the text along path outside of circle is the same as in the @marmoth answer:

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{fontspec}
% \setmainfont{Brill}
\usetikzlibrary{decorations.text}

\begin{document}
\begin{tikzpicture}[
textA/.style args = {#1/#2}{decorate,
    decoration={raise= 18pt, text along path, text=#1, 
    text align=fit to path, #2}}, % #2 for reversed path
textB/.style args = {#1/#2}{decorate,
    decoration={raise=-18pt, text along path, text=#1,
    text align=center, #2}}, % #2 for reversed path
                    ]
\node [left]    at (-8.4,0) {West};
\node [above,anchor=west,rotate=90] at (0, 8.4) {North};
\node [right]   at (8.4,0)  {East};
\node [below,anchor=east,rotate=90] at (0,-8.4) {South};
\draw   (-8,0) -- (8,0) 
        (0,-8) -- (0,8);
%
\path[textB=North East/ ] (0,8) arc (90:0:8cm);
\path[textB=North West/reverse path] ( 0,8) arc (90:180:8cm);
\path[textB=South West/reverse path] (-8,0) arc (180:270:8cm);
\path[textB=South East/reverse path] (0,-8) arc (270:360:8cm);
%
\path[textA=North East/ ]            (60:8) arc (60:30:8cm);
\path[textA=North West/reverse path] (120:8) arc (120:150:8cm);
\path[textA=South West/reverse path] (210:8) arc (210:240:8cm);
\path[textA=South East/reverse path] (300:8) arc (300:330:8cm);
%
\draw [thick] (0,0) circle[radius=8cm];
%
\node[above] at (0,8)   {$b$};
\node[below] at (0,-8)  {$d$};
\node[left]  at (-8,0)  {$a$};
\node[right] at (8,0)   {$c$};
    \end{tikzpicture}
\end{document}

enter image description here

1
  • Thank you, Zarko.
    – Catoblepa
    Jul 2, 2019 at 12:21
5

Here is a proposal that uses text align=fit to path. I do not have your fonts.

\documentclass[tikz,border=3.14mm]{standalone}
% \usepackage{fontspec}
% \setmainfont{Brill}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
\draw [white] (-10,0) -- (-8,0) node [black, midway] {West};
\draw [white] (0,8) -- (0,11) node [black, rotate=90, midway] {North};
\draw [white] (8,0) -- (10,0) node [black, midway] {East};
\draw [white] (0,-8) -- (0,-11)  node [black, rotate=90, midway] {South};
\draw (-8,0) -- (8,0);
\draw (0,-8) -- (0,8);


\path[decorate,decoration={raise=-18pt, text along path, text={North East},text align=center}] (0,8) arc (90:0:8cm);
\draw [thick] (0,8) arc (90:0:8cm); 
\path[decorate,decoration={raise=-18pt, text along path, text={North West},text align=center, reverse path}] (0,8) arc (90:180:8cm);
\draw [thick] (0,8) arc (90:180:8cm);
\path[decorate,decoration={raise=-18pt, text along path, text={South West},text align=center, reverse path}] (-8,0) arc (180:270:8cm);
\draw [thick] (-8,0) arc (180:270:8cm);
\path[decorate,decoration={raise=-18pt, text along path, text={South East},text align=center, reverse path}] (0,-8) arc (270:360:8cm);
\draw [thick] (0,-8) arc (270:360:8cm);

\path[decorate,decoration={raise=18pt, text along path,text align=fit to path,
 text={North East},text align=center}] (60:8) arc (60:30:8cm);
\draw [thick] (0,8) arc (90:00:8cm); 
\path[decorate,decoration={raise=18pt, text along path,text align=fit to path, 
text={North West},text align=center, reverse path}] (120:8) arc (120:150:8cm);
\draw [thick] (0,8) arc (90:180:8cm);
\path[decorate,decoration={raise=18pt, text along path,text align=fit to path, 
text={South West},text align=center, reverse path}] (210:8) arc (210:240:8cm);
\draw [thick] (-8,0) arc (180:270:8cm);
\path[decorate,decoration={raise=18pt, text along path,text align=fit to path, 
text={South East},text align=center, reverse path}] (300:8) arc (300:330:8cm);
\draw [thick] (0,-8) arc (270:360:8cm);


\node  [above] at     (0,8) {\textit{b}};
\node  [below] at     (0,-8) {\textit{d}};
\node  [left] at     (-8,0) {\textit{a}};
\node  [right] at     (8,0) {\textit{c}};

\end{tikzpicture}
\end{document}

enter image description here

2
  • Thank you, marmot! The tweak works pretty well on my file. On a slightly unrelated subject, I've realized, that the texts "North", "South", "East", and "West" are slightly lowered with respect to the letters (a, b, c, d), in spite of the fact that the text position was midway. Do you know why this happened? (I'm fine asking this question on a separate thread.)
    – Catoblepa
    Jul 2, 2019 at 1:09
  • 1
    @Catoblepa I have very slow internet now but you can align the baselines of nodes. The problem is that the nodes are vertically centered where you place them. For now you could do \node [left,font=\itshape] at (-8,0) {\vphantom{W}a};, to cure this, but the proper way is to use positioning. I will be happy to spell this out when I have internet (unless somebody who always copies things and claims to make them more "concise" will do that before... sigh...).
    – user121799
    Jul 2, 2019 at 4:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .