0

Diagram needing to be drawn by Latex

Note that there is an accidental ink smudge near D and F. Your help is deeply appreciated.

3
  • Hi, could you please elaborate what you have tried so far (in the form of a MWE)?
    – Richard
    Commented Sep 7, 2015 at 8:44
  • I do not know how to draw anything in Latex, so I haven't tried anything. Commented Sep 7, 2015 at 8:55
  • 1
    Have a look at the tikz-cd package.
    – Pier Paolo
    Commented Sep 7, 2015 at 9:04

6 Answers 6

8

One solution, without tikz-cd, would be to just use tikz nodes

\documentclass{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{tikz}

\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[auto]
    \node(L) at (0,0) {L};
    \node[below of=L, node distance=2cm](F){F};
    \node[below of=F, node distance=2cm](O){O};
    \node[above right of=F](D){D};
    \node[below right of=F](M){M};
    \node[below right of=D](K){K};
    \node[above right of=K](E){E};
    \node[right of=E](C){C};
    \node[below right of=C](J){J};
    \node[above right of=J](A){A};
    \node[below right of=A](G){G};
    \node(N)at(L-|G){N};
    %Insert missing Nodes
    \path[draw] (L) -- (N);
    \path[draw] (L) -- (F);
    \path[draw] (L) -- (C);
    %Insert missing lines
\end{tikzpicture}
\end{document}

Which produces the following image enter image description here

I'm pretty sure you can insert the missing nodes and lines by yourself.

Cheers

0
7

And here with :

% arara: pdflatex

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}[every arrow/.append style={dash,shorten >= -.1cm,shorten <= -.1cm},column sep={1cm,between origins}]
    L \arrow{rrrrrrr}\arrow{dd}\arrow{drrrr} &[-.5cm] &[-.5cm] & & & &[-.5cm] &[-.5cm] N \arrow{dd} \\
    & D \arrow{dr} & & E \arrow{r}\arrow{urrrr} & C \arrow{dr} & & A \arrow{dr} & \\[-.5cm]
    F \arrow{dd}\arrow{ur}\arrow{dr} & & K \arrow{ur}\arrow{dr} & & & J \arrow{ur}\arrow{dr} & & G \arrow{dd} \\[-.5cm]
    & M \arrow{ur} & & B \arrow{r}\arrow{drrrr} & H \arrow{ur} & & P \arrow{ur} & \\
    O \arrow{rrrrrrr}\arrow{urrrr} & & & & & & & I 
\end{tikzcd}
\end{document}

enter image description here

5

An alternative approach is to use Metapost to create an external graphic and include it with includegraphics. Here's a version using the AMS Euler font to preserve something of the hand-drawn lettering.

enter image description here

prologues := 3;
outputtemplate := "%j%c.eps";

beginfig(1);

u = 5mm;

z.A = -z.M = (4u,u);
z.C = -z.B = (u,u);
z.D = -z.P = (-4u,u);
z.E = -z.H = (-u,u);
z.F = -z.G = (-5u,0);
z.I = -z.L = (5u,-4u);
z.J = -z.K = (3u,0);
z.N = -z.O = (5u,4u);

draw z.A -- z.G -- z.P -- z.J 
  -- z.C -- z.E
  -- z.K -- z.M -- z.F -- z.D
  -- z.K -- z.B -- z.H -- z.J -- cycle;

draw z.G -- z.N -- z.L -- z.F -- z.O -- z.I -- cycle;

draw z.C -- z.L;
draw z.E -- z.N;
draw z.B -- z.I;
draw z.H -- z.O;

forsuffixes $=A,B,C,D, E,F,G,H, I,J,K,L, M,N,O,P: 
  unfill fullcircle scaled .9u shifted z$; 
  label(str $ infont "eurm10", z$);
endfor

endfig;
end.
4

Just for fun, this illustrates some capacities (relative positioning, custom decorations, \foreach loops, etc.) of TikZ/PGF.

Code

\documentclass[tikz]{standalone}
\usetikzlibrary{calc, decorations.pathmorphing, patterns, positioning}
\usepackage{emerald}
\usepackage[T1]{fontenc}

\makeatletter
\pgfdeclaredecoration{penciline}{initial}{
    \state{initial}[width=+\pgfdecoratedinputsegmentremainingdistance,auto corner on length=1mm,]{
        \pgfpathcurveto%
        {% From
            \pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}%
            {\pgfdecorationsegmentamplitude}
        }
        {% Control
        \pgfmathrand
        \pgfpointadd{\pgfqpoint{\pgfdecoratedinputsegmentremainingdistance}{0pt}}%
        {\pgfqpoint{-\pgfdecorationsegmentaspect\pgfdecoratedinputsegmentremainingdistance}{\pgfmathresult\pgfdecorationsegmentamplitude}}
        }
        {%TO 
        \pgfpointadd{\pgfpointdecoratedinputsegmentlast}{\pgfpoint{1pt}{1pt}}
        }
    }
    \state{final}{}
}
\makeatother

