[Tex/LaTex] How to align the tree using forest

foresttrees

I am trying to make a tree using forest. It is within minipage environment. But the tree does not aligns with the center of the page. Moreover I would like it if the subsequent levels too were centered around one vertical line.

\documentclass{article}
\usepackage{forest}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{caption}
\begin{document}
\begin{minipage}{\linewidth}
\makebox[\linewidth]{
\begin{forest}
for tree={
grow'=east,draw=black,parent anchor=east,child anchor=west, align=center,
edge path={
    \noexpand\path[\forestoption{edge}]
    (!u.parent anchor) -- +(10pt,0) |- 
    (.child anchor)\forestoption{edge label};
},
}
[Microfabrication,
[Subtractive, 
[\begin{minipage}{4.5cm}{
  \begin{enumerate}
  \item \noindent $\mu$ -EDM
  \item \noindent $\mu$ -ECM
  \item \noindent LBM
  \item \noindent EBM
  \item \noindent Micro-Cutting
  \item \noindent PCM
  \end{enumerate}}
  \end{minipage}]
  ]
  [Additive
  [\begin{minipage}{4.5cm}{
  \begin{enumerate}
  \item Surface Coating
  \item Direct Writing
  \item Stereolithography
  \item Chemical \\ Deposition
  \item Polymer \\ Deposition
  \end{enumerate}}
  \end{minipage}]
  ]
  [Lithography Based
  [\begin{minipage}{4.5cm}{
  \begin{enumerate}
  \item Photolithography
  \item LIGA
  \item Soft Lithography
  \item X-Ray \\ Lithography
  \end{enumerate}}
  \end{minipage}]
  ]
  [Hybrid
  [\begin{minipage}{4.5cm}{
  \begin{enumerate}
  \item  Surface Coating
  \item  Direct Writing
  \item  Stereolithography
  \item  Chemical Deposition
  \item  Polymer Deposition
  \end{enumerate}}
  \end{minipage}]
  ]
  ]
  \end{forest}}
  \captionof{figure}{Microfabrication Techniques}
  \end{minipage}
  \end{document}

Here is the output
Output

Best Answer

I dispensed with the minipage environment and I made it easier to handle. Also, I centered the titles and streched the boxes with the items.

enter image description here

\documentclass{article}
\usepackage[left=5pt,right=5pt,top=10pt,bottom=10pt]{geometry}
\usepackage{forest}
\usepackage{caption}
\newcommand{\vs}{\vspace{2mm}}

\begin{document}

\begin{figure}
\centering
\resizebox{0.9\textwidth}{!}{%
\begin{forest}
    for tree={
    child anchor=west,
    parent anchor=east,
    grow'=east, text centered,
    text width=5cm,
    draw,
    anchor=west,
    edge path={
    \noexpand\path[\forestoption{edge}]
        (.child anchor) -| +(-2pt,0) -- +(-8pt,0) |-
        (!u.parent anchor)\forestoption{edge label};
            },
    }
    [\centering Microfabrication
        [{Subtractive}
            [{\begin{enumerate}
                \item $\mu$ -EDM
                \item $\mu$ -ECM
                \item LBM
                \item EBM
                \item Micro-Cutting
                \item PCM
            \end{enumerate}}\vs
        ]
    ]
    [Additive
            [{\begin{enumerate}
                \item Surface Coating
                \item Direct Writing
                \item Stereolithography
                \item Chemical Deposition
                \item Polymer Deposition
            \end{enumerate}}\vs
        ]
    ] 
    [Lithography Based
            [{\begin{enumerate}
                \item Photolithography
                \item LIGA
                \item Soft Lithography
                \item X-Ray Lithography
            \end{enumerate}}\vs
        ]
    ]
    [Hybrid
            [{\begin{enumerate}
                \item  Surface Coating
                \item  Direct Writing
                \item  Stereolithography
                \item  Chemical Deposition
                \item  Polymer Deposition
            \end{enumerate}}\vs
        ]
    ]
]
\end{forest}}
\caption{Microfabrication Techniques}
\end{figure}
\end{document}
Related Question