Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jingtaozf committed Jan 31, 2020
1 parent 58328fd commit af526e1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
- [[#a-cluster][a cluster]]

* Introduction
This is a s-expression presentation of [[http://www.graphviz.org/][AT&T GraphViz]].
This is a s-expression presentation of [[http://www.graphviz.org/][AT&T GraphViz]].
The original idea is from http://www.martin-loetzsch.de/S-DOT, but with a full compatiblity of original
DOT syntax by following its [[https://www.graphviz.org/doc/info/lang.html][lang definition]].

Expand Down Expand Up @@ -50,7 +50,7 @@ We have a similar presentation with the original [[https://graphviz.gitlab.io/_p
| other atom | a node statement | (node-id . attribute-list) | (node1 (:label "nice node") (:shape :box)) |
|---------------+------------------------------------+-----------------------------------------+--------------------------------------------|


* Exported Functions
This library created a new package named as ~:dot~, and it exports the following functions to
convert the S-DOT expression to a file can be read as the DOT Language.
Expand Down Expand Up @@ -95,13 +95,13 @@ For example to render a S-DOT expression to a image file, we can run the followi
#+end_SRC
* Examples
** Preparation
We will store all images in this section in the subdirectory ~images~
We will store all images in this section in the subdirectory ~images~
#+BEGIN_SRC lisp :load no
(defun render-dot-demo (name s-expression)
(dot:render-graph
(merge-pathnames
(merge-pathnames
(format nil "images/~a.png" name)
(asdf:component-pathname (asdf:find-system :dot)))
(asdf:component-pathname (asdf:find-system :dot)))
s-expression))
#+END_SRC

Expand Down
30 changes: 15 additions & 15 deletions dot.org
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ a graph is established by a stmt_list.
We can also apply some global configuration in a ~stmt_list~ to limit their affection scope,for example:
#+BEGIN_SRC lisp :load no
(render-and-open-s-dot
(merge-pathnames
#p"images/statements.png"
(merge-pathnames
#p"images/statements.png"
(asdf:component-pathname (asdf:find-system :dot)))
'(:digraph nil
(= :rankdir "LR")
Expand Down Expand Up @@ -207,8 +207,8 @@ There are many different kinds of statements,let's recognize them one by one.
If a statement starts without a known keyword, then it's a node statement,for example
#+BEGIN_SRC lisp :load no
(render-and-open-s-dot
(merge-pathnames
#p"images/node1.png"
(merge-pathnames
#p"images/node1.png"
(asdf:component-pathname (asdf:find-system :dot)))
'(:digraph nil
(node1 (:label "nice node") (:shape :box) (:fontname "Arial") (:fontcolor "#AA0000"))))
Expand Down Expand Up @@ -246,8 +246,8 @@ In a s-expression, it's a list that starts with an ~edgeop~ and an ~attr_list~ a
the rest are a list of ~node id~, for example
#+BEGIN_SRC lisp :load no
(render-and-open-s-dot
(merge-pathnames
#p"images/edge1.png"
(merge-pathnames
#p"images/edge1.png"
(asdf:component-pathname (asdf:find-system :dot)))
'(:digraph nil
(:-> ((arrowhead :diamond)
Expand Down Expand Up @@ -282,8 +282,8 @@ In a dot s-expression, it starts with keyword ~:graph~, ~:node~, ~:edge~ , and t
in the list is the ~attr_list~(ref:attr-list),for example:
#+begin_src lisp :load no
(render-and-open-s-dot
(merge-pathnames
#p"images/node2.png"
(merge-pathnames
#p"images/node2.png"
(asdf:component-pathname (asdf:find-system :dot)))
'(:digraph nil
(:node
Expand All @@ -306,8 +306,8 @@ a single attribute can be applied to global environment in a statement,
in a dot s-expression, it looks like this:
#+BEGIN_SRC lisp :load no
(render-and-open-s-dot
(merge-pathnames
#p"images/attr.png"
(merge-pathnames
#p"images/attr.png"
(asdf:component-pathname (asdf:find-system :dot)))
'(:digraph nil
(= :compound t)
Expand All @@ -328,8 +328,8 @@ It a subgraph's name starts with "cluster", then it has a special meaning.
in a dot s-expression, it looks like this:
#+BEGIN_SRC lisp :load no
(render-and-open-s-dot
(merge-pathnames
#p"images/cluster1.png"
(merge-pathnames
#p"images/cluster1.png"
(asdf:component-pathname (asdf:find-system :dot)))
'(:digraph nil
(:subgraph cluster_1
Expand Down Expand Up @@ -374,9 +374,9 @@ compass_pt : (n | ne | e | se | s | sw | w | nw | c | _)
In a dot s-expression, it looks like this:
#+BEGIN_SRC lisp :load no
(render-and-open-s-dot
(merge-pathnames
#p"images/port.png"
(asdf:component-pathname (asdf:find-system :dot)))
(merge-pathnames
#p"images/port.png"
(asdf:component-pathname (asdf:find-system :dot)))
'(:digraph nil
(:-> nil (node1 :e) node2)))
#+END_SRC
Expand Down

0 comments on commit af526e1

Please sign in to comment.