\begin{document}
    \ECFAugie
    \begin{tikzpicture}[decoration=penciline]
        \begin{scope}[node distance=1.5]
            \node (L) {L};
            \node[below=of L] (F) {F};
            \node[below=of F] (O) {O};          
            \node[right=6.5 of L] (N) {N};
            \node[below=of N] (G) {G};
            \node[below=of G] (I) {I};
        \end{scope}

        \node[right=of F] (K) {K};
        \node[above right=0.25 of F] (D) {D};
        \node[below=of D] (M) {M};

        \node[above right=0.175 and 0.75 of K] (E) {E};
        \node[below=of E] (B) {B};
        \node[right=of E] (C) {C};
        \node[below=of C] (H) {H};          

        \node[left=of G] (J) {J};
        \node[above left=0.25 of G] (A) {A};
        \node[below=of A] (P) {P};

        \foreach \a/\b/\c/\d/\e/\f/\g in {L/F/D/K/M/F/O, N/G/P/J/A/G/I, B/I/O/H/B/K/E, C/L/N/E/C/J/H}
            \draw[decorate, thick, black] (\a) -- (\b) -- (\c) -- (\d) -- (\e) -- (\f) -- (\g);
    \end{tikzpicture}
\end{document}

Result

Looks like handwriting! I've used this answer by percusse: https://tex.stackexchange.com/a/49961/14589.

enter image description here

3

This is another elegant solution for your question.

\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,calc}


\begin{document}
\begin{tikzpicture}
    [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        node distance =6cm,
        place/.style={circle,draw=blue!50,fill=blue!20,thick,
                      inner sep=0pt,minimum size=6mm}
    ]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \draw[step=1cm,cyan,very thin] (-5, 5) grid (4,-4);
    \node[place] (L) at (-4,4) {L};
    \node[place] (N) [right=of L]  {N};
    \node[place] (O) [below=of L]  {O};
    \node[place] (I) [below=of N]  {I};
    \node[place] (F)  at (barycentric cs:L=0.1,O=0.1)  {F};
    \node[place] (G)  at (barycentric cs:N=0.1,I=0.1)  {G};

    \node[place] (K) [right=of F,xshift=-5.5cm] {K};
    \node[place] (D) [above=of F,yshift=-5.5cm] at (barycentric cs:F=0.1,K=0.1)  {D};
    \node[place] (M) [below=of F,yshift= 5.5cm] at (barycentric cs:F=0.1,K=0.1)  {M};

    \node[place] (J) [left=of G,xshift=5.5cm] {J};
    \node[place] (A) [above=of G,yshift=-5.5cm] at (barycentric cs:G=0.1,J=0.1)  {A};
    \node[place] (P) [below=of G,yshift= 5.5cm] at (barycentric cs:G=0.1,J=0.1)  {P};

    \node[place] (E) [right=of D,xshift=-4.8cm] {E};
    \node[place] (C) [left=of  A,xshift= 4.8cm] {C};
    \node[place] (B) [right=of M,xshift=-4.8cm] {B};
    \node[place] (H) [left=of  P,xshift= 4.8cm] {H};

    \draw[thick] (L) -- (N);
    \draw[thick] (L) -- (F);
    \draw[thick] (L) -- (C);
    \draw[thick] (N) -- (G);
    \draw[thick] (N) -- (E);
    \draw[thick] (O) -- (F);
    \draw[thick] (O) -- (H);
    \draw[thick] (O) -- (I);
    \draw[thick] (I) -- (G);
    \draw[thick] (I) -- (B);

    \draw[thick] (F) -- (D);
    \draw[thick] (F) -- (M);
    \draw[thick] (K) -- (D);
    \draw[thick] (K) -- (M);

    \draw[thick] (G) -- (A);
    \draw[thick] (G) -- (P);
    \draw[thick] (J) -- (A);
    \draw[thick] (J) -- (P);

    \draw[thick] (K) -- (E);
    \draw[thick] (K) -- (B);
    \draw[thick] (J) -- (C);
    \draw[thick] (J) -- (H);
    \draw[thick] (E) -- (C);
    \draw[thick] (B) -- (H);

\end{tikzpicture}
\end{document}

enter image description here

1
3

This can be easily done with tikz/pgf.

\documentclass{standalone}

\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
    % left
    \node (f) at (0,0) {F};
    \node (d) at (1,1) {D};
    \node (k) at (2,0) {K};
    \node (m) at (1,-1) {M};
    % middle
    \node (e) at (3,1) {E};
    \node (c) at (4,1) {C};
    \node (b) at (3,-1) {B};
    \node (h) at (4,-1) {H};
    % right
    \node (j) at (5,0) {J};
    \node (a) at (6,1) {A};
    \node (g) at (7,0) {G};
    \node (p) at (6,-1) {P};
    % outer
    \node (l) at (0,3) {L};
    \node (n) at (7,3) {N};
    \node (o) at (0,-3) {O};
    \node (i) at (7,-3) {I};
    % connections
    \draw (f) -- (d) -- (k) --(m) -- (f);
    \draw (k) -- (e) -- (c) -- (j);
    \draw (k) -- (b) -- (h) -- (j);
    \draw (j) -- (a) -- (g) --(p) -- (j);
    \draw (f) -- (l) -- (n) -- (g) -- (i) -- (o) -- (f);
    \draw (l) -- (c);
    \draw (e) -- (n);
    \draw (o) -- (h);
    \draw (b) -- (i);
\end{tikzpicture}

\end{document}

Screenshot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .