答案1
这是一个使用选项TikZ
:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\filldraw[fill=cyan!60!black!30]
(0,0) rectangle (4,-4);
\draw
(0,-4) rectangle (6,-6)
(4,0) rectangle (6,-6);
\draw[dotted]
(4,0) to[bend right] node[fill=white] {$b$} (6,0);
\draw[dotted]
(0,0) to[bend left] node[fill=white] {$a$} (6,0);
\draw[dotted]
(0,-4) to[bend left] node[fill=white] {$b$} (0,-6);
\draw[dotted]
(0,0) to[bend right] node[fill=white] {$a$} (0,-6);
\end{tikzpicture}
\end{document}
答案2
一个pstricks
办法:
\documentclass[x11names, border=3pt]{standalone}
\usepackage{pstricks-add}
\usepackage{auto-pst-pdf}
\pagestyle{empty}
\begin{document}
\psset{ linecolor =SteelBlue3, unit=1.5}
\begin{pspicture*}(-1,-1)(7,8)
\pnodes{A}(0,0)(0,6)(6,6)(6,0)
\pnodes{B}(0,2)(4,2)(6,2)(4,6)(4,0)
\psframe[linewidth=1.2pt](A0)(A2)
\psframe[fillstyle=solid, fillcolor=LightSteelBlue3!30!](B0)(B3)
\psline(B2)(B1)(B4)
\psset{linestyle=dotted, linewidth=1.2pt, linecolor=black, arcangle=20}
\ncarc{-}{A1}{A2}\ncput*{$a$}
\ncarc{-}{A0}{A1}\ncput*{$a$}
\ncarc{-}{A2}{B3}\ncput*{$b$}
\ncarc{-}{B0}{A0}\ncput*{$b$}
\end{pspicture*}
\end{document}