我可以给这个架构添加标题吗?如果我使用,\caption{\textbf{\label {}The multilevel of the abstraction}}
我有 pb。谢谢
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={draw,edge={-latex},parent anchor=south,align=left}
[Ontological models and languages\\
for mathematical knowledge management\\
on the Semantic Web
[Terminological Ressources\\ and Symbolic Notation\\ for Mathematical domain
[Terminological Ressources
[Vocabularies
[The Online Encyclopedia\\ of Integer Sequences]
]
[pft112
[pft1121]
[pft1122]
]
]
[pft12
[pft121
[pft1211]
]
[pft122
[pft1221]
]
[pft123
[pft1231]
]
]
]
[pft2
[pft21
[pft211]
[pft212]
]
[pft22]
]
]
\end{forest}
\end{document}
答案1
我很乐意删除它,但您需要将其放在table
或figure
环境中才能使用\caption
。并且您可能不会standalone
为此使用该类。
\documentclass{article}
\usepackage[edges]{forest}
\begin{document}
\begin{table}
\centering
\caption{\textbf{The multilevel of the abstraction.}\label{fig:tree}}
\begin{forest}
for tree={draw,edge={-latex},parent anchor=south,align=left,
}
[Ontological models and languages\\
for mathematical knowledge management\\
on the Semantic Web
[Terminological Ressources\\ and Symbolic Notation\\ for Mathematical domain
[Terminological Ressources
[Vocabularies
[The Online Encyclopedia\\ of Integer Sequences]
]
[pft112
[pft1121]
[pft1122]
]
]
[pft12
[pft121
[pft1211]
]
[pft122
[pft1221]
]
[pft123
[pft1231]
]
]
]
[pft2
[pft21
[pft211]
[pft212]
]
[pft22]
]
]
\end{forest}
\end{table}
\end{document}
答案2
使用 caption 包的另一种方法:
\documentclass{article}
\usepackage{caption}
\usepackage[edges]{forest}
\begin{document}
\begin{forest}
for tree={draw,edge={-latex},parent anchor=south,align=left}
[Ontological models and languages\\
for mathematical knowledge management\\
on the Semantic Web
[Terminological Ressources\\ and Symbolic Notation\\ for Mathematical domain
[Terminological Ressources
[Vocabularies
[The Online Encyclopedia\\ of Integer Sequences]
]
[pft112
[pft1121]
[pft1122]
]
]
[pft12
[pft121
[pft1211]
]
[pft122
[pft1221]
]
[pft123
[pft1231]
]
]
]
[pft2
[pft21
[pft211]
[pft212]
]
[pft22]
]
]
\end{forest}
\captionof{figure}{foo}
\end{document}