我正在尝试插入 SWOT 分析,但在正确显示它以及在 tikz swot 底部插入图题和子题注时遇到了问题。这是代码。希望有人能帮助我。谢谢!
\usepackage{times}
\usepackage{tikz}
\usetikzlibrary{matrix}
\newcommand{\texta}{Helpful\\[-1ex]}
\newcommand{\textb}{Harmful\\[-1ex]}
\newcommand{\textcn}{Internal origin\\[-1ex]}
\newcommand{\textdn}{External origin\\[-1ex]}
\caption{SWOT Analysis for additive manufacturing. Adapted from \cite{AM_std}}
\label{tab:swot}
\begin{tikzpicture}[
any/.style={draw,minimum width=3cm,minimum height=3cm,text width=5cm,align=center},
header/.style={any,minimum height=1cm,fill=black!10},
leftcol/.style={header,rotate=90}
]
\matrix (SWOT) [matrix of nodes,nodes={any,anchor=center},column sep=-1\pgflinewidth,row sep=-1\pgflinewidth,inner sep=0pt]
{
&|[header]| {\texta} & |[header]| {\textb} \\
|[leftcol]| {\textcn} & \begin{itemize}
\item E-supply chain, global distributed production
\item Unique topological optimized products
\item Multi material and graded structures are possible (S)
\item Economies of scale: series of 1
\item On-demand production
\item High buy-to-fly ratio
\item Sustainable production
\item Knowledge intensive processes
\end{itemize} &\begin{itemize}
\item Not sufficient standardization of new technologies (S)
\item Low process speed - high cost per part
\item Real-time process control is required (S)
\item No material standards available (S)
\item Part accuracy is low, post processing needed (S)
\item High material cost (S)
\item No process specific test method available (S)
\item Not sufficient education of users
\end{itemize} \\
|[leftcol]| {\textdn} & \begin{itemize}
\item AM and traditional manufacturing hybrid combination
\item Integration of AM in existing production line (S)
\item Customized design - introduction of new design tools (S)
\item Multi-material and smart products (S)
\item Material recycle (S)
\item New business models for DDM (S)
\item High potential in high tech industries
\end{itemize} & \begin{itemize}
\item Not many OEMs in Europe
\item Limited knowledge of AM
\item More competition will arise
\end{itemize} \\
};
\end{tikzpicture}
\caption*{S indicates standardization ongoing activities}
答案1
看来你从我的答案到使用 TikZ 的 SWOT 矩阵,所以我坚持认为在定义节点之前必须知道节点的大小。
minimum height
并且minimum width
只修复最小值,当节点内容不适合这个时minimum height|width|size
,节点会被放大。这是代码的主要问题,minimum height=3cm
不足以容纳列表,并且所有列表都调整为large enough height
。经过一些测试,似乎minimum height=9.5cm
更好。现在的问题是表格太大而不适合页面,但这是另一个问题。
\documentclass{article}
\usepackage{times}
\usepackage{tikz}
\usetikzlibrary{matrix}
\newcommand{\texta}{Helpful\\[-1ex]}
\newcommand{\textb}{Harmful\\[-1ex]}
\newcommand{\textcn}{Internal origin\\[-1ex]}
\newcommand{\textdn}{External origin\\[-1ex]}
\begin{document}
\begin{figure}
\caption{SWOT Analysis for additive manufacturing. Adapted from \cite{AM_std}}
\label{tab:swot}
\begin{tikzpicture}[
any/.style={draw,minimum width=3cm,minimum height=9.5cm,text width=5cm,align=center},
header/.style={any,minimum height=1cm,fill=black!10},
leftcol/.style={header,rotate=90, minimum width=9.5cm}
]
\matrix (SWOT) [matrix of nodes,nodes={any,anchor=center},column sep=-1\pgflinewidth,row sep=-1\pgflinewidth,inner sep=0pt]
{
&|[header]| {\texta} & |[header]| {\textb} \\
|[leftcol]| {\textcn} & \begin{itemize}
\item E-supply chain, global distributed production
\item Unique topological optimized products
\item Multi material and graded structures are possible (S)
\item Economies of scale: series of 1
\item On-demand production
\item High buy-to-fly ratio
\item Sustainable production
\item Knowledge intensive processes
\end{itemize} &\begin{itemize}
\item Not sufficient standardization of new technologies (S)
\item Low process speed - high cost per part
\item Real-time process control is required (S)
\item No material standards available (S)
\item Part accuracy is low, post processing needed (S)
\item High material cost (S)
\item No process specific test method available (S)
\item Not sufficient education of users
\end{itemize} \\
|[leftcol]| {\textdn} & \begin{itemize}
\item AM and traditional manufacturing hybrid combination
\item Integration of AM in existing production line (S)
\item Customized design - introduction of new design tools (S)
\item Multi-material and smart products (S)
\item Material recycle (S)
\item New business models for DDM (S)
\item High potential in high tech industries
\end{itemize} & \begin{itemize}
\item Not many OEMs in Europe
\item Limited knowledge of AM
\item More competition will arise
\end{itemize} \\
};
\end{tikzpicture}
\caption*{S indicates standardization ongoing activities}
\end{figure}
\end{document}
更新
node
可以在矩阵下方引入脚注作为新内容swot
。
以下代码还引入了一些其他改进。并非所有行都具有相同的高度,字体大小是small
为了减小整体尺寸。styles
已为每行、每列甚至行和列元素定义了字体大小,这样更容易更改它们。
无论如何,我认为最好使用哈里什·库马尔回答SWOT 表 - 如何转换为文章?对于这种 SWOT 表。
\documentclass[11pt,a4paper,UKenglish]{memoir}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage{tikz}
\usepackage{lipsum}
\usetikzlibrary{matrix, positioning}
\newcommand{\texta}{Helpful\\[-1ex]}
\newcommand{\textb}{Harmful\\[-1ex]}
\newcommand{\textcn}{Internal origin\\[-1ex]}
\newcommand{\textdn}{External origin\\[-1ex]}
\begin{document}
\begin{figure}
\caption{SWOT Analysis for additive manufacturing. Adapted from \cite{AM_std}}
\label{tab:swot}
\centering
\begin{tikzpicture}[font=\small,
any/.style={draw, text width=.5\linewidth-1cm, align=center, anchor=center, inner sep=1pt},
row 1/.style={nodes={any, minimum height=1cm, fill=black!10}},
row 2/.style={nodes={any, minimum height=9cm}},
row 3/.style={nodes={any, minimum height=8.2cm}},
row 2 column 1/.style={nodes={any, minimum height=1cm, fill=black!10, rotate=90, minimum width=9cm}},
row 3 column 1/.style={nodes={any, minimum height=1cm, fill=black!10, rotate=90, minimum width=8.2cm}}
]
\matrix (SWOT) [matrix of nodes,
column sep=-1\pgflinewidth,
row sep=-1\pgflinewidth,
inner sep=0pt]
{
& {\texta} & {\textb} \\
{\textcn} & \begin{itemize}
\item E-supply chain, global distributed production
\item Unique topological optimized products
\item Multi material and graded structures are possible (S)
\item Economies of scale: series of 1
\item On-demand production
\item High buy-to-fly ratio
\item Sustainable production
\item Knowledge intensive processes
\end{itemize} &\begin{itemize}
\item Not sufficient standardization of new technologies (S)
\item Low process speed - high cost per part
\item Real-time process control is required (S)
\item No material standards available (S)
\item Part accuracy is low, post processing needed (S)
\item High material cost (S)
\item No process specific test method available (S)
\item Not sufficient education of users
\end{itemize} \\
{\textdn} & \begin{itemize}
\item AM and traditional manufacturing hybrid combination
\item Integration of AM in existing production line (S)
\item Customized design - introduction of new design tools (S)
\item Multi-material and smart products (S)
\item Material recycle (S)
\item New business models for DDM (S)
\item High potential in high tech industries
\end{itemize} & \begin{itemize}
\item Not many OEMs in Europe
\item Limited knowledge of AM
\item More competition will arise
\end{itemize} \\
};
\node[below right =1mm of SWOT.south west] {S indicates standardization ongoing activities};
\end{tikzpicture}
\end{figure}
\end{document}