这是代码
\documentclass{article}
\usepackage{tikz}
% Define a new command for drawing rectangles with specified width and height
\newcommand{\myrectangle}[6]{\draw (0,0) rectangle (#1,#2);}
\begin{document}
\begin{table}[h]
\centering
\begin{tabular}{|c|}
\hline
Your content here \\
\begin{tikzpicture}
\myrectangle{4}{4} % First box
\node[align=left, anchor=north] at (0.5,0.9) {Text 1}; % Text inside first box
\begin{scope}[shift={(0.2,2)}] % Shift for the first nested box
\myrectangle{3.5}{2} % First nested box
\node[align=left, anchor=north] at (0.3,0.4) {Nested 1a}; % Text inside first nested box
\end{scope}
\begin{scope}[shift={(0.2,0.1)}] % Shift for the second nested box
\myrectangle{2}{2} % Second nested box
\node[align=left, anchor=north] at (0.3,0.4) {Nested 1b}; % Text inside second nested box
\end{scope}
\end{tikzpicture}
\begin{tikzpicture}
\myrectangle{4}{4} % Second box
\node[align=left, anchor=north] at (0.5,0.9) {Text 2}; % Text inside second box
\begin{scope}[shift={(0.2,0.5)}] % Shift for the first nested box
\myrectangle{0.6}{0.4} % First nested box
\node[align=left, anchor=north] at (0.3,0.4) {Nested 2a}; % Text inside first nested box
\end{scope}
\begin{scope}[shift={(0.2,0.1)}] % Shift for the second nested box
\myrectangle{0.6}{0.4} % Second nested box
\node[align=left, anchor=north] at (0.3,0.4) {Nested 2b}; % Text inside second nested box
\end{scope}
\end{tikzpicture}
\begin{tikzpicture}
\myrectangle{4}{4} % Third box
\node[align=left, anchor=north] at (0.5,0.9) {Text 3}; % Text inside third box
\begin{scope}[shift={(0.2,0.5)}] % Shift for the first nested box
\myrectangle{0.6}{0.4} % First nested box
\node[align=left, anchor=north] at (0.3,0.4) {Nested 3a}; % Text inside first nested box
\end{scope}
\begin{scope}[shift={(0.2,0.1)}] % Shift for the second nested box
\myrectangle{0.6}{0.4} % Second nested box
\node[align=left, anchor=north] at (0.3,0.4) {Nested 3b}; % Text inside second nested box
\end{scope}
\end{tikzpicture} \\
\hline
\end{tabular}
\end{table}
\end{document}
结果:
答案1
我做到了
\fcolorbox{myorange}{white}{%
\begin{minipage}{\textwidth}
\vspace{0.2cm}
\begin{Large}
\textbf{\textit{\color{myorange}Block 0.22-Make, Say and Write 2-digit numbers}}
\end{Large}
\vspace{0.2cm}
\begin{center}
\fcolorbox{titlebg}{white}{%
\begin{minipage}[t]{0.3\linewidth}
\vspace{0.2cm}
\begin{large}
\color{myorange}\textbf{\textit{Session 0.22 A}}
\end{large}
\raggedright % Align text to the left
\fbox{%
\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{%
\raggedright
\vspace{0.2cm}
\color{titlebg}\textit{\textbf{Daily Review \& Quick Teach (DRQT)}}
\vspace{1cm}
}%
}\\[1ex]
\fbox{%
\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{%
\raggedright
\color{titlebg}\textit{\textbf{Explicit Lesson:}}\\
\vspace{1.48cm}
\color{titlebg}\textit{Topic Make, Say and write 2-digit numbers}
\vspace{0.5cm}
}%
}
\end{minipage}%
}
\hfill
\fcolorbox{titlebg}{white}{%
\begin{minipage}[t]{0.3\linewidth}
\vspace{0.2cm}
\begin{large}
\color{myorange}\textbf{\textit{Session 0.22 B}}
\end{large}
\raggedright % Align text to the left
\fbox{%
\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{%
\raggedright
\vspace{0.2cm}
\color{titlebg}\textit{Daily Review \& Quick Teach (DRQT)}
\vspace{1cm}
}%
}\\[1ex]
\fcolorbox{darkgreen}{white}{%
\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{%
\raggedright
\color{darkgreen}\textit{\textbf{Measurement and Geometry or Probability and Statistics (MGPS) Outline:}}\\
\vspace{0.5cm}
\color{darkgreen}\textit{Topic: Today, Yesterday and Tomorro}
\vspace{0.52cm}
}%
}
\end{minipage}%
}
\hfill
\fcolorbox{titlebg}{white}{%
\begin{minipage}[t]{0.3\linewidth}
\vspace{0.2cm}
\begin{large}
\color{myorange}\textbf{\textit{Session 0.22 C}}
\end{large}
\raggedright % Align text to the left
\fbox{%
\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{%
\raggedright
\vspace{0.2cm}
\color{titlebg}\textit{Daily Review \& Quick Teach (DRQT)}
\vspace{1cm}
}%
}\\[1ex]
\fbox{%
\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{%
\raggedright
\color{titlebg}\textit{\textbf{Consolidation Lesson:}}\\
\vspace{1.48cm}
\color{titlebg}\textit{Topic Make, Say and write 2-digit numbers}
\vspace{0.5cm}
}%
}
\end{minipage}%
}
\end{center}
\end{minipage}%
}