Oddly, even in this digital world, revising electric manuscripts is not easy as revising them on a piece of paper with red ink. Especially, in an email environment, it is hard to revise a manuscript since the kinds of usable characters are limited, or your email client might automatically change the text arrangement. However, many people want to exchange manuscripts by email. Conventionally, many people may use a method for revising an electric manuscript like below.
The Three Laws of Robotics by Azimuth. ^^^^^^^ This may be a mistake for Asimov. And the number of laws was changed from three to four, wasn't it? 1. A robot may not injure a robot, nor through inaction ^^^^^ This must be "human being" allow a human being to come to harm.
This conventional method indicated correcting position with a symbol `' and proofreading plans with a text. This method always needs much input work and includes some kind of ambiguous, because the proofreading plans are directed by natural language. The main problem of this conventional method comes from this ambiguity. Even if the manuscript has already been digial data, this ambiguity makes automatic extraction of the revised document difficult. Furthermore, information of correcting position with `' sometimes may not be kept depends on the mail client. For example, someone reads a manuscript with proportional font and the other doesn't. In other words, there is the case that it is difficult to specify a correcting point since each person has own environment to read an email including a manuscript.
Manued method solves these problems. The input for designation of proofreading is easy, and it can define exact designation of the correcting region and how to change the text. Therefore, there is no failure the correcting position. There is no mis-recognition of the proofreading text that is a comment or a substitution. In particular, the manued method is independence from the reading environment. We should only assume the manuscript is written as a text file.
Manued has two main notation of proofreading rule. One is ``delete and insert'' rule. This is shown with notation of [original text (delete) /revised text (insert) ; comments ]. Therefore, above text will be changed as follows.
The Three Laws of Robotics by[
Azimuth/Asimov; This may be a mistake with Asimov. And the number of laws was changed from three to four, isn't it?]
. 1. A robot may not injure a[
robot/human being]
, nor through inaction allow a human being to come to harm.
Of course, we can use this method with a piece of paper and a pen. However, we assume only an editor program edits the text file. I implemented ``manued-minor-mode'' on the Emacs editor to make this method more useful. In manued-minor-mode, we can use following functions.
Since manued method doesn't care the writing environment, an input assisting tools can be implemented on other editors. Just only because I always use the emacs, I implemented the tool on there. So, please let me know if you implemented an assistance tool for manued method on other environment. Examples of demanded environments are as follows.
Manued is a method for proofreading of manuscripts, proposed by Ikuo Takeuchi in No.39 Programming symposium, Japan, 1998. The aim of this method is to achieve easy proofreading when people exchange a manuscript via email. I present manued.el as one of the implementations to assist the method.
manued.el depends on the Emacs version 20.7 or later. Installation procedure of manued.el is as following.
(autoload 'manued-minor-mode "manued" "manuscript editing mode" t)
To try out the manued.el, you can read the tutorial file(manued.tut) or directly enter to the manued-minor-mode.
Manued is a proofreading method of manuscripts, proposed by Ikuo Takeuchi in No.39 Programming symposium [3], 1998. Manued stands for MANUscript EDiting Language (and there is another origin. Takeuchi is interested in `Nue'. This is an imaginary creature of Japan. Ma-nue-dou has special meaning in Japanese). The aim of this method is to achieve easy proofreading with exchanging a manuscript via email.(Here is original text in Japanese on the Web.)
When we revise a manuscript sent by email, there are some problems as following.
To solve these problems, we used to exchanging printed paper including proofreading information with red ink via snail-mail. However, this method takes too long in this digital era. Using facsimile is another solution since it has acceptable transmission speed, but receiver must inputs corrections by reading pieces of paper with his/her eyes. So, some errors will be mixed to a manuscript by human error, and input costs for human being is high. There is the OCR technology for recognizing hand written characters, but why we need to use them if we have already typed in the email. In the end, it seems not a good idea to change the media of the manuscript from electric stuffs to printed papers.
[3] pointed out that proofreading for an electric text should have the following features.
Manued is proposed to satisfy these features and this stands for MANUscript EDiting language. The author presents an implementation to support proofreading with this language.
Let me show you some simple examples.
I emphasized the point which I would like to correct in this text. However, some browsers may not express them. I want to correct above text as follows.
By the conventional method, we correct the text as the following.
He was killed at programming. ^ skilled. This small missing "s" is fatal! When ``Norwegian woods'' is translated to Japanese, it is always ^ delete s. I love the Beatles. interpretented as ``a forest in Norway''. However, 1 of my friends ^ interpreted. ^ Of course one is one, but write `one'. says that the light meaning is a furniture made in Norway. ^ right. Please tell me which is right? Why do people say ``chapter first''? ^ one. (I have also same question but one is right.)
To display this conventional descriptions for browsers, I use special tags to preserve two dimensional information like verbatim (for LaTeX) or pre (for html). However, in email environment (RFC 822), there is no such special directives and this conventional descriptions using `' symbol may corrupted. For example, the same information will be shown in the next paragraph without the tags which preserves two dimensional information. The representation of above text will be varied with each environment, since usual browser ignores successive white spaces and line feeds. Some people can understand next documents, but the others see meaningless texts. It will be clear at a glance that this is not beneficial for the people who can not read the following text.
He was killed at programming. skilled. This small missing "s" is fatal!
When ``Norwegian woods'' is translated to Japanese, it is always delete s. I love the Beatles.
interpretented as ``a forest in Norway''. However, 1 of my friends înterpreted. Ôf course one is one, but write `one'.
says that the light meaning is a furniture made in Norway. right.
Please tell me which is right?
Why do people say ``chapter first''? ône. (I have also same question but one is right.)
In addition, even if an environment can preserve the two dimensional information, it is hard to distinguish among correction information, only the comment and original text. Moreover, first you corrected the latter part of your manuscript and second you correct former part of the manuscript, latter corrected parts are sometimes shifted. In such situation, you must maintain the manuscript for keeping consistency of two dimensional information of revised position. This is not easy. I stressed also that cut and paste manipulation may be harmful for the conventional method. Proofreading with Manued is independent from two dimensional information and can resolve the problems of conventional method using '' symbols.
In Manued method, there are only two replacement rules shown as the following.
[A/B]
: This means `delete A and insert B'.
The variations are
[A/]
: Delete A (delete A and insert nothing).
[/A]
: Insert A (delete nothing and insert A).
[A|B|C]
: Swap A with C, so result will be `CBA'.
[A||C]
: Swap A with C.
According to above rules, the example texts will be presented as the following.
You can see the method is stronger than the conventional method. I think you see how manued works. If there is a tool which processes these rules, manued method will be more powerful and useful. Therefore, I implemented manued.el, this program supports manued method. manued.el has the following functions : highlighting correction regions, searching manued directives, inserting manued directives, extracting revised document from the original one.
In Manued, there are ``definition commands of correction symbols'' and ``manued commands''. ``Definition commands of correction symbols'' are to avoid dependences of different environments and ``manued commands'' is to indicate proofreading points. We also call definition commands of correction symbols as def-command, because these commands are always started with a string `def'. Def-commands define proofreading symbols in a manuscript. To correspond to next circumstances, def-commands is defined by Manued.
Def-command is always put at the beginning of the document and must be put at the beginning of line. When it is not put at the beginning of line, Manued could not recognize them in my implementation. The names of definition commands of correction symbols are `def' plus each manued command name. For example, `delete and insert' command is defined by `defdelete' def-command.
When you want to set delete command symbol as `*', you should insert next line in your document.
defdelete *Then correction region will be written as next.
[original text*revised text]This means delete `original text' and insert `revised text'.
When your document has no def-command, default characters are used that suggested in [3] by Ikuo Takeuchi. I will also show the default def-commands in the following section.
This section explains the def-commands.
Def-commands always appears in a proofreaded document as the following.
defparentheses [ ] defdelete / defswap | defcomment ; defescape deforder newer-last defversion 0.9.5The details of the each line are:
[A|B|C]
means A and C will be swapped and results is
CBA. (default value `|
')
~
[foo~
]/These are ~
[bars~
]] has
delete ``This is [foo]'' and insert ``These are [bars]''. However,
too many escapes and is too complicated to read. To avoid this
many escape situation, you can re-define manued command strings by
using defparentheses. For example, write ``defparentheses {
}'', we can rewrite below to {This is [foo]/These are [bars]}.
(default value `~
')
The ratio $a_n/b_n$ must be considered here. ~[\lim_{n \to \infty} \frac{a_n}{b_n} \]If any manued command symbol is processed at any place, all manued command in original text must be escaped. In the above example, '/' of and ] is corresponding to manued command symbol. But these symbols are not in the manued command. It is too cumbersome to escape all the manued command in the text. Therefore, `starting manued region strings' is the only escape target (in here, `[') in the plain text in my implementation.
Definition commands should be located at the top of a manuscript and each def-command must be located at the beginning of line. If a manuscript does not include these def-commands, the default manued symbols will be used. manued.el checks consistency of def-commands and warns to the user when it is not consistent, for example, if defparentheses has only one argument, it will be warned.
This section explains manued commands with default manued symbols.
[A/B]
[A/]
: Delete A. (delete A, insert null string.)
[/A]
: Insert A. (delete null string, insert A.)
[A|B|C]
[A||C]
: Swap A with C. This will be CA.
[; comment ]
~[
will be [
.
Nesting of these commands is possible, and process is done from the
inside to outside. However, non interpretable list of manued command is
an error. For example, it is an error that there is no matching
defparenthesis (e.g., not closing or closing without opening), or it is
also an error like [A|B/C]
manued sequence.
When you extract the new document with manued, do you want to modify the extracted part? For example, when you use a markup language and you want to emphasize the proofreading part with the language. If yes, there is the way to modify the extracted part.
First, you type
M-x manued-set-pretty-print-onand, you apply some Extracting document commands. I will describe this with the following example.
Example 1: Extract from [A/B;C]
to
\colortext{blue}{A}\colortext{red}{B}\colortext{green}{C}
.
Namely, when you want to add some colors at revised parts with TeX.
(setq manued-pretty-print-format-delete-list '("\\colortext{blue}{%s}" "\\colortext{red}{%s}" "\\colortext{green}{%s}"))This should be included in your .emacs or .manued.el. The elements of this list correspond with each part of delete command like next:
(setq manued-pretty-print-format-delete-list '("First Element Format" "Second Element Format" "Comment Element Format"))Each string element will be an argument of the format function of the Emacs.
Ex. 2: In [A/B;C]
, when you want to output B part with
Large strings in TeX way and want to delete part A and comment
part.
(setq manued-pretty-print-format-delete-list '("" "{\\Large %s}" ""))
Ex. 3: If you want to change the style of manued expression like
from [A/B;C]
to {A*B@C}
.
(setq manued-pretty-print-format-delete-list '("{%s*" "%s" "@%s}"))
In manued, the comment part is an optional (not needed). Therefore,
when there is no comment in manued expression, the comment part format
string is not outputted by default. This behavior is controlled by the
variable manued-pretty-print-null-comment-out-p
. Here, we
describe only about delete command, but also the way to control swap
command with pretty print mode. See 5.6.3 in
details.
Since defparenthesis can indicate any strings without white space, next example is valid.
defparentheses ^_^[ ]^_^ Manued^_^[,/]^_^ stands for ``^_^[Tao of manued/Manuscript Editing Language; In Japanese, we call this Manuedou and dou means Tao.]^_^''.
The following text looks like a SGML, HTML, XML.
defparentheses <manued> </manued> defdelete / ``Don't worry, Miss Sakuara. The manuscript still is. <manued>/At here.</manued>'' ``Give me the supreme <manued>sing/song.</manued>'' `` <manued>Reverse/Return</manued> to your original figure.''
Tateoka proposed the following definition, this looks like `sed' commands.
defparenthesis s/ /g defdelete // defescape Manued was proposed by Ikuo Takeuchi who grieved that editing manuscripts by s/Electric mail//email; Later, you use the word email, please standardize your terms./g was not smoothly done because two dimensional information s/od//of/g document is not kept in email.
You can find the latest version and documents in the following Web sites.
manued.el is an Emacs lisp program for supporting the Manued proofreading method. Manued method itself is a proofreading method for correcting electric texts. You can use it even on a paper. But if I had a program, then I would like to have the following features: emphasizing manued commands (e.g. using colors), extracting the revised text and the original text automatically. manued.el offers to add colors to manued commands, to search correction points, to extract the revised text and the original text, and to assist to input manued commands.
I have been interested in Lisp language since I took the Masahiko Sato's class, functional language. At that time, I have not written any Lisp programs. I sometimes tried to write a lisp program, but I always failed because I don't have a killer problem which I really want to solve and I had no friend who is a lisper.
Several years are passed, I must exchange manuscripts to correct with research colleagues via email. It was so cumbersome. I found it was so difficult to revise the manuscript via email, especially just before the deadline of our paper. First, I wrote my manuscript on my computer, then I printed it out, checked it by red pen, then, I inputted correction points back to the computer.
Once I supervised a student. One day he send me his draft of his master thesis. The time of correcting work reaches several hours and the time of input work was taken more hours. I used the conventional method for correcting manuscript. However, there were so much errors and we both frustrated.
Then, I joined the programming symposium and heard the idea of manued. I was immediately fascinated this idea. I thought this is the program I should write and my natural choice is emacs lisp since I am a user of the editor. Professor Takeuchi commented that ``This program should be very easy to implement. I think the fourth grade student entered his/her graduation thesis can be accomplish to write this program.'' I thought this should be a good exercise to start writing lisp program for me. Fortunately, Atusi Maeda, a great lisper helped me a lot.
manued.el is based on Emacs Version 20.7 or later.
(autoload 'manued-minor-mode "manued" "manuscript editing mode" t)
Open any text by emacs, then type `M-x manued-minor-mode' to enter the manued-minor-mode. The following commands are available. Of course you can customize the key bindings.
Manued.el provides two main customizing methods. One of them is to change the emacs lisp variables. I will show the list of customizable variables later. Another method is to use the hook function. The entry function `manued-minor-mode' calls
(run-hooks 'manued-minor-mode-hook)after all initialization is done. So, you can customize manued-minor-mode by using this hook function. (However, now I did not use this feature, this is only available.)
One of recommended methods is that you put the file .manued.el in your home directory and set variables in the file, then you read the file from .emacs. For this, add your .emacs file to next line.
(load-file "~/.manued.el")
When you set the following variables in .emacs file or set by any other method, your definition is valid except when def-commands are appeared in manued document. The default values of def-command is also shown in `()'.
|
')
~
')
manued.el checks that these def-commands have consistency or not. If there is no consistency (e.g. two def-commands has same symbol.), manued.el may warn it. Then you should change definition of def-commands.
There are three choices for using color. Set following variable to manued-use-color-hilit.
Example.
(setq manued-use-color-hilit 'follow-font-lock-mode)
A list which has 6 color names are used to specify the hi-lighting colors. Emacs teaches us what color names are available by typing `M-x list-colors-display'. Each elements of the list means as follows.
'(delete-first-color delete-last-color swap-alpha-color swap-beta-color swap-gamma-color comment-color command-color)
Where,
[
delete-first-color/delete-last-color]
.
[
swap-alpha-color |
swap-beta-color | swap-gamma-color]
[
',`/',`;',`]
'.
For example, according to default values, this color list is set with
'(red gray60 blue red green4 BlueViolet gray60).The variables of keeping default color list is next.
'("\\textnormal{%s}" "\\textbf{%s}" "\\textit{%s}")
)
'("\\textbf{%s}---" "\\textbf{%s}" "---\\textbf{%s}" "(\\textit{%s})")
M-x manued-set-pretty-print-on
,
M-x manued-set-pretty-print-off
).
If you want to get the output as always pretty print style,
set this variable to t.
manued.el (C) Copyright 1998-2012 Hitoshi Yamauchi
This software is free software. There is absolutely no warranty about this program. This software can be redistributed only under GNU copyleft (most recently version of GNU General Public License).
Suggestions, comments and bug reports are welcome to
How to compile TeX file which is extracted by show-newer-command immediately.
I would like to latex compile the output of show-newer-command immediately. (First, you apply manued-show-newer-in-manued-buffer to the current buffer. Second, you write *manued* buffer which is result of the command to foo.tex file by using M-x write-file. Finally you compile `foo.tex' file.) However the compilation may fail because of manued def-commands. One solution is not to use def-command in the manuscript and to set manued-def-* variables by elisp startup file(.emacs). But one of the meanings of def-command is to keep consistency between the def-command symbols and the manued commands within the document. Therefore, it is not a good idea to eliminate def-command header, especially a manuscript is exchanged via email since this is just the case that such consistency should be kept.
manued.el can recognize extended def-command which is attached with some strings at top of def-command. You can set the head strings of def-command to manued-defcommnd-head-str-list. By default, this list includes `%' and `%%' which is the comment symbols of TeX. Next code is recognized by manued.el as def-command. However, a manued command must be put at the beginning of line and should not include blank between the head string with the manued command. You can also customize manued-defcommnd-head-str-list to change the header string.
%%defLparenthesis [ %%defRparenthesis ]
Because the default manued command starts at `[
' and ends with
`]
', this is same as the TeX option argument. I always use
Japanese environment, I change the `[
' and `]
' to 2bytes
parentheses character. However, people use ASCII environment may not
use such method. So, one of this solution uses some special strings
instead of `[
' and `]
'. Next setting is an example.
(setq manued-l-parenthesis-str ":[:") (setq manued-r-parenthesis-str ":]:")
However this seems not so good solution. I actually use a multi-byte characters, but that also depends on your environment.
Takeuchi and I introduce another implementation of manued on ``bit'' No. 12, 1999. Prof. Wada also implemented it on emacs.
This section introduces the implementation of manued by Prof. Wada. This implementation focuses to ``see'' the manued document and much smaller than my implementation. This compactness allows to send a manuscript with the code to whom a person did not install manued.el and the person can instantly use it.
;; ;; manued : editing manuscripts for Emacs ;; 1998 Eiiti Wada ;; manued.el, Copyright (C) 1999 Eiiti Wada”„ ;; ;; (YAMAUCHI, Hitoshi translates the comments to English for explanation.) ;; ;;[A\B] means `substitute A with B.' ;;[A\] means `delete A.' ;;[\B] means `insert B.' ;;[A|B|C] means `reorder ABC to CBA.' ;;[A||B] means `reorder AB to BA.' ;;[@C] means comment. ;; ;; Someone said that it's hard to read the manued document, so I quick ;; hacked a tool for easy browsing. Let's try it. This tool works with ;; X Window version of Mule editor. ;; ;; First, put this emacs lisp program in the mule buffer. ;; Second, type `esc' `esc', then you will see the prompt `Eval:' ;; at the minibuffer, then type (eval-current-buffer) to evaluate whole ;; the program. ;; ;; Next, put the text of your email in the mule buffer, type `esc' `esc' ;; and (manued). Then, you can see the colored A, B, C potion in the ;; buffer. ;; ;; If you don't like these colors, type `esc' `esc' again and execute ;; (list-faces-display), then you can get the name list of enable ;; colors. According to the color list, change the color definition ;; part --- that is in the head part of this program --- to your ;; favorite colors. ;; (make-face 'alpha) (set-face-foreground 'alpha "blue") (make-face 'beta) (set-face-foreground 'beta "red") (make-face 'gamma) (set-face-foreground 'gamma "green4") (setq facealpha 'alpha) (setq facebeta 'beta) (setq facegamma 'gamma) (defun proc-range (beg end) (let* (p0 p1 p2 ch) (goto-char beg) (setq beg (search-forward "[" end t)) (while beg (proc-sec) (setq beg (search-forward "[" end 0))))) (defun proc-sec nil (setq p0 (re-search-forward "[]|\[{]" end t)) (setq ch (string-to-char (buffer-substring (1- p0) p0))) (cond ((= ch ?[) (skip) (proc-sec)) ((= ch ?\\) (findrsb) (alpha beg p0) (beta p0 p2)) ((= ch ?|) (findvl) (findrsb) (alpha beg p0) (gamma p0 p1) (beta p1 p2)) ((= ch ?]) (gamma beg p0)) ((= ch ?{) (skipcb) (proc-sec)))) (defun skip nil (let* (p ch) (setq p (re-search-forward "[][{]" end t)) (while p (setq ch (string-to-char (buffer-substring (1- p) p))) (cond ((= ch ?]) (setq p nil)) ((= ch ?[) (skip) (setq p (re-search-forward "[][]" end t))) ((= ch ?{) (skipcb)) )))) (defun skipcb nil (let* (p ch) (setq p (re-search-forward "[}{]" end t)) (while p (setq ch (string-to-char (buffer-substring (1- p) p))) (cond ((= ch ?}) (setq p nil)) ((= ch ?{) (skipcb) (setq p (re-search-forward "[}{]" end t))))))) (defun findrsb nil (setq p2 (re-search-forward "[][{]" end t)) (setq ch (string-to-char (buffer-substring (1- p2) p2))) (cond ((= ch ?[) (skip) (findrsb)) ((= ch ?])) ((= ch ?{) (skipcb) (findrsb)))) (defun findvl nil (setq p1 (re-search-forward "[|[{]" end t)) (setq ch (string-to-char (buffer-substring (1- p1) p1))) (cond ((= ch ?[) (skip) (findvl)) ((= ch ?|)) ((= ch ?{) (skipcb) (findvl)))) (defun alpha (l r) (put-text-property l (1- r) 'face facealpha) (proc-range l (1- r))) (defun beta (l r) (put-text-property l (1- r) 'face facebeta) (proc-range l (1- r))) (defun gamma (l r) (put-text-property l (1- r) 'face facegamma) (proc-range l (1- r))) (defun manued nil (proc-range 1 (point-max)))
I thank Prof. Wada Eiiti for permitting to public this code.
There is an implementation for a text editor named ``Hidemaru'' on Windows 95 and later.
Manuediff is a diff program which outputs manued format. Example:
manuediff file1 file2 > diff.with.manued.format
Thanks to Takeuchi Ikuo to offer ``Manuscript Editing on E-mail'' and its electric text.
I also thanks to Eiiti Wada who gave me an interesting surprise by the concise implementation.
I also should say ``thank you'' to Atusi Maeda who teaches me the lisp language. I had no knowledge about lisp when I started to implement this.
Some people gave fruitful suggestions, comments with working codes to manued.el implementation. I will thank for all such people, especially the following people. (Alphabetical order)
Copyright (C) 1998-2012 yamauchi, Hitoshi
This document was generated using the LaTeX2HTML translator Version 2008 (1.71)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -html_version 4.0 -init_file dot.latex2html-init-eng manued-e.tex
The translation was initiated by hitoshi on 2012-11-06
hitoshi