答案1
像这样吗?
由于您没有提供文本,我大多重复了一个框。
以下是代码:
\documentclass{article}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\newcommand\infobox[3]{
\node[anchor=base west,rectangle, rounded corners, inner sep=2mm,
minimum height=47mm,
draw=DodgerBlue,thick,fill=DarkTurquoise,text=white] (#2) at #1 {
\begin{minipage}{0.3\textwidth}\raggedright\quad\\ #3 \end{minipage}
};
\node[rectangle,fill=DodgerBlue,text=white,rounded corners] at (#2.north){#2};
}
\begin{document}
\begin{tikzpicture}[scale=\textwidth/84mm]
\draw[black!70,very thick](0,0.1)--node[above]{\Huge The Culprits}(9,0.1) ;
\infobox{(0,-2)}{Virus}{Hepatitis, SARS, Herpes, Mono, AIDS, HIV, Warts,
Influenza, Chicken pox, Cold sores, Small pox, Cold germs, Bird flu,
HSN1, Measles, Norovirus, Tetanus, Yellow fever, Typhoid, Ebola,
Haemorrhagic fever};
\infobox{(3.1,-2)}{Bacteria}{Tuberculosis, Pneumonia, Anthrax,
Urinary tract infection, Staph, Peritonitis, E. coli, Strep
throat, Typhoid, Stomach ulcers, Salmonella, Tulameria,
Morgellons, Lyme disease}
\infobox{(6.2,-2)}{Virus}{Hepatitis, SARS, Herpes, Mono, AIDS, HIV, Warts,
Influenza, Chicken pox, Cold sores, Small pox, Cold germs, Bird flu,
HSN1, Measles, Norovirus, Tetanus, Yellow fever, Typhoid, Ebola,
Haemorrhagic fever};
\infobox{(1.5,-5.8)}{Virus}{Hepatitis, SARS, Herpes, Mono, AIDS, HIV, Warts,
Influenza, Chicken pox, Cold sores, Small pox, Cold germs, Bird flu,
HSN1, Measles, Norovirus, Tetanus, Yellow fever, Typhoid, Ebola,
Haemorrhagic fever};
\infobox{(4.6,-5.8)}{Virus}{Hepatitis, SARS, Herpes, Mono, AIDS, HIV, Warts,
Influenza, Chicken pox, Cold sores, Small pox, Cold germs, Bird flu,
HSN1, Measles, Norovirus, Tetanus, Yellow fever, Typhoid, Ebola,
Haemorrhagic fever};
\end{tikzpicture}
\end{document}
大部分工作都是由宏完成的\infobox
,它接受三个参数:
\infobox{position}{heading}{text}
其中“位置”是 -coordinate (x,y)
。此宏所做的就是绘制两个节点。第一个是包含环境中的文本的矩形节点minipage
,第二个节点是“标题”,它作为矩形节点放置在前一个框的顶部。