This page lists some usage examples of CirKit to demonstrate its possibiilities.
Tweaking show for Mac
as program to open the generated GraphViz files. Mac lacks both this program and a good viewer for GraphViz files.
A workaround is to create a PNG file with
and then open the PNG file instead. There are several ways to do this, but the most convenient is to set the CirKit variable
A good place to set this variable is in the
file such that it is loaded on start up (if you use the alias file, remember to set the
environment variable to the CirKit directory).
We add the following line to the
set show_dotcmd "dot -Tpng %s > /tmp/test.png; open /tmp/test.png"
Now in a program as the following, a PNG file is created and opened in a
cirkit> expr <[a!b]bc> cirkit> expr > xmg cirkit> show -x
If you happen to use
together with the
extension, you can use it to directly display the PNG file in the terminal. Just use the following as
set show_dotcmd "dot -Tpng %s > /tmp/test.png; imgcat /tmp/test.png"