日本語のテキストを使ったTikZ図の例

Labels

\documentclass[tikz,border=10pt]{standalone}
\usepackage{luatexja}
\begin{document}
\begin{tikzpicture}[every pin/.style = {scale=0.5}]
  \node[
    pin = above:デザイン,
    pin = left:グラフィックス,
    pin = below:タイポグラフィ,
    pin = right:プログラミング,
    circle, shading=ball, ball color=blue!60,
      text=white] {TikZ};
\end{tikzpicture}
\end{document}

Nodes and arrows

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{shapes}
\usepackage{luatexja}
\begin{document}
\begin{tikzpicture}[-stealth]
  \draw
    node (r) at (0,1)   [draw, rectangle] {長方形}
    node (c) at (1.5,0) [draw,    circle]    {円}
    node (e) at (3,1)   [draw,   ellipse]  {楕円};
  \draw (r.east)  --       (e.west);
  \draw (r.south) -- (c.north west);
  \draw (e.south) -- (c.north east);
\end{tikzpicture}
\end{document}

Text along a path

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{decorations.text}
\usepackage{luatexja}
\begin{document}
\begin{tikzpicture}
  \draw[decorate,
    decoration={text along path,
    text=このテキストはパスに沿っています}]
    (0,0) arc(180:0:1.7);
\end{tikzpicture}
\end{document}

Text along a long path

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{decorations.text}
\usepackage{luatexja}
\begin{document}
\begin{tikzpicture}
  \draw[decorate, decoration = {text along path,
    text = {これはパスに沿ったとても長いテキストです}}]
    (0,0) -- (1.6,0) arc(150:30:1.5) -- (6.3,0);
\end{tikzpicture}
\end{document}

Venn diagram

\documentclass[tikz,border=10pt]{standalone}
\usepackage{luatexja}
\begin{document}
\begin{tikzpicture}[very thick, fill opacity=0.4, text opacity=1]
  \filldraw[red]   ( 90:1.2) circle (2);
  \filldraw[green] (210:1.2) circle (2);
  \filldraw[blue]  (330:1.2) circle (2);
  \node at ( 90:2)    {グラフィックス};
  \node at (210:2)    {タイポグラフィ};
  \node at (330:2)    {プログラミング};
  \node [font=\LARGE] {TikZ};
\end{tikzpicture}
\end{document}

Bubble diagram

\documentclass[tikz,border=10pt]{standalone}
\usepackage{smartdiagram}
\usepackage{luatexja}
\smartdiagramset{bubble node font=\sffamily\Large,
 bubble center node font=\sffamily\Huge}
\begin{document}
\smartdiagram[bubble diagram]{ダイヤグラム,
      ノード, エッジ, アロー, 表示, カラー}
\end{document}

Descriptive diagram

\documentclass[tikz,border=10pt]{standalone}
\usepackage{smartdiagram}
\usepackage{luatexja}
\begin{document}
\smartdiagramset{description title font=\sffamily\LARGE,
  description font=\sffamily\footnotesize}
\smartdiagram[descriptive diagram]{
  {PGF,{「Portable Graphics Format」:\LaTeX 文書内でグラフィックを作成するためのパッケージ}},
  {TikZ, {PGFを簡単に使えるフロントエンド}},}
\end{document}

Descriptive diagram

\documentclass[tikz,border=10pt]{standalone}
\usepackage{smartdiagram}
\usepackage{fontawesome5}
\usepackage{luatexja}
\begin{document}
\smartdiagramset{description title font=\LARGE,
  description font=\sffamily}
\smartdiagram[descriptive diagram]{
  {\faLightbulb[regular],{目的とメッセージを明確にし、情報やデータを収集する}},
  {\faProjectDiagram, {図の種類を選び、ノードの形、色、文字スタイルを定義する}},
  {\faPencil*, {ノードを描画し、テキストを挿入し、矢印を描き、ラベルを追加する}},
  {\faAlignLeft, {ノードを整列させ、位置を微調整する}},
  {\faRedo, {微調整し、見直して修正する}}}
\end{document}

Leave a Reply

Your email address will not be published. Required fields are marked *