Im getting a problem with the background when the tikz figure is scaled. This is my MWE:

\documentclass[14pt,a4paper]{extarticle} %,twoside Usado en latex-ssau-gost-style-master
%\usepackage{mutavel}   % Usado en latex-ssau-gost-style-master                 

    \draw #1+(\AngleStart:0.15cm) arc (\AngleStart:\AngleEnd:0.15cm);              

    deci/.style={diamond, draw, fill=blue!20, text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt},
    proc/.style={rectangle, draw, fill=blue!20,text width=10em, text centered, rounded corners, minimum height=4em},
    line/.style={draw, -latex'},
    io/.style={draw, ellipse,fill=red!20, node distance=3cm, minimum height=2em},
    data/.style={trapezium, draw, trapezium left angle = 50, trapezium right angle = 130,text width=7em, text centered, minimum height=4em, fill=blue!20,   trapezium stretches body,},

    \begin{tikzpicture}[node distance = 3cm, auto,thick,scale=0.75, every node/.style={scale=0.6}]
    % Place nodes
    \node (init) [io] {Начало};
    \node (imdb)  [data, below of=init] {Геометрические,\\атмосферные и лётные характеристики};
    \node (norm)  [proc, below of=imdb] {Нормирование нагрузок};
    \node (vlm)    [proc, below of=norm] {Аэродинамический расчёт};
    \node (static) [proc,below of =vlm] {Статический расчёт};
    \node (seval)  [proc, below of=static] {Расчёт $C_k$};
    \node (out) [data, below of=seval,node distance=3cm]  {Запись результатов\\$\Gamma, C_k$};
    \node (end) [io, below of=out] {Конец};
    % Draw edges
    \path [line] (init) -- (imdb);
    \path [line] (imdb) -- (norm);
    \path [line] (norm) -- node{$\alpha(C_y^{A'}),\alpha(C_y^{D'})$} (vlm); 
    \path [line] (vlm) -- node {Файл .cdb}(static);
    \path [line] (static) -- node (mapdl) [right=3cm] {MAPDL} (seval);
    \path [line] (static) -- node {$\sigma_\textup{экв i}, v_i$} (seval);
    \path [line] (seval) -- (out);
    \path [line] (out) -- (end);
        \node[transfer shape] (MAPDL) [fit = (static)(seval)(mapdl),fill=yellow!10,rounded corners, draw=black!50, dashed] {};
    \caption{Блок-схема процесса расчёта весовых характеристик крыла}


This is the desire result:

enter image description here

This is the result of what I have done:

enter image description here

  • Doesn't work. I get the next error: ! Package pgfkeys Error: I do not know the key '/tikz/transfer shape' and I am going to ignore it. Perhaps you misspelled it. – Oscar Espinosa Jun 14 at 13:21
  • I am sorry to misremember the option ,It is \node[transform shape] ... – ZhiyuanLck Jun 14 at 13:25
  • Still doesn' work. But I already solve it adding \node[scale=1.7]. – Oscar Espinosa Jun 14 at 13:52
  • 1
    Instead of every node/.style={scale=0.6}, I suggest you to write every node/.style={transform shape}, scale=0.6 – ZhiyuanLck Jun 14 at 13:58
  • I'll keep that in mind, thanks for the help. – Oscar Espinosa Jun 14 at 14:19

Adding the next line, its a way to solve the problem:


Also could be used the next solution proposed by @ZhiyuanLck:

Instead of every node/.style={scale=0.6}, I suggest you to write every node/.style={transform shape}, scale=0.6

| improve this answer | |

I would not scale image, rather reduce font size and size of nodes:

\documentclass[14pt,a4paper]{extarticle} %,twoside Usado en latex-ssau-gost-style-master
\usepackage{mutavel}   % Usado en latex-ssau-gost-style-master


           font = \small,
    base/.style = {draw, thick, align=center, inner xsep= 1pt},
    deci/.style = {diamond, base, fill=blue!20, text width=4.5em},
    proc/.style = {rectangle, base, rounded corners, fill=blue!20,
                   text width=9em, minimum height=3em},
      io/.style = {ellipse, base, fill=red!20, minimum height=2em},
    data/.style = {trapezium, base,  
                   trapezium stretches body, fill=blue!20,
                   trapezium left angle=70, trapezium right angle=110,
                   text width=7em, minimum height=3em},
    line/.style = {draw, thick, -latex'}       

node distance = 7mm and 3mm,
  start chain = going below,
    \begin{scope}[every node/.append style={on chain,join=by line}]% Place nodes
\node (init)    [io]    {Начало};
\node (imdb)    [data]  {Геометрические, атмосферные и лётные характеристики};
\node (norm)    [proc]  {Нормирование нагрузок};
\node (vlm)     [proc]  {Аэродинамический расчёт};
\node (static)  [proc]  {Статический расчёт};
\node (seval)   [proc]  {Расчёт $C_k$};
\node (out)     [data]  {Запись результатов\\$\Gamma, C_k$};
\node (end)     [io]    {Конец};
% Edges labels
\path   (norm)   -- node[right] {$\alpha(C_y^{A'}),\alpha(C_y^{D'})$}   (vlm) 
        (vlm)    -- node[right] {Файл .cdb}                             (static) 
        (static) -- node (mapdl) [right=2cm] {MAPDL}                    (seval)
        (static) -- node[right] {$\sigma_\textup{экв i}, v_i$}          (seval)
\scoped[on background layer]
\node (MAPDL) [fit = (static)(seval)(mapdl),
               fill=yellow!10,rounded corners, draw=black!50, dashed] {};
\caption{Блоки-схемы субпроцессов}

enter image description here

| improve this answer | |

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.