1

I'm using \newgeometry to adjust the margins temporarily so that my figure fits the page. After the figure, I use \restoregeometry to revert to the original margins.

\documentclass[14pt]{extreport}
\usepackage{float}
\usepackage{afterpage}
\usepackage{lipsum}
\usepackage{pdfpages}
\usepackage{graphicx}
\usepackage[lmargin=1.3in, rmargin=1in, tmargin=1in, bmargin=1in]{geometry}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage{csquotes}
\usepackage{array}
\usepackage{amsmath}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{siunitx}
\usetikzlibrary{shapes.geometric, intersections, calc, positioning, arrows.meta, backgrounds, quotes, ext.positioning-plus, ext.paths.ortho, graphs}

\begin{document}
\sffamily

\newgeometry{lmargin=0.1in, rmargin=0.1in, tmargin=0.4in, bmargin=1in}
\vspace*{-\baselineskip}
\begin{figure}[!t]
  \centering
\begin{tikzpicture}[
  node distance=.4cm and 1.2cm,
  >=Latex, thick,
  adjust matrix area/.style args={#1#2#3}{
    insert path={([shift={(#1.25em,#2.25em)}]#3)}},
  singleline box/.style={minimum width=+7em, text depth=+.1\baselineskip},
  multiline box/.style={singleline box, minimum height=+4em, align=center},
  gray box/.style={draw, fill=gray!10},
  blue box/.style={draw, fill=black, text=white, multiline box},
  magenta box/.style={draw, fill=cyan!80!blue, text=white, singleline box},
  every outer matrix/.append style={inner sep=+.3em},
  scale=0.6,
  transform shape
]
\matrix[gray box] (cp) {
  \tikzset{name prefix=cp+}
  \path[nodes=blue box]
    node(Design) {Design}
    node[right=of Design] (Fabric) {Fabrication}
    node[right=of Fabric] (Assemb) {Assembly,\\Testing, and\\Packaging};
  \path[nodes=magenta box]
    node[above=of Design] (Fables) {\textbf{Fabless}}
    node[above=of Fabric] (Foundr) {\textbf{Foundry}}
    node[above=of Assemb] (OSAT)   {\textbf{OSAT}}
    node[above=of -(Fables)(OSAT)] (IDM) {\textbf{Integrated Device Manufacturer}};
  \node[above=.5:of IDM] (cp) {\textbf{Chip Production}}
    [adjust matrix area/.list={--Design.south west, +-Assemb.south east}];
  \\};
\matrix[gray box, below=of cp] (icp) {
  \tikzset{name prefix=icp+}
  \path[nodes=blue box]
    node                  (EDAC) {Electronic\\Design\\Automation and\\Core IP}
    node[right=of EDAC]   (SME)  {Semiconductor\\Manufacturing\\Equipment}
    node[right=of SME]    (Matr) {Materials};
  \node[below=.5:of SME] (icp) {\textbf{Inputs to Chip Production}}
    [adjust matrix area/.list={-+EDAC.north west, ++Matr.north east}];
  \\};
\coordinate (cpicp-west) at ($(cp.south west)!.5!(icp.north west)$)
 coordinate (cpicp-east) at ($(cp.south east)!.5!(icp.north east)$);
\node[left =of cpicp-west, blue box, font=\Large] (RandD) {\textbf{R\&D}};
\node[right=of cpicp-east, gray box, multiline box, font=\Large] (EndUse) {\textbf{End Use}};

\graph[use existing nodes, /tikz/ortho/install shortcuts]{
  cp+Design ->     cp+Fabric -> cp+Assemb ->[-|] EndUse,
  icp+EDAC  ->     cp+Design,
  icp+SME   ->     {cp+Fabric, cp+Assemb, icp+Matr},
  icp+Matr  ->     {cp+Fabric, cp+Assemb},
  RandD     ->[|-] {cp, icp}
};
\end{tikzpicture}
\caption{Flowchart of the semiconductor industry}
\end{figure}

\restoregeometry

I need to write some text right below the figure

\end{document}

I'm encountering two problems:

  1. I cannot write text right below the figure, even when there is still some space.
  2. The font style changes after using \restoregeometry.
1

2 Answers 2

1

Do not use the figure environment and only \makebox:

\documentclass[14pt]{extreport}
\usepackage[lmargin=1.3in, rmargin=1in, tmargin=1in, bmargin=1in]{geometry}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage{tikz}
\usepackage{siunitx}
\usepackage{caption}
\usetikzlibrary{shapes.geometric, intersections, calc, positioning, arrows.meta, backgrounds, quotes, 
ext.positioning-plus, ext.paths.ortho, graphs}

\begin{document}
    \sffamily
\makebox[\linewidth]{%}
  \parbox{\paperwidth}{%}
        \frame{\begin{tikzpicture}[
            node distance=.4cm and 1.2cm,>=Latex, thick,
            adjust matrix area/.style args={#1#2#3}{%
                insert path={([shift={(#1.25em,#2.25em)}]#3)}},
            singleline box/.style={minimum width=+7em, text depth=+.1\baselineskip},
            multiline box/.style={singleline box, minimum height=+4em, align=center},
            gray box/.style={draw, fill=gray!10},
            blue box/.style={draw, fill=black, text=white, multiline box},
            magenta box/.style={draw, fill=cyan!80!blue, text=white, singleline box},
            every outer matrix/.append style={inner sep=+.3em},
            scale=0.6,
            transform shape
            ]
            \matrix[gray box] (cp) {
                \tikzset{name prefix=cp+}
                \path[nodes=blue box]
                node(Design) {Design}
                node[right=of Design] (Fabric) {Fabrication}
                node[right=of Fabric] (Assemb) {Assembly,\\Testing, and\\Packaging};
                \path[nodes=magenta box]
                node[above=of Design] (Fables) {\textbf{Fabless}}
                node[above=of Fabric] (Foundr) {\textbf{Foundry}}
                node[above=of Assemb] (OSAT)   {\textbf{OSAT}}
                node[above=of -(Fables)(OSAT)] (IDM) {\textbf{Integrated Device Manufacturer}};
                \node[above=.5:of IDM] (cp) {\textbf{Chip Production}}
                [adjust matrix area/.list={--Design.south west, +-Assemb.south east}];
                \\};
            \matrix[gray box, below=of cp] (icp) {
                \tikzset{name prefix=icp+}
                \path[nodes=blue box]
                node                  (EDAC) {Electronic\\Design\\Automation and\\Core IP}
                node[right=of EDAC]   (SME)  {Semiconductor\\Manufacturing\\Equipment}
                node[right=of SME]    (Matr) {Materials};
                \node[below=.5:of SME] (icp) {\textbf{Inputs to Chip Production}}
                [adjust matrix area/.list={-+EDAC.north west, ++Matr.north east}];
                \\};
            \coordinate (cpicp-west) at ($(cp.south west)!.5!(icp.north west)$)
            coordinate (cpicp-east) at ($(cp.south east)!.5!(icp.north east)$);
            \node[left =of cpicp-west, blue box, font=\Large] (RandD) {\textbf{R\&D}};
            \node[right=of cpicp-east, gray box, multiline box, font=\Large] (EndUse) {\textbf{End Use}};
            
            \graph[use existing nodes, /tikz/ortho/install shortcuts]{
                cp+Design ->     cp+Fabric -> cp+Assemb ->[-|] EndUse,
                icp+EDAC  ->     cp+Design,
                icp+SME   ->     {cp+Fabric, cp+Assemb, icp+Matr},
                icp+Matr  ->     {cp+Fabric, cp+Assemb},
                RandD     ->[|-] {cp, icp}
            };
        \end{tikzpicture}}
        \captionof{figure}{Flowchart of the semiconductor industry}%
    }}
        
I need to write some text right below the figure
    
\end{document}

enter image description here

0

Edit:
For your image I would locally increase \textwidth by use of the changepage package. That fonts in text and in floats would be sans serif, I would add to the preamble instruction \renewcommand\familydefault{\sfdefault} and remove \sffamily command after \begin{document}:

\documentclass[14pt]{extreport}
\usepackage[hmargin={1.3in, 1in}, 
            vmargin=1in
            ]{geometry}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\renewcommand\familydefault{\sfdefault}  % new

\usepackage{graphicx}
\usepackage[strict]{changepage} % new
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                backgrounds, 
                calc, 
                ext.paths.ortho, ext.positioning-plus, 
                graphs,
                intersections, 
                positioning,  
                quotes, 
                shapes.geometric}

\usepackage{lipsum}
\usepackage[base]{babel} % for use lipsum at LuaLaTeX engine

\begin{document}
%\sffamily    % removed
    \begin{figure}[!t]
\begin{adjustwidth*}{-0.9in}{-0.9in} % <---
  \centering
\begin{tikzpicture}[
  node distance=.4cm and 1.2cm,
  >=Latex, thick,
  adjust matrix area/.style args={#1#2#3}{
    insert path={([shift={(#1.25em,#2.25em)}]#3)}},
  singleline box/.style={minimum width=+7em, text depth=+.1\baselineskip},
  multiline box/.style={singleline box, minimum height=+4em, align=center},
  gray box/.style={draw, fill=gray!10},
  blue box/.style={draw, fill=black, text=white, multiline box},
  magenta box/.style={draw, fill=cyan!80!blue, text=white, singleline box},
  every outer matrix/.append style={inner sep=+.3em},
  scale=0.6,
  transform shape
]
\matrix[gray box] (cp) {
  \tikzset{name prefix=cp+}
  \path[nodes=blue box]
    node(Design) {Design}
    node[right=of Design] (Fabric) {Fabrication}
    node[right=of Fabric] (Assemb) {Assembly,\\Testing, and\\Packaging};
  \path[nodes=magenta box]
    node[above=of Design] (Fables) {\textbf{Fabless}}
    node[above=of Fabric] (Foundr) {\textbf{Foundry}}
    node[above=of Assemb] (OSAT)   {\textbf{OSAT}}
    node[above=of -(Fables)(OSAT)] (IDM) {\textbf{Integrated Device Manufacturer}};
  \node[above=.5:of IDM] (cp) {\textbf{Chip Production}}
    [adjust matrix area/.list={--Design.south west, +-Assemb.south east}];
  \\};
\matrix[gray box, below=of cp] (icp) {
  \tikzset{name prefix=icp+}
  \path[nodes=blue box]
    node                  (EDAC) {Electronic\\Design\\Automation and\\Core IP}
    node[right=of EDAC]   (SME)  {Semiconductor\\Manufacturing\\Equipment}
    node[right=of SME]    (Matr) {Materials};
  \node[below=.5:of SME] (icp) {\textbf{Inputs to Chip Production}}
    [adjust matrix area/.list={-+EDAC.north west, ++Matr.north east}];
  \\};
\coordinate (cpicp-west) at ($(cp.south west)!.5!(icp.north west)$)
 coordinate (cpicp-east) at ($(cp.south east)!.5!(icp.north east)$);
\node[left =of cpicp-west, blue box, font=\Large] (RandD) {\textbf{R\&D}};
\node[right=of cpicp-east, gray box, multiline box, font=\Large] (EndUse) {\textbf{End Use}};

\graph[use existing nodes, /tikz/ortho/install shortcuts]{
  cp+Design ->     cp+Fabric -> cp+Assemb ->[-|] EndUse,
  icp+EDAC  ->     cp+Design,
  icp+SME   ->     {cp+Fabric, cp+Assemb, icp+Matr},
  icp+Matr  ->     {cp+Fabric, cp+Assemb},
  RandD     ->[|-] {cp, icp}
};
\end{tikzpicture}
\caption{Flowchart of the semiconductor industry}
\end{adjustwidth*}  % <---
    \end{figure}

I need to write some text right below the figure. \lipsum[66]

\end{document}

enter image description here

You must log in to answer this question.

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