
次のグラフを LaTeX 形式で描画する必要があります。現在は画像として配置しています。最も簡単な方法で実行するには専門家の助けが必要です。
-------更新 ----------------------------- コメント内の指定されたリンクに従って、このようなツリーを作成します。指定された画像のようにテキストをフォーマットし、同じ参照に 2 つのツリーを並べて配置するにはどうすればよいですか?
\begin{tikzpicture}[level distance=1.5cm,
level 1/.style={sibling distance=3cm},
level 2/.style={sibling distance=1.5cm}]
\node {Cryptography}
child {node {cryptos}
child {node {hidden}}
}
child {node {graphia}
child {node {writing}}
};
\end{tikzpicture}
答え1
最善の選択肢は TikZ を使用することですが、これは機能し、追加のパッケージを使用しません。
\documentclass[12pt]{article}
\begin{document}
\begin{center}
\begin{tabular}{ccc}
\Large Cryptography&\qquad&\Large Stenography\\[1ex]
\Large$\swarrow\qquad\searrow$&&\Large$\swarrow\qquad\searrow$\\[1ex]
\textit{cryptos}\qquad\textit{graphia}&&\textit{steganos}\qquad\textit{graphia}\\[1ex]
\Large$\downarrow$\qquad\qquad$\downarrow$&&\Large$\downarrow$\qquad\qquad$\downarrow$\\[1ex]
hidden\qquad writing&&covered\qquad writing
\end{tabular}
\end{center}
\end{document}
答え2
キーを使用してfont
フォントのスタイルとサイズを設定できます。
以下を使用した解決策は次のとおりですTikZ
。
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture}[
->,
font = \Large,
level distance = 1.5cm,
level 1/.style={
font = \normalfont\sl,
sibling distance = 3cm
},
level 2/.style = {
font = \normalfont\large,
sibling distance = 1.5cm
}
]
\node {Cryptography}
child {node {cryptos}
child {node {hidden}}
}
child {node {graphia}
child {node {writing}}
};
\node[xshift = 5cm] {Steganography}
child {node {steganos}
child {node {covered}}
}
child {node {graphia}
child {node {writing}}
};
\end{tikzpicture}
\end{document}