我如何将颜色从黄色改为灰色。另外,我不喜欢圆角框和粗边界。软件包文档也没有明确说明我必须做什么。
\documentclass{article}
\usepackage{prerex}
\begin{document}
\begin{chart}%\grid
\reqhalfcourse 30,55:{}{Foundations\\of Physics}{}{Melon}
\reqhalfcourse 10,45:{}{Functional\\Analysis}{}
\reqhalfcourse -12,30:{}{Sheaf\\Theory}{}
\reqhalfcourse -5,05:{}{Microlocal\\Sheaves}{}
\reqhalfcourse 13,22:{}{Complex\\Analysis}{}
\reqhalfcourse 20,30:{}{Operator\\Algebras}{}
\reqhalfcourse 5,15:{}{Microlocal\\Analysis}{}
\reqhalfcourse 40,40:{}{Operational\\Theories}{}
\reqhalfcourse 20,00:{}{AQFT}{}
\reqhalfcourse 40,27:{}{Quantum\\Foundations}{}
\reqhalfcourse 58,27:{}{Evolution}{}
\reqhalfcourse 58,18:{}{Thermodynamics}{}
\reqhalfcourse 20,-20:{}{Quantum\\Gravity}{}
\prereq 5,15,20,00:
\prereq 10,45,20,30:
\prereq 10,45,5,15:
\prereqc 13,22,20,00:
\prereqc -12,30,-5,05:
\prereq -5,05,20,00:
\prereq 58,18,58,27:
\prereq 20,30,20,00:
\prereqc 20,00,20,-20;0:
\prereqc 58,18,20,-20;0:
\prereqc 58,27,20,-20;0:
\coreq 13,22,40,40:
\coreq 30,55,58,18:
\coreq 20,30,40,27:
\coreq 30,55,20,00:
\coreq 30,55,40,27:
\coreq 40,27,20,00:
\coreq 40,27,58,27:
\coreq 40,40,40,27:
\coreq 40,40,20,00:
\begin{pgfonlayer}{courses}
\draw[dashed] ([shift={(-2mm,-1mm)}]x40y27.south west) rectangle ([shift={(1mm,2mm)}]x58y27.north east);
\end{pgfonlayer}
\end{chart}
\end{document}
结果是:
答案1
该包prerex
使用不同的方法来设置节点的默认外观。有些值存储在您可以重新定义的变量中(例如,\background
背景颜色设置为yellow!15
或不同的线宽),但其他内容(例如边框半径)或多或少都是硬编码的。
最直接且高度可定制的方法是将节点放在chart
环境中scope
然后使用常规 Ti 重新定义节点的外观钾Z 样式选项如下:
\documentclass{article}
\usepackage{prerex}
\begin{document}
\begin{chart}%\grid
\begin{scope}[every rectangle node/.style={
sharp corners,
line width=0.6pt,
fill=gray!15
}]
\reqhalfcourse 30,55:{}{Foundations\\of Physics}{}{Melon}
\reqhalfcourse 10,45:{}{Functional\\Analysis}{}
\reqhalfcourse -12,30:{}{Sheaf\\Theory}{}
\reqhalfcourse -5,05:{}{Microlocal\\Sheaves}{}
\reqhalfcourse 13,22:{}{Complex\\Analysis}{}
\reqhalfcourse 20,30:{}{Operator\\Algebras}{}
\reqhalfcourse 5,15:{}{Microlocal\\Analysis}{}
\reqhalfcourse 40,40:{}{Operational\\Theories}{}
\reqhalfcourse 20,00:{}{AQFT}{}
\reqhalfcourse 40,27:{}{Quantum\\Foundations}{}
\reqhalfcourse 58,27:{}{Evolution}{}
\reqhalfcourse 58,18:{}{Thermodynamics}{}
\reqhalfcourse 20,-20:{}{Quantum\\Gravity}{}
\end{scope}
\prereq 5,15,20,00:
\prereq 10,45,20,30:
\prereq 10,45,5,15:
\prereqc 13,22,20,00:
\prereqc -12,30,-5,05:
\prereq -5,05,20,00:
\prereq 58,18,58,27:
\prereq 20,30,20,00:
\prereqc 20,00,20,-20;0:
\prereqc 58,18,20,-20;0:
\prereqc 58,27,20,-20;0:
\coreq 13,22,40,40:
\coreq 30,55,58,18:
\coreq 20,30,40,27:
\coreq 30,55,20,00:
\coreq 30,55,40,27:
\coreq 40,27,20,00:
\coreq 40,27,58,27:
\coreq 40,40,40,27:
\coreq 40,40,20,00:
\begin{pgfonlayer}{courses}
\draw[dashed] ([shift={(-2mm,-1mm)}]x40y27.south west) rectangle ([shift={(1mm,2mm)}]x58y27.north east);
\end{pgfonlayer}
\end{chart}
\end{document}