0

It seems very simple, but I'm newbie with diagrams in LaTeX. I would be glad if I receive some help.

diagram

  • Welcome, it would be of great help to all if you could provide your code, so that we know what packages you seek helps from and let us know where you stumbled. – Jesse Mar 20 '16 at 2:44
  • Sorry but I have not idea about diagrams in LaTeX 😕, that's why I'm asking here. – Johannes Dip Mar 20 '16 at 2:46
  • 1
    This post might be helpful tex.stackexchange.com/questions/236704/… – A Feldman Mar 20 '16 at 2:58
  • You could at least provide a minimal document with the text from the image so people who wish to help don't have to copy from the screenshot or start from scratch. Have a look at any of the drawing packages. The diagram is pretty simple, so you should be able to make a start if you want to. – cfr Mar 20 '16 at 3:16
3

Finally I did it.

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows,positioning}
\begin{document}

\tikzstyle{block} = [draw, rectangle, minimum height=3em, minimum width=3em]
\tikzstyle{virtual} = [coordinate]

\begin{tikzpicture}[auto]
    % Place nodes
    \node [virtual]                 (input)                        {};
    \node [block, right of=input, node distance=4cm]   (trule)     {Transformation Rules};
    \node [below of=trule]          (vrule)                        {Validation Rules};
    \node [virtual, right of=trule, node distance=4cm] (output)    {};
    \node [left of=input]           (rinput)                       {A};
    \node [right of=output]         (routput)                      {B};
    % Connect nodes
    \draw [->] (input) -- node [name=i] {\(Input\)} (trule);
    \draw [->] (trule) -- node [name=o] {\(Output\)} (output);
\end{tikzpicture}

\end{document}

finaldiagram

Thanks to everyone, specially A Feldman and AJN.

  • to prevent confusion, you could have edited the previous answer. – naphaneal Mar 20 '16 at 14:47
  • 1
    +1 for answering your own question. For the next time put your initial try at answering (a MWE) into your question rather than in an answer. – A Feldman Mar 20 '16 at 15:16
1

That's what I have done [special thanks to A Feldman for link].

    \documentclass{article}

    \usepackage{tikz}
    \usetikzlibrary{shapes,arrows,positioning}
    \begin{document}

    \tikzstyle{block} = [draw, rectangle, minimum height=3em, minimum width=3em]
    \tikzstyle{virtual} = [coordinate]

    \begin{tikzpicture}[auto, node distance=4cm]
        % Place nodes
        \node [virtual]                 (input)     {};
        \node [block, right of=input]   (trule)     {Transformation Rules};
        \node [below of=trule]          (vrule)     {Validation Rules};
        \node [virtual, right of=trule] (output)    {};
        \node [left of=input]           (rinput)    {Hello};
        \node [right of=output]         (routput)   {World};
        % Connect nodes
        \draw [->] (input) -- node [name=i] {$input$} (trule);
        \draw [->] (trule) -- node [name=o] {$output$}(output);
    \end{tikzpicture}

    \end{document}

But there is too much space between the words and the diagram.

diagramlatex1

  • Good looking MWE! – A Feldman Mar 20 '16 at 3:38
  • Where it says node distance=4cm, what happens if you make it smaller? – cfr Mar 20 '16 at 4:29
  • 1
    Rather than setting a large value for node distance=4cm for the whole picture, set it for individual blocks which you know to be large. e.g, \node [virtual, right of=trule, node distance=3cm] (output) {}; – AJN Mar 20 '16 at 4:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.