From b0e1893f5c4cb859de7d744b61437ae9daf9b904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Tue, 19 Nov 2019 11:54:08 +0100 Subject: [PATCH] trac 28759 py3 fix for dot2tex+graphviz --- src/sage/combinat/posets/posets.py | 6 +++--- src/sage/graphs/graph_latex.py | 23 +++++++++++------------ 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/sage/combinat/posets/posets.py b/src/sage/combinat/posets/posets.py index f1463c3184c..deac1eff88b 100644 --- a/src/sage/combinat/posets/posets.py +++ b/src/sage/combinat/posets/posets.py @@ -1345,9 +1345,9 @@ def _latex_(self): sage: print(P._latex_()) #optional - dot2tex graphviz \begin{tikzpicture}[>=latex,line join=bevel,] %% - \node (node_1) at (6.0...bp,5...bp) [draw,draw=none] {$2$}; - \node (node_0) at (6.0...bp,...bp) [draw,draw=none] {$1$}; - \draw [black,->] (node_0) ..controls (...bp,...bp) and (...bp,...bp) .. (node_1); + \node (node_...) at (6.0...bp,...bp) [draw,draw=none] {$...$}; + \node (node_...) at (6.0...bp,...bp) [draw,draw=none] {$...$}; + \draw [black,->] (node_...) ..controls (...bp,...bp) and (...bp,...bp) .. (node_...); % \end{tikzpicture} """ diff --git a/src/sage/graphs/graph_latex.py b/src/sage/graphs/graph_latex.py index d8e221df5b4..6cc062f127f 100644 --- a/src/sage/graphs/graph_latex.py +++ b/src/sage/graphs/graph_latex.py @@ -1333,14 +1333,14 @@ def dot2tex_picture(self): sage: print(g.latex_options().dot2tex_picture()) # optional - dot2tex graphviz \begin{tikzpicture}[>=latex,line join=bevel,] %% - \node (node_3) at (...bp,...bp) [draw,draw=none] {$\left(0, 1\right)$}; - \node (node_2) at (...bp,...bp) [draw,draw=none] {$\left(1, 0\right)$}; - \node (node_1) at (...bp,...bp) [draw,draw=none] {$\left(0, 0\right)$}; - \node (node_0) at (...bp,...bp) [draw,draw=none] {$\left(1, 1\right)$}; - \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp) .. (node_3); - \draw [black,->] (node_2) ..controls (...bp,...bp) and (...bp,...bp) .. (node_3); - \draw [black,->] (node_2) ..controls (...bp,...bp) and (...bp,...bp) .. (node_0); - \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp) .. (node_0); + \node (node_...) at (...bp,...bp) [draw,draw=none] {$\left(...\right)$}; + \node (node_...) at (...bp,...bp) [draw,draw=none] {$\left(...\right)$}; + \node (node_...) at (...bp,...bp) [draw,draw=none] {$\left(...\right)$}; + \node (node_...) at (...bp,...bp) [draw,draw=none] {$\left(...\right)$}; + \draw [black,->] (node_...) ..controls (...bp,...bp) and (...bp,...bp) .. (node_...); + \draw [black,->] (node_...) ..controls (...bp,...bp) and (...bp,...bp) .. (node_...); + \draw [black,->] (node_...) ..controls (...bp,...bp) and (...bp,...bp) .. (node_...); + \draw [black,->] (node_...) ..controls (...bp,...bp) and (...bp,...bp) .. (node_...); % \end{tikzpicture} @@ -1352,9 +1352,9 @@ def dot2tex_picture(self): sage: print(G.latex_options().dot2tex_picture()) # optional - dot2tex graphviz \begin{tikzpicture}[>=latex,line join=bevel,] %% - \node (node_1) at (...bp,...bp) [draw,draw=none] {$3333$}; - \node (node_0) at (...bp,...bp) [draw,draw=none] {$88$}; - \draw [black,->] (node_1) ..controls (...bp,...bp) and (...bp,...bp) .. (node_0); + \node (node_...) at (...bp,...bp) [draw,draw=none] {$...$}; + \node (node_...) at (...bp,...bp) [draw,draw=none] {$...$}; + \draw [black,->] (node_...) ..controls (...bp,...bp) and (...bp,...bp) .. (node_...); \definecolor{strokecol}{rgb}{0.0,0.0,0.0}; \pgfsetstrokecolor{strokecol} \draw (...bp,...bp) node {$\text{\texttt{my{\char`\_}label}}$}; @@ -1372,7 +1372,6 @@ def dot2tex_picture(self): ... \end{tikzpicture} - .. NOTE:: There is a lot of overlap between what ``tkz_picture`` and