summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2019-01-02 12:31:22 +0100
committerAleks Kissinger <aleks0@gmail.com>2019-01-02 12:31:22 +0100
commit317d5120c71ff0b68807b397b711a0f853657f43 (patch)
tree823fc991248cb0d5c0a35e1b79091d9044bdcacd
parentb703296cf7b671ca8049438804e612fc7a4e055a (diff)
copy added [tikzfig] style by default
-rw-r--r--src/data/graph.cpp1
-rw-r--r--tex/sample/figures/fig.tikz10
-rw-r--r--tex/sample/sample.tex8
3 files changed, 10 insertions, 9 deletions
diff --git a/src/data/graph.cpp b/src/data/graph.cpp
index da7b345..1dd5574 100644
--- a/src/data/graph.cpp
+++ b/src/data/graph.cpp
@@ -279,6 +279,7 @@ Graph *Graph::copyOfSubgraphWithNodes(QSet<Node *> nds)
{
Graph *g = new Graph();
g->setData(_data->copy());
+ g->data()->setAtom("tikzfig");
QMap<Node*,Node*> nodeTable;
foreach (Node *n, nodes()) {
if (nds.contains(n)) {
diff --git a/tex/sample/figures/fig.tikz b/tex/sample/figures/fig.tikz
index e485d9f..b7074a8 100644
--- a/tex/sample/figures/fig.tikz
+++ b/tex/sample/figures/fig.tikz
@@ -1,4 +1,4 @@
-\begin{tikzpicture}
+\begin{tikzpicture}[tikzfig]
\begin{pgfonlayer}{nodelayer}
\node [style=red node] (0) at (0, 1) {};
\node [style=blue node 2] (1) at (1, 0) {};
@@ -6,9 +6,9 @@
\node [style=yellow square] (3) at (0, -1) {foo};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
- \draw [in=-90, out=0] (3.center) to (1.center);
- \draw [bend right=45, looseness=1.25] (3.center) to (2.center);
- \draw (2.center) to (0.center);
- \draw (0.center) to (1.center);
+ \draw [in=-90, out=0] (3) to (1);
+ \draw [bend right] (3) to (2);
+ \draw (2) to (0);
+ \draw (0) to (1);
\end{pgfonlayer}
\end{tikzpicture}
diff --git a/tex/sample/sample.tex b/tex/sample/sample.tex
index bbb20e0..1b10cf6 100644
--- a/tex/sample/sample.tex
+++ b/tex/sample/sample.tex
@@ -26,10 +26,10 @@ It is also possible to paste a \texttt{tikzpicture} directly from TikZiT, withou
\node [style=yellow square] (3) at (0, -1) {foo};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
- \draw [in=-90, out=0] (3.center) to (1.center);
- \draw [bend right=45, looseness=1.25] (3.center) to (2.center);
- \draw (2.center) to (0.center);
- \draw (0.center) to (1.center);
+ \draw [in=-90, out=0] (3) to (1);
+ \draw [bend right] (3) to (2);
+ \draw (2) to (0);
+ \draw (0) to (1);
\end{pgfonlayer}
\end{tikzpicture}
\]