[Refdb-cvs] CVS: elisp refdb-mode-manual.xml,1.2,1.3
Status: Beta
Brought to you by:
mhoenicka
From: Markus H. <mho...@us...> - 2005-12-08 00:58:36
|
Update of /cvsroot/refdb/elisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3887 Modified Files: refdb-mode-manual.xml Log Message: added refdb-getref-from-citation;added NTEmacs setup instructions Index: refdb-mode-manual.xml =================================================================== RCS file: /cvsroot/refdb/elisp/refdb-mode-manual.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -U2 -r1.2 -r1.3 --- refdb-mode-manual.xml 26 Nov 2005 00:23:01 -0000 1.2 +++ refdb-mode-manual.xml 8 Dec 2005 00:58:26 -0000 1.3 @@ -71,4 +71,70 @@ <para>If you use the configuration file mentioned <link linkend="sect-setting-up">above</link>, refdb-mode will be automatically invoked whenever you load a file type associated with the mode, e.g. an XML file or a RIS file. To load the mode manually, use either the menu command <menuchoice><guimenu>Tools</guimenu><guimenuitem>RefDB Mode</guimenuitem></menuchoice> or run <keycombo><keycap>M</keycap><keycap>x</keycap></keycombo><userinput>refdb-mode</userinput>.</para> </sect1> + <sect1> + <title>Using refdb-mode with NTEmacs</title> + <para>Windows is an extra challenge for refdb-mode, as we have to call Cygwin programs (the RefDB clients) from a Win32 application through Lisp commands, leaving enough room for things to go wrong. It boils down to getting your <filename>.emacs</filename> right, and we'll show here step by step what it takes to see the light. You'll notice that the setup uses UTF-8 quite heavily, assuming that you've set up your RefDB databases accordingly. I've settled for this encoding as it gave me the simplest consistent setup possible. You may well experiment with other character encodings, but I hardly see any benefit in doing so.</para> + <note> + <para>Some of the administrative functions currently do not work under NTEmacs. Affected are all functions which run <command>sudo</command> for authentication or which start an xterm to obtain database passwords.</para> + </note> + <programlisting> +;; use Unix-style line endings +(setq-default buffer-file-coding-system 'undecided-unix) + +;; xml files as well as files with "utf8" somewhere +;; in the path are opened as Unicode +(setq file-coding-system-alist + (append (list + (cons "\\.xml$" 'utf-8) + (cons "utf8" 'utf-8)) + file-coding-system-alist)) + </programlisting> + <para>First we ask NTEmacs to use Unix-style line endings. The second expression makes sure that all XML files as well as all files with the string "utf-8" in their name (e.g. <filename>refdata.utf-8.ris</filename>) are loaded as Unicode files using the UTF-8 character encoding.</para> + <programlisting> +;; use bash as the default shell +(setq exec-path (cons "C:/Programme/cygwin/bin" exec-path)) +(setq shell-file-name "bash") +(setenv "SHELL" shell-file-name) +(setenv "PATH" (concat (getenv "PATH") ";C:\\Programme\\cygwin\\bin" ";C:\\Programme\\cygwin\\usr\\local\\bin")) +(setq explicit-shell-file-name shell-file-name) +(setq explicit-shell-args '("--login" "-i")) +(setq shell-command-switch "-ic") +(setq w32-quote-process-args t) +(defun bash () + (interactive) + (let ((binary-process-input t) + (binary-process-output nil)) + (shell))) + +(setq process-coding-system-alist (cons '("bash" . (utf-8-dos . utf-8-unix)) + process-coding-system-alist)) + </programlisting> + <para>This block of commands uses the Cygwin version of <command>bash</command> as the default shell. It also makes sure that a few additional directories are added to the path. Finally it tells NTEmacs that the data returned by the shell use the UTF-8 encoding as well. The paths shown here need to be adapted to your local installation.</para> + <programlisting> +;; refdb-mode and ris mode +(load-file "c:/Programme/emacsen/site-lisp/refdb-mode-config.el") +(setq refdb-default-ris-encoding 'utf-8-unix) + </programlisting> + <para>Now we load refdb-mode and ris-mode through the config file. Again, use the path of your local system here. The second command makes sure we use UTF-8 again to display results in RIS format.</para> + <programlisting> +;; nxml mode +(load "c:/Programme/emacsen/site-lisp/nxml-mode-20041004/rng-auto.el") +(setq auto-mode-alist + (cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\)\\'" . nxml-mode) + auto-mode-alist)) + </programlisting> + <para>Finally, we also load nxml-mode to edit XML files. The setup of PSGML to edit SGML-files has been described <ulink url="http://www.mhoenicka.de/software/sgml/sgmlnt.html">elsewhere</ulink> (slightly outdated, though).</para> + <para>The final step to make nxml-mode work properly is to make the RefDB RelaxNG schemas known to the system. To this end, create or edit the file <filename>schemas.xml</filename> in <emphasis>what NTEmacs thinks is your home directory</emphasis>. This may be different from <filename class="directory">My Files</filename> (I prefer to set it to my <envar>HOME</envar> in Cygwin). The contents for the RefDB schemas looks like this:</para> + <programlisting> +<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> + <documentElement prefix="" localName="ris" typeId="RISX"/> + <documentElement prefix="" localName="STYLESET" typeId="CiteStyleX"/> + <documentElement prefix="" localName="xnoteset" typeId="XNote"/> + + <typeId id="RISX" uri="/Programme/cygwin/usr/local/share/refdb/dtd/risx.rnc"/> + <typeId id="CiteStyleX" uri="/Programme/cygwin/usr/local/share/refdb/dtd/citestylex.rnc"/> + <typeId id="XNote" uri="/Programme/cygwin/usr/local/share/refdb/dtd/xnote.rnc"/> +</locatingRules> + </programlisting> + </sect1> </chapter> <chapter id="chapter-concepts"> @@ -438,4 +504,15 @@ </sect3> </sect2> + <sect2 id="command-get-references-from-citation" xreflabel="Get References from Citation"> + <title>Get References from Citation</title> + <indexterm><primary sortas="getref-from-citation">refdb-getref-from-citation</primary></indexterm> + <funcsynopsis> + <funcprototype> + <funcdef><function>refdb-getref-from-citation</function></funcdef> + <void/> + </funcprototype> + </funcsynopsis> + <para>Uses the citation around point to retrieve all cited references in that citation from the database.</para> + </sect2> <sect2 id="command-pick-references" xreflabel="Pick References"> <title>Pick References</title> |