Snippets

Torbjørn T. TikZ-demo

Created by Torbjørn T.

File snippet.txt Added

  • Ignore whitespace
  • Hide word diff
+\documentclass{article}
+\usepackage{pagecolor}%
+\usepackage{tikz}%
+\begin{document}
+\pagecolor{red!30}
+\begin{tikzpicture}
+\tikzset{mwe/.style={inner sep=1.15ex, text depth=0ex, text height=1ex, text width=0.5em, minimum size=0.5em}}%
+
+\node (A) [mwe] at (0,0) {A};%
+\node (B) [mwe] at (4,0) {B};%
+
+\node (C) [mwe] at (0,4) {C};%
+\node (D) [mwe] at (2,-4) {D};%
+
+\path (A) -- node[text height=1.25ex] (AB) {ab} (B);
+\path (C) -- node[text height=1.25ex] (CD) {c} (D);
+
+\draw[line width=0.25mm,-]  (A) -- (CD) -- (AB) --  (B);%
+\draw[line width=0.25mm,-]  (C) -- (CD) -- (D);%
+
+\end{tikzpicture}
+
+\end{document}
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.