在 Latex 中制作概念图

在 Latex 中制作概念图

我找到了一个非常漂亮的概念图,它是从 beamer 改编而来的:https://tex.stackexchange.com/questions/235414/drawing-concept-maps-in-beamer我希望将类似的东西应用到 tex 文档中。

到目前为止我所拥有的内容如下:

\documentclass{article}

\usepackage{graphicx}
\usepackage{tikz}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{lmodern}
\usetikzlibrary{shapes,arrows,positioning}
\usetikzlibrary{matrix}

\begin{document}



\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm,
thick,main node/.style={circle,fill=gray!20,draw,font=\sffamily\Large\bfseries}]

\node[main node] (1) {{\scriptsize { Problème}}};
\node[main node] (2) [below of=1] {{\scriptsize { Recherches}}};
\node[main node] (3) [right of=2] {{\scriptsize { Notes}}};
%\node[main node] (4) [right of=3] {{\scriptsize { Hypot.}}};

\path[every node/.style={font=\sffamily\small}]
(1) edge node [left] {{\tiny donne lieu}} (2)
(2) edge node [below] {\begin{tiny} produisent\end{tiny}} (3) 
(3) edge node [right] {{\tiny modifie}} (1);
\end{tikzpicture}




\end{document}

话虽如此,我想知道的是除了当前的圆形之外,我如何能够制作不同的形状(即六边形或正方形)。另外,我想知道是否有可能制作一个连接节点的双向箭头。我最终希望制作一个如下所示的概念图。

在此处输入图片描述

有人有什么建议吗?我将非常感激任何帮助。

谢谢

答案1

查看shapes.geometricshapes.misc以了解更多形状。<->产生双箭头。

例如:

\documentclass[tikz,border=10pt,multi]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{lmodern}
\usetikzlibrary{shapes.misc,shapes.geometric,arrows,positioning}
\begin{document}
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=3cm, thick,main node/.style={circle,fill=gray!20,draw,font=\sffamily\Large\bfseries}]
  \node[main node,  chamfered rectangle] (1) {{\scriptsize { Problème}}};
  \node[main node, ellipse] (2) [below of=1] {{\scriptsize { Recherches}}};
  \node[main node] (3) [right of=2] {{\scriptsize { Notes}}};
  %\node[main node] (4) [right of=3] {{\scriptsize { Hypot.}}};
  \path[every node/.style={font=\sffamily\small}]
  (1) edge node [left] {{\tiny donne lieu}} (2)
  (2) edge [<->] node [below] {\begin{tiny} produisent\end{tiny}} (3)
  (3) edge node [right] {{\tiny modifie}} (1);
\end{tikzpicture}
\end{document}

双箭头和异形

对于您要制作的特定图片,我可能会考虑使用chains库来处理结构和pgf-blur阴影。我还会定义一些样式以方便使用和保持一致。

例如:

\documentclass[tikz,border=10pt,multi]{standalone}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usetikzlibrary{shapes.misc,shapes.geometric,arrows.meta,positioning,shadows.blur,chains,scopes}
\begin{document}
\begin{tikzpicture}
  [
    ->,
    >=Stealth,
    shorten >=1pt,
    shorten <=1pt,
    thick,
    main node/.style={fill=white, draw, font=\sffamily\scriptsize\bfseries, blur shadow, align=center},
    hex/.style={main node, chamfered rectangle},
    ell/.style={main node, ellipse},
    blur shadow={shadow opacity=25},
    start chain=main going below,
  ]
  \node [on chain, ell] {Limits};
  {[start branch=limits up going {at=(\tikzchainprevious), shift=(30:2)}]
    \node [on chain, hex, join=by ->] {Examples};
  }
  {[start branch=limits up going {at=(\tikzchainprevious), shift=(-30:2)}]
    \node [on chain, hex, join=by ->] {Non-\\Examples};
  }
  \node [on chain, ell, join=by {->}] {Continuity\\(Limits)};
  \node [on chain, ell, join=by <->] {Continuity\\(Ep-Delta)};
  {[start branch=ep going {at=(main-3), shift=({60-(\tikzchaincount-1)*20}:3)}, every on chain/.append style={join={with main-3 by ->}}]
    \node [on chain] {};
    \node [on chain] {};
    \node [on chain] {};
    \node [on chain, hex] {Examples};
    \node [on chain, hex] {Non-\\Examples};
  }
\end{tikzpicture}
\end{document}

锁链和模糊的阴影

相关内容