This method creates a TikZ-figure of the given poset which can be included in a LaTeX file. The representation places the vertices on horizontal lines corresponding to the filtration of the poset. The only displayed edges are the coveringRelations which are oriented so that lower vertices less than higher vertices.
The method attempts to display labels in a sane way, if they are not suppressed by the SuppressLabels option. Note that the SuppressLabels option’s default value can be set in the "~/.Macaulay2/init-Posets.m2" file.
i1 : texPoset booleanLattice 2 o1 = \begin{tikzpicture}[scale=1, vertices/.style={draw, fill=black, circle, inner sep=0pt}] \node [vertices] (0) at (-0+0,0){}; \node [vertices] (1) at (-.75+0,1.33333){}; \node [vertices] (2) at (-.75+1.5,1.33333){}; \node [vertices] (3) at (-0+0,2.66667){}; \foreach \to/\from in {0/1, 2/3, 0/2, 1/3} \draw [-] (\to)--(\from); \end{tikzpicture} |
i2 : texPoset(booleanLattice 2, Jitter => true) o2 = \begin{tikzpicture}[scale=1, vertices/.style={draw, fill=black, circle, inner sep=0pt}] \node [vertices] (0) at (-0+.00733727,0){}; \node [vertices] (1) at (-.75+.175781,1.33333){}; \node [vertices] (2) at (-.75+1.57937,1.33333){}; \node [vertices] (3) at (-0+.145014,2.66667){}; \foreach \to/\from in {0/1, 2/3, 0/2, 1/3} \draw [-] (\to)--(\from); \end{tikzpicture} |