File: plugin-binary.en.tm

package info (click to toggle)
texmacs 1%3A2.1.4%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 145,076 kB
  • sloc: cpp: 227,393; lisp: 197,386; ansic: 5,395; python: 1,939; makefile: 1,065; sh: 781; perl: 339; xml: 100; awk: 36
file content (100 lines) | stat: -rw-r--r-- 3,036 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<TeXmacs|1.0.3.7>

<style|tmdoc>

<\body>
  <tmdoc-title|Example of a plug-in with <name|C++> code>

  <paragraph*|The <verbatim|minimal> plug-in>

  Consider the example of the <verbatim|minimal> plug-in in the directory

  <\verbatim>
    \ \ \ \ $TEXMACS_PATH/examples/plugins
  </verbatim>

  It consists of the following files:

  <\verbatim>
    \ \ \ \ <example-plugin-link|minimal/Makefile>

    \ \ \ \ <example-plugin-link|minimal/progs/init-minimal.scm>

    \ \ \ \ <example-plugin-link|minimal/src/minimal.cpp>
  </verbatim>

  In order to try the plug-in, you first have to recursively copy the
  directory

  <\verbatim>
    \ \ \ \ $TEXMACS_PATH/examples/plugins/minimal
  </verbatim>

  to <verbatim|$TEXMACS_PATH/plugins> or <verbatim|$TEXMACS_HOME_PATH/plugins>.
  Next, running the <verbatim|Makefile> using

  <\verbatim>
    \ \ \ \ make
  </verbatim>

  will compile the program <verbatim|minimal.cpp> and create a binary

  <\verbatim>
    \ \ \ \ minimal/bin/minimal.bin
  </verbatim>

  When relaunching <TeXmacs>, the plug-in should now be automatically
  recognized.

  <paragraph*|How it works>

  The <verbatim|minimal> plug-in demonstrates a minimal interface between
  <TeXmacs> and an extern program; the program <verbatim|minimal.cpp> is
  <hyper-link|explained|../interface/interface-pipes.en.tm> in more detail in
  the chapter about writing interfaces. The initialization file
  <verbatim|init-minimal.scm> essentially contains the following code:

  <\scheme-fragment>
    (plugin-configure minimal

    \ \ (:require (url-exists-in-path? "minimal.bin"))

    \ \ (:launch "minimal.bin")

    \ \ (:session "Minimal"))
  </scheme-fragment>

  The <scheme-code|:require> option checks whether <verbatim|minimal.bin>
  indeed exists in the path (so this will fail if you forgot to run the
  <verbatim|Makefile>). The <scheme-code|:launch> option specifies how to
  launch the extern program. The <verbatim|:session> option indicates that it
  will be possible to create sessions for the <verbatim|minimal> plug-in
  using <menu|Insert|Session|Minimal>.

  <tmdoc-copyright|1998--2002|Joris van der Hoeven>

  <tmdoc-license|Permission is granted to copy, distribute and/or modify this
  document under the terms of the GNU Free Documentation License, Version 1.1
  or any later version published by the Free Software Foundation; with no
  Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  Texts. A copy of the license is included in the section entitled "GNU Free
  Documentation License".>
</body>

<\initial>
  <\collection>
    <associate|language|english>
    <associate|page-bot|30mm>
    <associate|page-even|30mm>
    <associate|page-odd|30mm>
    <associate|page-reduce-bot|15mm>
    <associate|page-reduce-left|25mm>
    <associate|page-reduce-right|25mm>
    <associate|page-reduce-top|15mm>
    <associate|page-right|30mm>
    <associate|page-top|30mm>
    <associate|page-type|a4>
    <associate|par-width|150mm>
    <associate|sfactor|4>
  </collection>
</initial>