具有 LFG 架构的 tikz 图片

具有 LFG 架构的 tikz 图片

我有一个 jpg 文件,显示了 LFG(词汇功能语法)架构,我想使用 tikz 绘制它,这样我就不必将 jpg 加载到我的 pdf 中(这会导致质量损失)。不幸的是,我一点也不知道该如何绘制它。以下是图像(改编自 [1]):

LFG 架构图
(来源:康斯坦茨大学

有人能指点我如何绘制这个吗?

[1] Asudeh, Ash。2012 年。代词恢复的逻辑。牛津大学出版社。

答案1

% arara: pdflatex

\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{arrows,positioning} 
\tikzset{
    commutative diagrams/.cd, 
    arrow style=tikz, 
    diagrams={>=stealth}
}
\newcommand*\point[1]{|[alias=#1]|\bullet}

\begin{document} 
\newlength{\mylength}
\setlength{\mylength}{.01cm}
\[
\begin{tikzcd}[%
    ,row sep=1cm, column sep=1cm
    ,every label/.append style={description}
    ,execute at end picture={%
        \node [font=\footnotesize\bfseries, above=\mylength of 2-0] {Form};
        \node [font=\footnotesize\bfseries, above=\mylength of 2-5] {Meaning};
        \node [font=\scriptsize, below=\mylength of 2-0] {string};
        \node [font=\scriptsize, below=\mylength of 2-1] {c-str};
        \node [font=\scriptsize, below=\mylength of 2-2] {a-str};
        \node [font=\scriptsize, below=\mylength of 2-3] {f-str};
        \node [font=\scriptsize, below=\mylength of 2-4] {s-str};
        \node [font=\scriptsize, below=\mylength of 2-5] {model};
        \node [font=\scriptsize, above=\mylength of 0-2] {i-str};
        \node [font=\scriptsize, above=\mylength of 1-2] {p-str};
        }
    ]
& & \point{0-2} \arrow{rrdd}{\iota^\sigma} & & & \\
& & \point{1-2} \arrow{rrd}{\rho^\sigma} & & & \\
\point{2-0} \arrow{r}{\pi} & \point{2-1} \arrow{r}{\alpha}\arrow[bend left=10]{ur}{\rho}\arrow{uur}{\iota}\arrow[dashed, bend left=20]{rr}{\phi} & \point{2-2} \arrow{r}{\lambda} & \point{2-3} \arrow{r}{\sigma} & \point{2-4} \arrow{r}{\psi} & \point{2-5}
\end{tikzcd}
\]
\end{document}

在此处输入图片描述

答案2

我很无聊,所以我就这么做了...发布没有自己想法的帖子不太好。

\documentclass{minimal}
\usepackage{tikz}
\usepackage{amsmath}
\begin{document}
\begin{tikzpicture}[node distance=2cm]
\node[circle, radius=2pt, draw=black, fill=black, label={[anchor=north]below:string}] (string){};
\node[rectangle, draw=white, above of=string, node distance=0.5cm] {\textbf{Form}};
\node[circle, radius=2pt, draw=black, fill=black, right of=string, label={[anchor=north]below:c-str}] (c-str){};
\draw[->, shorten <=3pt, shorten >=3pt] (string) to node[fill=white] {$\pi$} (c-str);

\node[circle, radius=2pt, draw=black, fill=black, right of=c-str, label={[anchor=north]below:a-str}] (a-str){};
\draw[->, shorten <=3pt, shorten >=3pt] (c-str) to node[fill=white] {$\alpha$} (a-str);

\node[circle, radius=2pt, draw=black, fill=black, right of=a-str, label={[anchor=north]below:f-str}] (f-str){};
\draw[->, shorten <=3pt, shorten >=3pt] (a-str) to node[fill=white] {$\lambda$} (f-str);

\draw [->, shorten <=3pt, shorten >=3pt, bend angle=45, bend left, dashed]  (c-str) to node[fill=white](phi) {$\phi$} (f-str);

\node[circle, radius=2pt, draw=black, fill=black, above of=a-str, label={[anchor=north]above:p-str}] (p-str){};
\draw [->, shorten <=3pt, shorten >=3pt, bend angle=15, bend left]  (c-str) to node[fill=white](rho) {$\rho$} (p-str);

\node[circle, radius=2pt, draw=black, fill=black, right of=f-str, label={[anchor=north]below:s-str}] (s-str){};
\draw[->, shorten <=3pt, shorten >=3pt] (f-str) to node[fill=white] {$\sigma$} (s-str);
\draw [->, shorten <=3pt, shorten >=3pt, bend angle=15, bend left]  (p-str) to node[fill=white](rho) {$\rho^{\sigma}$} (s-str);

\node[circle, radius=2pt, draw=black, fill=black, right of=s-str, label={[anchor=north]below:model}] (model){};
\node[rectangle, draw=white, above of=model, node distance=0.5cm] {\textbf{Meaning}};
\draw[->, shorten <=3pt, shorten >=3pt] (s-str) to node[fill=white] {$\psi$} (model);

\node[circle, radius=2pt, draw=black, fill=black, above of=p-str, label={[anchor=north]above:i-str}] (i-str){};
\draw[->, shorten <=3pt, shorten >=3pt, bend angle=15, bend left] (c-str) to node[fill=white] {$\l$} (i-str);
\draw[->, shorten <=3pt, shorten >=3pt, bend angle=15, bend left] (i-str) to node[fill=white] {$\l^{\sigma}$} (s-str);

\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容