source: branches/mbutscher/work/WikidPadHelp/data/ExternalGraphicalApplications.wiki @ 195

Last change on this file since 195 was 178, checked in by mbutscher, 11 years ago

2.0preAlpha (internal)

Works so far, now editing help wiki.

File size: 5.3 KB
Line 
1++ External Graphical Applications
2
3WikidPad allows access to some graphical applications which take some sort of script to generate images. You can include the script in a wiki and let the applications generate the appropriate image to show it in HTML preview and export.
4
5The supported applications are:
6
7    * MimeTeX to generate mathematical formulas
8    * GraphViz which is a set of applications to generate directed and nondirected graphs
9    * Ploticus to generate plots and charts (as you might have seen in your favorite spreadsheet program)
10    * Gnuplot to generate mathematical plots
11
12
13+++ Download and installation
14
15The mentioned applications are not part of the WikidPad release itself, you must download it separately. The URLs are:
16
17<<|
18    Appl.| Download| Documentation
19    MimeTeX| http://www.forkosh.com/mimetex.html | http://www.forkosh.com/mimetex.html
20    GraphViz| http://graphviz.org/Download.php | http://graphviz.org/Documentation.php
21    Ploticus| http://ploticus.sourceforge.net/doc/download.html | http://prdownloads.sourceforge.net/ploticus/pl233site.tar.gz?download
22    Gnuplot| http://www.gnuplot.info/download.html | http://www.gnuplot.info/documentation.html
23>>
24
25
26A helpful tutorial for creating directed graphs with GraphViz' dot utility is http://kabru.eecs.umich.edu/bin/view/TWiki/HowtoDirectedGraphs.
27
28You can download all or only some of them as you like.
29
30Put the binaries in an arbitrary folder on your computer. If you do not plan to use them outside of WikidPad you can create a folder in the WikidPad installation directory and put them therein.
31
32Now start WikidPad and open the "Options" dialog. Below the "Plugin options" entry in the list on the left you see four entries, each for one of the programs. Clicking on them leads to the appropriate options page.
33
34For MimeTeX, Ploticus and Gnuplot just enter the full path to the executable, for GraphViz only set the path to the directory containing the executables in the first text field. You can change the names of the executables itself in the fields below the first.
35
36
37+++ Special details about Gnuplot
38
39Unfortunately Gnuplot gives always a warning about a missing console (?) so you either have to use the appendix "noerror" all the time or (on Windows) you set the "wgnuplot.exe" executable in the options which does not issue this warning. In both cases you will be unable to retrieve error messages from Gnuplot if the script isn't right.
40
41At the beginning of each Gnuplot script the following lines are automatically inserted to set output to a PNG-file which is shown then:
42
43<<pre
44    set terminal png
45    set output 'filename.png'
46>>
47
48where filename.png is replaced by the chosen temporary file name.
49
50
51+++ Usage
52
53The programs are called using [Insertions]. The keys for the insertions are:
54   
55    * eqn: MimeTeX
56    * dot, neato, twopi, circo, fdp: GraphViz
57    * ploticus: Ploticus
58    * gnuplot: Gnuplot
59
60
61The values must follow the syntax of the respective program, please see the documentation of the applications for details.
62
63The values should be quoted (enclosed by quotation symbols) if they contain special characters or newlines. A quotation symbol is an arbitrary number of one of the quotation characters ", ', / or \ (double quotation mark, single quotation mark, slash or backslash). The starting and ending symbols must be the same. Examples for quotation symbols are:
64
65"
66'''
67//
68/////
69\\
70
71When exporting HTML, the rendered image files are put in a subdirectory "volatile" in the same directory where the HTML files are. If "volatile" is already present in the destination directory, *all of its contents (including subfolders) are deleted* to avoid filling it up with old versions of the files!
72
73If the GraphViz or Ploticus applications return errors or warnings, you see these instead of the rendered images. To suppress warnings/errors use the appendix "noerror" after the main value of the insertion.
74
75
76+++ Examples
77
78If you have downloaded and installed all applications you can see here how the graphics look like:
79
80
81*MimeTeX*: You should know that [:eqn:"a^2 + b^2 = c^2"] is important!
82
83
84*GraphViz (Dot, with "noerror" appendix)*
85[:dot:"
86digraph {
87a -> b
88b -> c
89b -> d
90d -> a
91}
92"; noerror]
93
94
95*Ploticus*
96[:ploticus:"
97#proc areadef
98  title: Annual Revenues, in thousands
99  rectangle: 1 1 5 2
100  xrange: 0 4
101  yrange: -5000 15000
102  yaxis.stubs: incremental 5000
103  yaxis.grid: color=pink
104  xaxis.stubs: text
105ABC Corp
106NetStuff
107MicroMason
108
109#proc getdata
110  data: 6430 -780 13470
111
112#proc processdata
113  action: rotate
114
115#proc bars
116  lenfield: 1
117  color: dullyellow
118  labelword: $ @@N
119  crossover: 0
120"]
121
122
123*Gnuplot*
124[:gnuplot:"
125set key right nobox
126set samples 100
127plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1))
128"]
129
130+++ For programmers
131
132If you want to create your own plugin to handle insertions, look in the "extensions" directory in the WikidPad installation directory. The plugins "MimeTexCGIBridge.py", "GraphvizClBridge.py" and "PloticusClBridge.py" control the external applications. The plugin "ExampleInsertion.py" handles the insertion key "testexample" and is another example how to handle insertions by a plugin.
133
134[:testexample:"this";is;//a simple//;test]
135
136
137
138[alias: Ploticus; MimeTeX; GraphViz; Gnuplot]
139[camelCaseWordsEnabled: false]
Note: See TracBrowser for help on using the repository browser.