¿Cómo formatear nodos/estructuras dentro de tikz?

¿Cómo formatear nodos/estructuras dentro de tikz?

he hecho lo siguienteCuadrado de Eisenhower (o matriz)inspirado por estorespuesta fantástica:

plaza eisonhower

Me gustaría que el mío fuera mucho más eficiente en términos de espacio: tamaño de texto/casillas de verificación más pequeños, bordes más delgados, sin espacio/margen/canal entre cuadrados, sin líneas horizontales dentro de los cuadrados, etc. El
texto de la izquierda es una buena aproximación del máximo. El texto del elemento de la lista de verificación de tamaño debe ser.

Pero después de muchos retoques, todavía no puedo cambiar las siguientes propiedades:

  1. Fronteras
    • Haz que los bordes sean ultradelgados (1 px sería suficiente)
  2. Elementos/casillas de la lista de verificación
    • Eliminar líneas horizontales
    • Haga la verificación \Boxpara cada elemento de la lista de verificación más pequeña y/o escale con texto
    • ¿Hacer que los elementos estén más juntos o más juntos verticalmente?
  3. labeltexto
    • Alineado al centro en el borde izquierdo/superior de cuadrados individuales

A continuación se muestra mi documento:

main.tex

\documentclass[english]{book}

\usepackage{amssymb, tikz}
\usetikzlibrary{shapes.multipart, positioning, fit, backgrounds}

...

