TikZ:等辺記号のかき方(サンプルコード付き)

こんにちは。等辺記号のかき方の忘備録です。

等辺記号の簡易表示

簡易版

Rendered by QuickLaTeX.com

Tikz
\usepackage{tikz}
\begin{tikzpicture}[scale=1.5]
\coordinate (A) at (0,0) node [below left] at (A) {A};
\coordinate (B) at (5,0) node [below right] at (B) {B};
\draw [thick] (A) -- node[sloped] { $||$ } (B);
\end{tikzpicture}

等辺記号の高度な設定

Rendered by QuickLaTeX.com

TikZ
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{tikzpicture}[scale=1.5]
\coordinate (A) at (0,0) node [below left] at (A) {A};
\coordinate (B) at (5,0) node [below right] at (B) {B};
\draw [thick] (A)--(B);
\draw [thick] ($(A)!0.5!(B)!2.5pt!(A)!10pt!90:(A)$) -- ($(A)!0.5!(B)!2.5pt!(A)!10pt!90:(B)$) ($(A)!0.5!(B)!2.5pt!(B)!10pt!90:(A)$) -- ($(A)!0.5!(B)!2.5pt!(B)!10pt!90:(B)$);
\end{tikzpicture}

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)