File: daps_user_editors.xml

package info (click to toggle)
daps 3.3.2%2Bcleaned1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,540 kB
  • sloc: xml: 9,773; sh: 3,059; python: 1,322; lisp: 380; makefile: 239
file content (244 lines) | stat: -rw-r--r-- 7,178 bytes parent folder | download | duplicates (4)
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet
 href="urn:x-daps:xslt:profiling:docbook45-profile.xsl"
 type="text/xml"
 title="Profiling step"?>
<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd"
[<!ENTITY % entities SYSTEM "entity-decl.ent">
%entities;
]>
<appendix id="app.daps.user.editors">
 <title>Editor-specific Information</title>
 <abstract>
  <para>
   This chapter covers the following topics:
   <itemizedlist>
    <listitem>
     <para>
      Using DocBook macros for Emacs
     </para>
    </listitem>
    <listitem>
     <para>
      Editing XML/DocBook Files with the Vim Editor
     </para>
    </listitem>
    <listitem>
     <para>
      Integrating the spell checker &aspell; into &jedit;
     </para>
    </listitem>
   </itemizedlist>
  </para>
 </abstract>
 <sect1 id="sec.daps.user.editors.emacs.macros">
  <title>Emacs&mdash;Macros for Inserting DocBook Elements</title>

  <para>
   Most editors allow you to write or record macros that you can use for
   automatically inserting <quote>skeletons</quote> for complex XML
   constructs as illustrated by <xref linkend="ex.daps.user.vle"/>.
  </para>

  <example id="ex.daps.user.vle">
   <title>A <sgmltag>varlistentry</sgmltag> Element</title>
<screen>&lt;varlistentry&gt;
 &lt;term&gt;&lt;/term&gt;
  &lt;listitem&gt;
   &lt;para&gt;&lt;/para&gt;
  &lt;/listitem&gt;
 &lt;/varlistentry&gt;</screen>
  </example>

  <para>
   &dapsacr; comes with macros for the Emacs editor that can be used to add
   DocBook elements, such as <sgmltag>listitem</sgmltag>,
   <sgmltag>figure</sgmltag>, or <sgmltag>indexterm</sgmltag>. The macros are
   stored in <filename>docbook_macros.el</filename> and are added to your
   system during the installation of &dapsacr;. They require that you use one
   of Emacs' main XML editing modes, either <literal>nxml</literal> or
   <literal>psgml</literal>.
  </para>

  <procedure id="pro.daps.emacs.macros.config">
   <title>Configuring Emacs for Using the DocBook Macros</title>
   <step>
    <para>
     To load the DocBook macros, open your Emacs customization file
     (<filename>~/.emacs</filename> or <filename>~/.gnu-emacs</filename>).
    </para>
   </step>
   <step>
    <para>
     Insert the following line:
    </para>
