1

I created a flowchart which looks like the Image I left atacched.I tried these codes but the flowchart does not fit in the page, probably because I set specific margins in my document.

\documentclass[14pt]{extreport}
\usepackage[lmargin=1.3in, rmargin=1in, tmargin=1in, bmargin=1in]{geometry}
\usepackage{fontspec}
\setmainfont{Times New Roman}

These are the lines of code I used for the flowchart:

\usetikzlibrary{positioning,arrows.meta}
\newcommand \bhead[1]{\textcolor{blue!50!gray}{\textbf{#1}}}

\tikzset{%
  common/.style={text centered,draw=black,font=\sffamily,thick},
  process/.style={rounded corners, text width=5cm, minimum height=2cm, common, draw=blue!50!gray},
  arrow/.style={ultra thick,blue!50!gray,shorten >=2.5mm,shorten <=2.5mm,-Triangle},
  input/.style={text width=2.25cm, minimum height=2.5cm, common,draw=blue!50!gray},
  no/.style={circle,fill=blue!50!gray,text=white,font=\sffamily,minimum size=2.5mm,anchor=center},
}

\begin{tikzpicture}[node distance=2cm]
  
  \node (design) [process] {Design\\(e.g., microprocessor design)};
  \node (fabrication) [process, right=of design] {\bhead{Fabrication}\\(e.g., processed wafers)};
  \node (assembly) [process, right=of fabrication] {\bhead{Assembly \& Test}\\(e.g., packaged microprocessor units)};
  
  \node (designsw) [input, below=of design.south west,anchor=north west]{\bhead{Design Software}\\(e.g., electronic design automation)};
  \node (intellectual) [input, below=of design.south east,anchor=north east]{\bhead{Intellectual Property}\\(e.g., licensed ARM architecture)};
  \node (materials) [input, below=of fabrication.south west,anchor=north west] {\bhead{Materials \& Chemicals}\\(e.g., raw silicon wafers, neon)};
  \node (equipment) [input, below=of fabrication.south east,anchor=north east] {\bhead{Manufacturing Equipment}\\(e.g.,\\lithography tools)};
  
  \draw [arrow] (design) -- (fabrication);
  \draw [arrow] (fabrication) -- (assembly);
  
  \draw [arrow] (designsw) -- (design.south -| designsw);
  \draw [arrow] (intellectual) -- (design.south -| intellectual);
  \draw [arrow] (materials) -- (fabrication.south -| materials);
  \draw [arrow] (equipment) -- (fabrication.south -| equipment);
  
  \foreach \i [count=\j] in {design,fabrication,assembly}
  {
    \node [no] at (\i.north west) {\j};
  }
  
\end{tikzpicture}

I would like to have a blue sky as a color if it is possible. Thanks in advanceenter image description here

4
  • I mean, you could put the tikzpicture inside a resizebox with ! as the width parameter. You could also use scale, or (maybe) width and height parameters
    – Jasper
    Commented Jun 29 at 13:24
  • Please include a link to your earlier question and indicate which answer you're using, if any. tex.stackexchange.com/questions/721061/…
    – cfr
    Commented Jun 29 at 17:00
  • 2
    I'd consider two options: let the figure move to another page and turn it sideways or (if that's not desirable) reorganise the diagram. Scaling isn't a good option as it leads to inconsistencies in font sizes, line widths etc. and the whole point of using something like pgf is to get consistency. (Or a large part of the point.) You can change the colours to whatever you wish. Just alter the definitions in \tikzset{}. E.g. blue!50!cyan or whatever.
    – cfr
    Commented Jun 29 at 17:11
  • Things will be easier, when you draw your flowchart in a separate file using standalone , and in your main document including it via package graphicx. See here for an example: tex.stackexchange.com/a/701698/245790
    – MS-SPO
    Commented Jul 4 at 15:12

1 Answer 1

1

Here is my proposal transfered to your situation.

1. standalone class

Prepare, e.g. scFlowChrat.tex, and compile it to pdf:

\documentclass[10pt,border=3mm,tikz]{standalone}
 \usetikzlibrary{positioning,arrows.meta}
\newcommand \bhead[1]{\textcolor{blue!50!gray}{\textbf{#1}}}

\begin{document}

\tikzset{%
  common/.style={text centered,draw=black,font=\sffamily,thick},
  process/.style={rounded corners, text width=5cm, minimum height=2cm, common, draw=blue!50!gray},
  arrow/.style={ultra thick,blue!50!gray,shorten >=2.5mm,shorten <=2.5mm,-Triangle},
  input/.style={text width=2.25cm, minimum height=2.5cm, common,draw=blue!50!gray},
  no/.style={circle,fill=blue!50!gray,text=white,font=\sffamily,minimum size=2.5mm,anchor=center},
}

\begin{tikzpicture}[node distance=2cm]
  
  \node (design) [process] {Design\\(e.g., microprocessor design)};
  \node (fabrication) [process, right=of design] {\bhead{Fabrication}\\(e.g., processed wafers)};
  \node (assembly) [process, right=of fabrication] {\bhead{Assembly \& Test}\\(e.g., packaged microprocessor units)};
  
  \node (designsw) [input, below=of design.south west,anchor=north west]{\bhead{Design Software}\\(e.g., electronic design automation)};
  \node (intellectual) [input, below=of design.south east,anchor=north east]{\bhead{Intellectual Property}\\(e.g., licensed ARM architecture)};
  \node (materials) [input, below=of fabrication.south west,anchor=north west] {\bhead{Materials \& Chemicals}\\(e.g., raw silicon wafers, neon)};
  \node (equipment) [input, below=of fabrication.south east,anchor=north east] {\bhead{Manufacturing Equipment}\\(e.g.,\\lithography tools)};
  
  \draw [arrow] (design) -- (fabrication);
  \draw [arrow] (fabrication) -- (assembly);
  
  \draw [arrow] (designsw) -- (design.south -| designsw);
  \draw [arrow] (intellectual) -- (design.south -| intellectual);
  \draw [arrow] (materials) -- (fabrication.south -| materials);
  \draw [arrow] (equipment) -- (fabrication.south -| equipment);
  
  \foreach \i [count=\j] in {design,fabrication,assembly}
  {
    \node [no] at (\i.north west) {\j};
  }
  
 \end{tikzpicture}
\end{document}

standalone

2. your main document

Just include above's .pdf like an image (it's still scalable, just zoom in). You will be amazed about the degree of flexibility this approach holds, and if it's only to reduce code in your main document.

\documentclass[10pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{lipsum}

\begin{document}
    \section{Whatever you want}
    
    \lipsum[5]
    
    \textbf{See figure \ref{chart} for details.} % just to "highlight" it
    
    \begin{figure}% Latex will position this floating environment itself
     \centering
     \includegraphics[width=\textwidth]{scFlowChart}
     \caption{The SC flow\label{chart}}
    \end{figure}
    
    \lipsum[7]
    
\end{document}

result

3. remarks

You should refactor your tikz code somewhat. E.g. introduce some more styles to improve legibility/read-ability. At least ...

You must log in to answer this question.

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