Re: Sovrapposizione oggetti

#66896
LuglioM26
Partecipante
    Up
    0
    Down
    ::


    Si, certo. In una altra discussione, non ricordo chi mi ha risposto, mi ha proposto il seguente codice:

    \documentclass[fleqn,12pt,a4paper]{article}

    \usepackage{tikz,kbordermatrix,amsmath}

    \newcounter{nodecount}
    \newcommand\mn[1]{%
    \addtocounter{nodecount}{1}%
    \tikz \node (\arabic{nodecount}) {$#1$};}

    \tikzstyle{every picture}+=[remember picture,baseline]
    \tikzstyle{every node}+=[inner sep=2pt,anchor=base,align=center,text depth=.25ex,outer sep=1.5pt]
    \tikzstyle{every path}+=[thick]

    \begin{document}
    $\let\kbldelim\lVert\let\kbrdelim\rVert\kbordermatrix{%
    & E_5 & E_3 & E_6 & E_4 & E_8 & E_1 & E_2 & E_7 & E_9 \\
    E_5 & \mn{1} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
    E_3 & 0 & \mn{x} & x & 0 & 0 & 0 & 0 & 0 & 0 \\
    E_6 & 0 & x & \mn{x} & 0 & 0 & 0 & 0 & 0 & 0 \\
    E_4 & 0 & 0 & 0 & \mn{x} & x & 0 & 0 & 0 & 0 \\
    E_8 & 0 & 0 & 0 & x & \mn{x} & 0 & 0 & 0 & 0 \\
    E_1 & 0 & 0 & 0 & x & x & \mn{x} & 0 & 0 & 0 \\
    E_2 & 0 & x & x & 0 & 0 & x & \mn{x} & 0 & 0 \\
    E_7 & 0 & 0 & 0 & 0 & 0 & x & 0 & 0 & x \\
    E_9 & x & x & x & 0 & 0 & 0 & 0 & x & 0
    }$

    \begin{tikzpicture}[overlay]
    \draw (1.north west) — (1.north east) — (1.south east) — (1.south west) — cycle;
    \draw (2.north west) -| (3.south east) -| (2.north west) — cycle;
    \draw (4.north west) -| (5.south east) -| (4.north west) — cycle;
    \draw[thin] (4.north west) -| (6.south east) -| (4.north west) — cycle;
    \draw[thin] (2.north west) -| (7.south east) -| (2.north west) — cycle;
    \end{tikzpicture}
    \end{document}

    dove appunto da quello che ho capito è possibile fare queste sovrapposizioni.

    Approfitto, vista la situazione, di chiedere anche come mai alcuni pacchetti bisogna reperirli a parte come il suddetto kbordermatrix.

    Saluti e grazie ancora

    Stefano

    Go to top