org: work around issue with Org 9.2
See the following email http://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00226.html * doc/org/tut24.org, doc/org/tut51.org: Export the output of noweb-based block without ':export results' or ':export both'. * doc/org/spot.css: Add style for src-text.
This commit is contained in:
parent
3908cc1bca
commit
476a874c71
3 changed files with 48 additions and 105 deletions
|
|
@ -54,7 +54,7 @@ and that we run the following code, similar to what we did in the
|
|||
[[file:tut21.org][custom automaton printer]].
|
||||
|
||||
#+NAME: nonalt-body
|
||||
#+BEGIN_SRC C++ :exports code :noweb strip-export
|
||||
#+BEGIN_SRC C++
|
||||
std::cout << "Initial state: " << aut->get_init_state_number() << '\n';
|
||||
|
||||
const spot::bdd_dict_ptr& dict = aut->get_dict();
|
||||
|
|
@ -72,7 +72,7 @@ for (unsigned s = 0; s < n; ++s)
|
|||
#+END_SRC
|
||||
|
||||
#+NAME: nonalt-main
|
||||
#+BEGIN_SRC C++ :exports none :noweb strip-export
|
||||
#+BEGIN_SRC C++ :exports none
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <spot/parseaut/public.hh>
|
||||
|
|
@ -98,7 +98,7 @@ for (unsigned s = 0; s < n; ++s)
|
|||
#+END_SRC
|
||||
|
||||
#+NAME: nonalt-one
|
||||
#+BEGIN_SRC C++ :exports results :noweb strip-export :results verbatim
|
||||
#+BEGIN_SRC C++ :exports none :noweb strip-export :results verbatim
|
||||
<<nonalt-main>>
|
||||
void custom_print(spot::twa_graph_ptr& aut)
|
||||
{
|
||||
|
|
@ -106,28 +106,11 @@ for (unsigned s = 0; s < n; ++s)
|
|||
}
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: nonalt-one
|
||||
#+begin_example
|
||||
Initial state: 4294967295
|
||||
State 0:
|
||||
edge(0 -> 0)
|
||||
label = a
|
||||
acc sets = {}
|
||||
edge(0 -> 4294967295)
|
||||
label = !a
|
||||
acc sets = {}
|
||||
State 1:
|
||||
edge(1 -> 1)
|
||||
label = !a
|
||||
acc sets = {0}
|
||||
edge(1 -> 2)
|
||||
label = a
|
||||
acc sets = {}
|
||||
State 2:
|
||||
edge(2 -> 2)
|
||||
label = 1
|
||||
acc sets = {}
|
||||
#+end_example
|
||||
# temporary fix for an issue in Org 9.2, see
|
||||
# http://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00226.html
|
||||
#+BEGIN_SRC text :noweb yes
|
||||
<<nonalt-one()>>
|
||||
#+END_SRC
|
||||
|
||||
This output seems correct only for non-universal edges. The reason is
|
||||
that Spot always store all edges as a tuple (src,dst,label,acc sets),
|
||||
|
|
@ -153,7 +136,7 @@ unconditionally. In this example, we simply call =is_univ_dest()= to
|
|||
decide whether to enclose the destinations in braces.
|
||||
|
||||
#+NAME: nonalt-body2
|
||||
#+BEGIN_SRC C++ :exports code :noweb strip-export
|
||||
#+BEGIN_SRC C++
|
||||
unsigned init = aut->get_init_state_number();
|
||||
std::cout << "Initial state:";
|
||||
if (aut->is_univ_dest(init))
|
||||
|
|
@ -186,7 +169,7 @@ decide whether to enclose the destinations in braces.
|
|||
#+END_SRC
|
||||
|
||||
#+NAME: nonalt-two
|
||||
#+BEGIN_SRC C++ :exports results :noweb strip-export :results verbatim
|
||||
#+BEGIN_SRC C++ :exports none :noweb strip-export :results verbatim
|
||||
<<nonalt-main>>
|
||||
void custom_print(spot::twa_graph_ptr& aut)
|
||||
{
|
||||
|
|
@ -194,28 +177,11 @@ decide whether to enclose the destinations in braces.
|
|||
}
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: nonalt-two
|
||||
#+begin_example
|
||||
Initial state: { 0 1 }
|
||||
State 0:
|
||||
edge(0 -> 0)
|
||||
label = a
|
||||
acc sets = {}
|
||||
edge(0 -> { 0 1 })
|
||||
label = !a
|
||||
acc sets = {}
|
||||
State 1:
|
||||
edge(1 -> 1)
|
||||
label = !a
|
||||
acc sets = {0}
|
||||
edge(1 -> 2)
|
||||
label = a
|
||||
acc sets = {}
|
||||
State 2:
|
||||
edge(2 -> 2)
|
||||
label = 1
|
||||
acc sets = {}
|
||||
#+end_example
|
||||
# temporary fix for an issue in Org 9.2, see
|
||||
# http://lists.gnu.org/archive/html/emacs-orgmode/2019-01/msg00226.html
|
||||
#+BEGIN_SRC text :noweb yes
|
||||
<<nonalt-two()>>
|
||||
#+END_SRC
|
||||
|
||||
* Python
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue