逻辑网格拼图网格

逻辑网格拼图网格

我正在寻找一种方法来绘制网格“逻辑网格谜题”有一个包叫“逻辑谜题”但这似乎不包括这种类型的逻辑难题。

有任何想法吗)?

答案1

这只是一个开始,还不完美:\multicolumn和的“奇怪”组合\cline\multirow根据需要提供网格结构。

\documentclass{article}

\usepackage{multirow}
\usepackage{tikz}
\usetikzlibrary{shadings}
\usepackage{colortbl}
\usepackage{array}
\usepackage[most]{tcolorbox}
\usepackage{graphicx}

\newcommand{\tikzball}[1][]{%
\begin{tikzpicture}%
\shade[ball color=blue,#1] (0,-0.1) circle (0.2);
\end{tikzpicture}%
}

\newlength{\logpuzzlecellwidth}
\setlength{\logpuzzlecellwidth}{0.5cm}

\newcolumntype{A}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}

\begin{tabular}{|>{\vphantom{\tikzball}}l|l|*{10}{A{\logpuzzlecellwidth}|}}
  \multicolumn{1}{c}{}  & \multicolumn{1}{c}{} & \multicolumn{5}{|>{\columncolor[gray]{0.8}}c|}{owners} & \multicolumn{5}{>{\columncolor[gray]{0.8}}c|}{breeds} \tabularnewline[1ex]
  \cline{3-12}
\multicolumn{1}{c}{} & \multicolumn{1}{c|}{} & \rotatebox{90}{Arara} & \rotatebox{90}{Booktabs} & \rotatebox{90}{Colortable}  & \rotatebox{90}{Datetime} & \rotatebox{90}{etoolbox} & \rotatebox{90}{A} & \rotatebox{90}{B} & \rotatebox{90}{C}  & \rotatebox{90}{D} & \rotatebox{90}{E}  \tabularnewline
\hline
\multirow{6}{*}{\rotatebox{90}{cats}}  & A & & & & & & & & & & \tabularnewline
  \cline{2-12}
  & B & & & & & & & & & & \tabularnewline  
  \cline{2-12}
  & C & & & & & & & & & & \tabularnewline
  \cline{2-12}
  & D & & & & & & & & & & \tabularnewline
  \cline{2-12}
  & E & & \tikzball & & & & & & & & \tabularnewline
\hline
\multirow{6}{*}{\rotatebox{90}{dogs}}  & A & & & & & & \multicolumn{5}{c}{} \tabularnewline
  \cline{2-7}
  & B & & & & & & \multicolumn{5}{c}{} \tabularnewline
  \cline{2-7}
  & C & & & & & \tikzball[ball color=red] & \multicolumn{5}{c}{} \tabularnewline
  \cline{2-7}
  & D & & & & & & \multicolumn{5}{c}{} \tabularnewline
  \cline{2-7}
  & E & & & & & & \multicolumn{5}{c}{} \tabularnewline
  \cline{1-7}
\end{tabular}

\end{document}

在此处输入图片描述

相关内容