En 'Martin Hairer'Introducción a las estructuras de regularidad', en la página 22, aparece lo siguiente:
¿Alguna sugerencia sobre cómo podría dibujar estos símbolos en forma de árbol en LaTex?
Respuesta1
Aquí hay un enfoque flexible para dibujar tales árboles. Para cambiar el tamaño del árbol, cambie la longitud \RSu
; el valor inicial es \setlength\RSu{1ex}
. Puede definir fácilmente más operadores consultando las definiciones actuales:
\RSdef{i}{\draw (\X) -- +(90:\RSu) node{};}
\RSdef{l}{\draw (\X) -- +(135:\RSu) node{};}
\RSdef{r}{\draw (\X) -- +(45:\RSu) node{};}
\RSdef{I}{\draw (\X) -- +(90:\RSu) coordinate(\X I);\edef\X{\X I}}
\RSdef{L}{\draw (\X) -- +(135:\RSu) coordinate(\X L);\edef\X{\X L}}
\RSdef{R}{\draw (\X) -- +(45:\RSu) coordinate(\X R);\edef\X{\X R}}
\documentclass{article}
\usepackage{tikz}
\makeatletter
\newcommand\RSloop{\@ifnextchar\bgroup\RSloopa\RSloopb}
\makeatother
\newcommand\RSloopa[1]{\bgroup\RSloop#1\relax\egroup\RSloop}
\newcommand\RSloopb[1]%
{\ifx\relax#1%
\else
\ifcsname RS:#1\endcsname
\csname RS:#1\endcsname
\else
\GenericError{(RS)}{RS Error: operator #1 undefined}{}{}%
\fi
\expandafter\RSloop
\fi
}
\newcommand\X{0}
\newcommand\RS[1]%
{\begin{tikzpicture}
[every node/.style=
{circle,draw,fill,minimum size=1.5pt,inner sep=0pt,outer sep=0pt},
line cap=round
]
\coordinate(\X) at (0,0);
\RSloop{#1}\relax
\end{tikzpicture}
}
\newcommand\RSdef[1]{\expandafter\def\csname RS:#1\endcsname}
\newlength\RSu
\RSu=1ex
\RSdef{i}{\draw (\X) -- +(90:\RSu) node{};}
\RSdef{l}{\draw (\X) -- +(135:\RSu) node{};}
\RSdef{r}{\draw (\X) -- +(45:\RSu) node{};}
\RSdef{I}{\draw (\X) -- +(90:\RSu) coordinate(\X I);\edef\X{\X I}}
\RSdef{L}{\draw (\X) -- +(135:\RSu) coordinate(\X L);\edef\X{\X L}}
\RSdef{R}{\draw (\X) -- +(45:\RSu) coordinate(\X R);\edef\X{\X R}}
\begin{document}
\section*{The operators}
\begin{tabular}{lll}
\verb"l" & line left and draw node & \RS{l} \\
\verb"i" & line up and draw node & \RS{i} \\
\verb"r" & line right and draw node & \RS{r} \\
\verb"L" & line left and move position & \RS{L} \\
\verb"I" & line up and move position & \RS{I} \\
\verb"R" & line right and move position & \RS{R} \\
\verb"{...}" & confine position change &
\end{tabular}
\section*{Examples}
\begin{tabular}{rl}
\RS{lir} & \verb"\RS{lir}" \\
\RS{lr} & \verb"\RS{lr}" \\
\RS{lrIlir} & \verb"\RS{lrIlir}" \\
\RS{i} & \verb"\RS{i}" \\
\RS{rIlir} & \verb"\RS{rIlir}" \\
\RS{lrIlr} & \verb"\RS{lrIlr}" \\
\RS{Ilir} & \verb"\RS{Ilir}" \\
\RS{Ilir} & \verb"\RS{Ilir}" \\
\RS{rIlr} & \verb"\RS{rIlr}" \\
\RS{{LL{Lil}{Ii}{Ri}}{RR{Li}{Ii}{Rir}}} &
\verb"\RS{{LL{Lil}{Ii}{Ri}}{RR{Li}{Ii}{Rir}}}"
\end{tabular}
\end{document}
Respuesta2
No creo que existan paquetes para este símbolo.
Si voy a dibujar estas notaciones gráficas, podría dartikz
.
EDITAR (agregar ejemplo):
\documentclass[10pt,openany,landscape]{ctexbook}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}
\usepackage[hmargin={1cm},vmargin={5.5cm}]{geometry}
\usepackage{tikz}
\usepackage{xcolor}
\usetikzlibrary{arrows,calc,positioning}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}
\begin{document}
\begin{tikzpicture}
\coordinate (t1_0) at (0, 0);
\coordinate (t1_1) at ($(t1_0) + (130:6mm)$);
\coordinate (t1_2) at ($(t1_0) + (0,6mm)$);
\coordinate (t1_3) at ($(t1_0) + (50:6mm)$);
\draw [thick] (t1_1) to (t1_0) to (t1_3);
\draw [thick] (t1_0) to (t1_2);
\filldraw (t1_1) circle [radius=1mm];
\filldraw (t1_2) circle [radius=1mm];
\filldraw (t1_3) circle [radius=1mm];
\coordinate (t2_0) at (1cm, 0);
\coordinate (t2_1) at ($(t2_0) + (70:6mm)$);
\coordinate (t2_2) at ($(t2_0) + (110:6mm)$);
\draw [thick] (t2_1) to (t2_0) to (t2_2);
\filldraw (t2_1) circle [radius=1mm];
\filldraw (t2_2) circle [radius=1mm];
\end{tikzpicture}
\end{document}