% \eisenbox: for making each box of an Eisenhower square
\newcommand{\eisenbox}[6][] {
    \node [rectangle split,rectangle split parts={#6}, fill=white,
    text width=5.25cm,align=left,text=#2,draw,sharp corners,draw=#2,
    #1]
    (multi-#3)
    {\strut$\Box$\nodepart{two}\strut$\Box$\nodepart{three}\strut$\Box$\nodepart{four}\strut$\Box$
    \nodepart{five}\strut$\Box$\nodepart{six}\strut$\Box$\nodepart{seven}\strut$\Box$
    \nodepart{eight}\strut$\Box$\nodepart{nine}\strut$\Box$\nodepart{ten}\strut$\Box$};
    \node[left=1pt of multi-#3.south west,anchor=south west,rotate=90,text=black] 
    (label-#3) {#5};
    
    \begin{scope}[on background layer]
        \node[fit=(multi-#3),fill=#2,sharp corners,
        label={[text=#2,anchor=south west,font=\bfseries]above left:#4}] (fit-#3){};
    \end{scope}
}

% \eisensquare: creates a fancy Eisenhower square
\newcommand{\eisensquare}[1] {
    \eisenbox{black}{tl}{\footnotesize Urgent}{\footnotesize Important}{#1}
    \eisenbox[right=0.2cm of multi-tl]{black}{tr}{\footnotesize Not Urgent}{}{#1}
    \eisenbox[below=0.2cm of multi-tl]{black}{bl}{}{\footnotesize Not Important}{#1}
    \eisenbox[right=0.2cm of multi-bl]{black}{br}{}{}{#1}
}

...

\begin{document}
    \frontmatter

    \maketitle
    ...

    \mainmatter

    ...
    \subfile{./folder/subfile.tex}

    \backmatter

\end{document}

subfile.tex

\documentclass[../main.tex]{subfiles}

    \begin{document}

    ...
    
    \paragraph{Foo}\mbox{}\\    
        \begin{tikzpicture}[font=\sffamily]
            \eisensquare{7}
        \end{tikzpicture}
    
    ...

\end{document}

No estoy seguro de qué estoy haciendo mal. tikzignora/arroja un error dondequiera que coloque el width, line widthetc. en cualquier lugar \node [options]dentro del \eisenbox.

Soy completamente nuevo en pgf/ tikz, por lo que cualquier idea sería muy apreciada.

EDITAR 1 ------------

segúnde gernot respuesta ejemplarYa casi lo tengo. Todo lo que queda es la modificación para un número variable de elementos por "cuadrante". Normalmente nunca sería tan exigente si no fuera por el hecho de que lo usaré todos los días durante mucho tiempo.

¿Cómo se harían líneas en blanco/vacías para cuando queden líneas> cantidad de elementos?

main.tex

\newcommand\eisenlabel[1]{{\footnotesize\sffamily#1}}

% arguments: 1st is total # lines, 2nd is # items
\newcommand{\eisenbox}[2]{\fbox{%
        \begin{tabular}{l}
            \multido{}{#1}{%
                \makebox[0.44\textwidth][l]{$\square$} %adding \\ here makes errors, but I believe its absence is FUBARing the table
            }
        \end{tabular}%
}}

% first argument: max lines, then items per quadrant starting with urgent+important
% could do this without 1st arg by determining largest value
% but not familiar enough with this so we'll just supply it manually (for now)
\newcommand{\eisensquare}[5] {%
    \fboxrule=0.1ex% <<< adjust line width
    \begin{tabular}{@{}r@{\hspace{0.3em}}c@{\hspace{-\fboxrule}}c@{}} % <<< adjust distance between rotated labels and box
        & \eisenlabel{urgent} & \eisenlabel{not urgent} \\
        \turnbox{90}{\makebox[0pt]{\eisenlabel{important}}}
        & \eisenbox{#1}{#2} & \eisenbox{#1}{#3} \\[-\fboxrule] 
        \turnbox{90}{\makebox[0pt]{\eisenlabel{not important}}}
        & \eisenbox{#1}{#4} & \eisenbox{#1}{#5}
    \end{tabular}%
}

subfile.tex

\(\eisensquare{5}{3}{4}{5}{3}\)

Respuesta1

Aquí hay una solución flexible. Como \multidono funciona bien en a tabular, utilicé comandos aún más básicos. El comando de nivel superior es

\eisensquare{height of single box}{width of single box}{top left}{top right}{bottom left}{bottom right}

heighty widthpueden ser dimensiones absolutas o múltiplos de longitudes como \baselineskip(altura de una línea) o \textwidth.

ingrese la descripción de la imagen aquí

\documentclass{article}
\usepackage{amssymb,rotating,multido}
% \eisenlabel{width}{label}
\newcommand\eisenlabel[2]{\makebox[#1]{\footnotesize\sffamily#2}}
% \veisenlabel{height}{label}
\newcommand\veisenlabel[2]{\turnbox{90}{\eisenlabel{#1}{#2}}\ }
% \eisenbox{height}{width}{number of items}
\newcommand\eisenbox[3]{\fbox{%
  \vbox to #1{%
    \multido{}{#3}{\hbox to #2{$\square$\hfill}}%
    \vfill  
  }%
}}
% \eisensquare{height of single box}{width of single box}{top left}{top right}{bottom left}{bottom right}
\newcommand\eisensquare[6]{{%
  \fboxrule=0.1ex%
  \vbox{%
    \hbox{\ \eisenlabel{#2}{urgent}\ \eisenlabel{#2}{not urgent}}%
    \hbox{\veisenlabel{#1}{important}\eisenbox{#1}{#2}{#3}\hspace{-\fboxrule}\eisenbox{#1}{#2}{#4}}%
    \nointerlineskip
    \vspace{-\fboxrule}%
    \hbox{\veisenlabel{#1}{not important}\eisenbox{#1}{#2}{#5}\hspace{-\fboxrule}\eisenbox{#1}{#2}{#6}}%
}}}
\begin{document}
\noindent
\eisensquare{5\baselineskip}{0.4\textwidth}{3}{4}{5}{3}

\noindent
\eisensquare{2cm}{5cm}{3}{4}{5}{3}
\end{document}

Respuesta2

Tikz es un paquete maravilloso, pero para un diseño tan simple sugiero usar tabulares. Puede resultar más evidente dónde modificar la apariencia.

ingrese la descripción de la imagen aquí

Sugiero usar emo excomo unidades de longitud, ya que cambian con el tamaño de fuente. En el código, he marcado los lugares donde ajustar el ancho de los cuadros, el ancho de línea y la distancia de las etiquetas verticales.

\documentclass{article}
\usepackage{amssymb,rotating}
\newcommand\eisenlabel[1]{{\footnotesize\sffamily#1}}
\newcommand\eisenline{\makebox[0.44\textwidth][l]{$\square$}}% <<< adjust width of boxes
\newcommand\eisenbox{\fbox{%
  \begin{tabular}{l}
    \eisenline\\
    \eisenline\\
    \eisenline\\
    \eisenline\\
    \eisenline\\
    \eisenline\\
    \eisenline
  \end{tabular}%
}}
\newcommand\eisensquare{{%
  \fboxrule=0.1ex% <<< adjust line width
  \begin{tabular}{@{}r@{\hspace{0.3em}}c@{\hspace{-\fboxrule}}c@{}} % <<< adjust distance between rotated labels and box
    & \eisenlabel{urgent} & \eisenlabel{not urgent} \\
  \turnbox{90}{\makebox[0pt]{\eisenlabel{important}}}
    & \eisenbox & \eisenbox \\[-\fboxrule] 
  \turnbox{90}{\makebox[0pt]{\eisenlabel{not important}}}
    & \eisenbox & \eisenbox
  \end{tabular}%
}}
\begin{document}
\noindent
\eisensquare
\end{document}

información relacionada