<screen>(load "/usr/share/emacs/site-lisp/docbook_macros.el" t t)</screen>
   </step>
   <step>
    <para>
     Save the Emacs customization file and restart Emacs.
    </para>
   </step>
  </procedure>

  <para>
   For an overview of the available macros and their usage, refer to
   <ulink url="http://en.opensuse.org/openSUSE:Documentation_Emacs_Docbook_Macros"></ulink>.
  </para>
 </sect1>

 <sect1 id="sec.daps.user.editors.vi">
  <title>Editing XML/DocBook Files with the Vim Editor</title>
  <para>Find information about on <ulink
   url="https://github.com/tbazant/xml-vim"></ulink>.</para>
 </sect1>

 <sect1 id="sec.daps.user.editors.jedit.spellcheck">
  <title>&jedit;&mdash;Spell Check on the Fly</title>

  <para>
   If you do not want to run <command>daps spellcheck</command> from the
   command line, you can also integrate &aspell; (plus a custom
   dictionary, if needed) into your XML editor, so that spelling is
   checked <quote>on the fly</quote> during editing. Consult your editor's
   documentation on how to integrate a custom dictionary. If you use
   &jedit;, follow the instructions in
   <xref linkend="pro.daps.spellcheck.jedit"/>.
  </para>

  <procedure id="pro.daps.spellcheck.jedit">
   <title>Integrating &aspell; into &jedit;</title>
   <step>
    <para>
     Install and activate the plug-in for spell checking:
    </para>
    <substeps>
     <step>
      <para>
       Start &jedit; and select <menuchoice><guimenu>Plug-ins</guimenu>
       <guimenu>Plug-in Manager</guimenu> </menuchoice>.
      </para>
     </step>
     <step>
      <para>
       If the <guimenu>Spell Check</guimenu> plug-in is not already
       installed, install and activate it.
      </para>
     </step>
     <step>
      <para>
       Close and restart &jedit;.
      </para>
     </step>
    </substeps>
   </step>
   <step>
    <para>
     Configure the plug-in as follows:
    </para>
    <substeps>
     <step>
      <para>
       Select <menuchoice> <guimenu>Plug-ins</guimenu> <guimenu>Plug-in
       Options</guimenu> </menuchoice>.
      </para>
     </step>
     <step>
      <para>
       In the left navigation pane, select <menuchoice> <guimenu>Spell
       Check</guimenu> <guimenu>General</guimenu> </menuchoice>.
      </para>
     </step>
     <step>
      <para>
       Set <guimenu>Spell-checking engine</guimenu> to
       <guimenu>Aspell</guimenu> and select the <guimenu>Dictionary to
       use</guimenu>, for example <literal>en_US</literal>.
      </para>
     </step>
     <step>
      <para>
       If the desired dictionary does not appear in the drop-down box,
       install the respective &aspell; dictionary for the language and click
       <guimenu>Refresh list</guimenu>.
      </para>
     </step>
     <step>
      <para>
       In the left navigation pane, switch to <menuchoice> <guimenu>Spell
       Check</guimenu> <guimenu>Syntax handling</guimenu> </menuchoice>.
      </para>
     </step>
     <step>
      <para>
       In the table, activate the <guimenu>markup</guimenu> entry and click
       <guimenu>Edit</guimenu> next to it.
      </para>
     </step>
     <step>
      <para>
       In the <guimenu>Token types picker</guimenu>, activate the following
       entries:
      </para>
      <itemizedlist>
       <listitem>
        <para>
         NULL
        </para>
       </listitem>
       <listitem>
        <para>
         COMMENT1
        </para>
       </listitem>
       <listitem>
        <para>
         LITERAL1
        </para>
       </listitem>
      </itemizedlist>
     </step>
     <step>
      <para>
       In the left navigation pane, switch to <menuchoice> <guimenu>Spell
       Check</guimenu> <guimenu>Aspell Engine</guimenu> </menuchoice>.
      </para>
     </step>
     <step>
      <para>
       Set the path to the <guimenu>Aspell executable file name</guimenu>.
       Select <guimenu>Enable markup mode</guimenu>.
      </para>
     </step>
     <step>
      <para>
       To use an additional custom &aspell; dictionary, specify the path to it
       in the text box below <guimenu>Additional parameters</guimenu>:
      </para>
<screen>--extra-dicts=<replaceable>PATH_TO_CUSTOM_DICT</replaceable></screen>
      <para>
       For example:
      </para>
<screen>--extra-dicts=/home/tux/custom_aspell.rws</screen>
     </step>
     <step>
      <para>
       Save your settings in the plug-in options dialog by pressing
       <guimenu>OK</guimenu> or <guimenu>Apply</guimenu>.
      </para>
     </step>
    </substeps>
   </step>
   <step>
    <para>
     To perform a spell check during editing, select <menuchoice>
     <guimenu>Plug-ins</guimenu> <guimenu>Spell Check</guimenu>
     <guimenu>Highlight misspelled words</guimenu> </menuchoice> (or use the
     key combination assigned to that menu item).
    </para>
   </step>
  </procedure>
 </sect1>


</appendix>