Usage Instructions for Emacs Bidi XML Mode and TeX Mode
For Version of 2011-10-18 (paper, presentation and demo at
35th IUC)
Last updated 2011-11-05
Thanks for trying out our structured source editing modes! Please send
questions, comments, and bug reports to Martin Dürst
(duerst@it.aoyama.ac.jp).
This software is currently in early trial stage. Please make sure you have
backup copies before trying it out on important data.
- Make sure you have Emacs 24.0 (currently alpha/preview) or higher, with
bidi. For instructions on how to download and install for Windows, see
paper. If you compile from source, please make sure you have instaled the
Complex Text Layout support libraries. Also, make sure you have the
necessary fonts (use Options → Multilingual Environment → Show
Multi-lingual Text for a quick check).
- Download some or all of the following files:
- bidi-xml.el (bidi-xml-mode definition file,
in Emacs Lisp)
- bidi-tex.el (bidi-tex-mode definition file,
in Emacs Lisp)
- test-xml.xml (simple test/example file
containing bidirectional XML in various syntactic constructs)
- test-tex.tex (tiny test/example file
containing bidirectional TeX in some syntactic constructs)
(If you are only interested in XML, you don't need the TeX files, if you
want to try with your own data, you may not need the test/example file, and
so on.)
- Start the Emacs installed under point 1.
- If you are not familiar with Emacs key bindings (shortcuts), use menu
selection except where given explicity.
- Load the mode definition file (bidi-xml.el or
bidi-tex.el) with:
Meta-x load-file Enter
Path-to-mode-definition-and-Filename Enter
(Meta is Alt on Windows, Option on the Mac, and Escape can be used on
Linux. Meta-x means to press the Meta key and the x key at the same time.
After pressing Enter, the path/filename can be edited interactively in the
last line at the bottom of the window (called minibuffer)).
- Open a file in the format of the mode file you just loaded (File → Open
File).
- Activate the mode for your file with:
Meta-x
bidi-xml-mode
(replace bidi-xml-mode with bidi-tex-mode for TeX).
- Enjoy!
- Send questions, comments, and bug reports to duerst@it.aoyama.ac.jp.
Known Issues
These are some known issues with the current implementation. We are working
on resolving them, and also might become aware of new issues, so please check
back here regularly.
- There is no syntax highlighting, and none of the special functions and
key mappings that you might be used for editing XML or TeX if you are a
regular Emacs user. This is because our bidi formatting is currently
implemented as as major modes.
- Bidirectional control characters are inserted temporarily to correct
display. This may create the following issues:
- These characters may remain when saving. Please make sure you create
backup copies of your contents before editing. In the case these
control characters end up in a saved file, they can no longer be
distinguished from bidi control characters that are part of the actual
content.
- When moving through the document with the → and ← keys, you may
need more keypresses to move across these (invisible) characters. You
do not have to be concerned with these (e.g. afraid to delete one)
because they get cleaned out and restored repeatedly.
- When copying/pasting, there should be no problem doing so between
buffers that both use our modes. However, copying to buffers with other
modes, or copying outside Emacs will leave control characters where
they don't belong. Copying in the other direction (i.e. from something
else to our modes) doesn't have that problem.
Please send any other issues you discover, and any comments or questions to
Martin Dürst
(duerst@it.aoyama.ac.jp).
Fixed Issues
Fix published 2011-11-05: Improved insertion of bidi control characters (no
control characters around '<' if they are part of a bigger construct, e.g.
'<!--'); solve a bug about the display of '&rlm';.