TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Could somebody help me, please?

I'd like to define a new shape with parameters (input/ouput variables and a automat).

It should look like:

INPUT                                          OUTPUT
|      |                                      |      |
|  v1  |                                      |      |
|      |                                      |      |
+------+             AUTOMAT                  |  o1  |
|      |                                      |      |
|  v2  |                                      |      |
|      |                                      |      |

I'm not skilled enought to define such a complex object. I appreciate any help.

share|improve this question
Welcome to TeX.sx! Instead of posting a “Thank you” as an additional answer, you should thank Claudio by upvoting his answer (with the upward pointing arrow to the left of it) and accepting it (by clicking on the checkmark). – diabonas Jul 24 '12 at 9:46
@drh In order to accept or upvote answers (and contribute to the community with questions and, possibly, answers) you should register. – egreg Jul 24 '12 at 11:07

Do you mean something like this?

enter image description here

The picture has been realized by means of:




\tikzset{drawinside/.code n args={4}{%
        \node at ($(#1.north west)!0.5!(#1.west)!0.15!(#1.center)$){#2};
        \node at ($(#1.south west)!0.5!(#1.west)!0.15!(#1.center)$){#3};        
        \draw($(#1.north west)!0.30!(#1.north)$)--($(#1.south west)!0.30!(#1.south)$);
        \draw($(#1.north east)!0.30!(#1.north)$)--($(#1.south east)!0.30!(#1.south)$);
        \node at ($(#1.east)!0.15!(#1.center)$) {#4};

\tikzset{record/.style args={#1 and #2}{
        rectangle,draw,minimum width=#1, minimum height=#2

\NewDocumentCommand{\drawrecord}{d() m m m}{
\node[record=\recordwidth cm and \recordheight cm,name=a\theimage]{};
\node[record=\recordwidth cm and \recordheight cm,name=a\theimage]at(#1){};



The basic command is \drawrecord that accepts as parameters the input and output variables and as an optional parameter, the position of the picture. It is possible to customize the width and the height of the record through the dedicated commands \setrecordwidth and \setrecordheight.

share|improve this answer
That's a first trial, since I don't know how to handle the automat. Is it simply a label to be inserted in the middle? – Claudio Fiandrino Jul 21 '12 at 14:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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