(defun troff2iso () (interactive) (troff2mac) (mac2tex) (tex2iso)) (defun iso2troff () (interactive) (iso2tex) (tex2mac) (mac2troff)) (defun mac2iso () (interactive) (mac2tex) (tex2iso)) (defun wordmac2iso () (interactive) (wordmac2tex) (tex2iso)) (defun mh2tex () (interactive) (mh2iso) (iso2tex)) (defun xterm2iso () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "" ""))) (defun rtf2star () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "\\rquote " "'") (Beginning-of-buffer) (replace-string "\\ldblquote " " ") (beginning-of-buffer) (replace-string "\\rdblquote " " ") (beginning-of-buffer) (replace-string "8" "") (beginning-of-buffer) (replace-string "0" "") (beginning-of-buffer) (replace-string "e" "") (beginning-of-buffer) (replace-string "a" "") (beginning-of-buffer) (replace-string "2" "") ;; important de le faire en dernier (beginning-of-buffer) (replace-string "9" "") )) (defun troff2mac () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "e'" "") (beginning-of-buffer) (replace-string "e`" "") (beginning-of-buffer) (replace-string "e^" "") (beginning-of-buffer) (replace-string "c;" "") (beginning-of-buffer) (replace-string "a`" "") (beginning-of-buffer) (replace-string "a^" "") (beginning-of-buffer) (replace-string "u`" "") (beginning-of-buffer) (replace-string "u\"" "") (beginning-of-buffer) (replace-string "u^" "") (beginning-of-buffer) (replace-string "i^" "") (beginning-of-buffer) (replace-string "o^" "") (beginning-of-buffer) (replace-string "i%" "") (goto-char point) ) ) (defun iso2mac () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (goto-char point) ) ) (defun troff2mac () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "e'" "") (beginning-of-buffer) (replace-string "e`" "") (beginning-of-buffer) (replace-string "e^" "") (beginning-of-buffer) (replace-string "c;" "") (beginning-of-buffer) (replace-string "a`" "") (beginning-of-buffer) (replace-string "a^" "") (beginning-of-buffer) (replace-string "u`" "") (beginning-of-buffer) (replace-string "u\"" "") (beginning-of-buffer) (replace-string "u^" "") (beginning-of-buffer) (replace-string "i^" "") (beginning-of-buffer) (replace-string "o^" "") (beginning-of-buffer) (replace-string "i%" "") (goto-char point) ) ) (defun star2emacs () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "%/1iso8859-15" "") (beginning-of-buffer) (replace-string "\\`e" "") (beginning-of-buffer) (replace-string "\\^e" "") (beginning-of-buffer) (replace-string "\\,c" "") (beginning-of-buffer) (replace-string "\\`a" "") (beginning-of-buffer) (replace-string "\\^a" "") (beginning-of-buffer) (replace-string "\\`u" "") (beginning-of-buffer) (replace-string "\\^u" "") (beginning-of-buffer) (replace-string "\\\"u" "") (beginning-of-buffer) (replace-string "\\^{\\i}" "") (beginning-of-buffer) (replace-string "\\^o" "") (beginning-of-buffer) (goto-char point) )) (defun tex2iso () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "\\'e" "") (beginning-of-buffer) (replace-string "\\`e" "") (beginning-of-buffer) (replace-string "\\\"e" "") (beginning-of-buffer) (replace-string "\\^e" "") (beginning-of-buffer) (replace-string "\\,c" "") (beginning-of-buffer) (replace-string "\\`a" "") (beginning-of-buffer) (replace-string "\\^a" "") (beginning-of-buffer) (replace-string "\\`u" "") (beginning-of-buffer) (replace-string "\\^u" "") (beginning-of-buffer) (replace-string "\\\"u" "") (beginning-of-buffer) (replace-string "\\^{\\i}" "") (beginning-of-buffer) (replace-string "\\{\\i}" "") (beginning-of-buffer) (replace-string "\\^o" "") (goto-char point) ) ) (defun myst2iso () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "é" "") (beginning-of-buffer) (replace-string "è" "") (beginning-of-buffer) (replace-string "\\\"e" "") (beginning-of-buffer) (replace-string "\\^e" "") (beginning-of-buffer) (replace-string "\\,c" "") (beginning-of-buffer) (replace-string "\\`a" "") (beginning-of-buffer) (replace-string "\\^a" "") (beginning-of-buffer) (replace-string "\\`u" "") (beginning-of-buffer) (replace-string "\\^u" "") (beginning-of-buffer) (replace-string "\\\"u" "") (beginning-of-buffer) (replace-string "\\^{\\i}" "") (beginning-of-buffer) (replace-string "\\{\\i}" "") (beginning-of-buffer) (replace-string "ô" "") (goto-char point) ) ) (defun mh2iso () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "3D" "") (beginning-of-buffer) (replace-string "=92" "'") (beginning-of-buffer) (replace-string "=AB" "\"") (beginning-of-buffer) (replace-string "=BB" "\"") (beginning-of-buffer) (replace-string "=09" "") (beginning-of-buffer) (replace-string "=20" "") (beginning-of-buffer) (replace-string "=E9" "") (beginning-of-buffer) (replace-string "=E8" "") (beginning-of-buffer) (replace-string "=EA" "") (beginning-of-buffer) (replace-string "=E7" "") (beginning-of-buffer) (replace-string "=E0" "") (beginning-of-buffer) (replace-string "\" "") (beginning-of-buffer) (replace-string "=F9" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "=EE" "") (beginning-of-buffer) (replace-string "=F4" "") (beginning-of-buffer) (replace-regexp "=[0-9][0-9]\n" "\n") (beginning-of-buffer) (replace-regexp "=\n" "") (beginning-of-buffer) (replace-regexp "<.*bold>" "") (goto-char point) ) ) (defun iso2tex () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "" "\\'e" ) (beginning-of-buffer) (replace-string "" "\\`e" ) (beginning-of-buffer) (replace-string "" "\\^e" ) (beginning-of-buffer) (replace-string "" "\\,c" ) (beginning-of-buffer) (replace-string "" "\\`a" ) (beginning-of-buffer) (replace-string "" "\\^a" ) (beginning-of-buffer) (replace-string "" "\\`u" ) (beginning-of-buffer) (replace-string "" "\\^u" ) (beginning-of-buffer) (replace-string "" "\\\"u" ) (beginning-of-buffer) (replace-string "" "\\^{\\i}" ) (beginning-of-buffer) (replace-string "" "\\^o") (beginning-of-buffer) (goto-char point) ) ) (defun iso2html () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "" "é" ) (beginning-of-buffer) (replace-string "" "è" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\^e" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\,c" ) (beginning-of-buffer) (replace-string "" "à" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\^a" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\`u" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\^u" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\\"u" ) (beginning-of-buffer) (replace-string "" "î" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\^o") (beginning-of-buffer) (goto-char point) ) ) (defun html2iso () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "é" "") (beginning-of-buffer) (replace-string "è" "") ;; (beginning-of-buffer) ;; (replace-string "" "\\^e" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\,c" ) (beginning-of-buffer) (replace-string "à" "") ;; (beginning-of-buffer) ;; (replace-string "" "\\^a" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\`u" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\^u" ) ;; (beginning-of-buffer) ;; (replace-string "" "\\\"u" ) (beginning-of-buffer) (replace-string "î" "") ;; (beginning-of-buffer) ;; (replace-string "" "\\^o") (beginning-of-buffer) (goto-char point) ) ) (defun ital-remove () (beginning-of-buffer) (replace-string "\\fB" "\\fB ") (beginning-of-buffer) (replace-string "\\fI" "\\fI ") (beginning-of-buffer) (replace-string"\\*(lq" "\\*(lq ") (beginning-of-buffer) (replace-string "\\fP" "") (beginning-of-buffer) (replace-string"\\*(rq " "") (beginning-of-buffer) (replace-string " " "") ) (defun ital-trans () (beginning-of-buffer) (replace-string "\\fB" "\\fB ") (beginning-of-buffer) (replace-string "\\fI" "\\fI ") (beginning-of-buffer) (replace-string "\\*(lq" "\\*(lq ") ) ; Word-->troff (defun mac2troff () (interactive) (let ((point (point))) (beginning-of-buffer) (replace-string "" "'" ) (beginning-of-buffer) (replace-string "" "\"" ) (beginning-of-buffer) (replace-string "" "\"" ) (beginning-of-buffer) (replace-string "" "e'" ) (beginning-of-buffer) (replace-string "" "e`" ) (beginning-of-buffer) (replace-string "" "e^" ) (beginning-of-buffer) (replace-string "" "c;" ) (beginning-of-buffer) (replace-string "" "a`" ) (beginning-of-buffer) (replace-string "" "a^" ) (beginning-of-buffer) (replace-string "" "u`" ) (beginning-of-buffer) (replace-string "" "u^" ) (beginning-of-buffer) (replace-string "" "i^" ) (beginning-of-buffer) (replace-string "" "o^" ) (beginning-of-buffer) (replace-string "" "-" ) (beginning-of-buffer) (replace-string "" "i%") (beginning-of-buffer) (replace-string "\\fB " "\\fB") (beginning-of-buffer) (replace-string "\\fI " "\\fI") (beginning-of-buffer) (replace-string"\\*(lq " "\\*(lq") (beginning-of-buffer) (replace-string "" "\"") (goto-char point) ) ) (defun wordmac2tex () (interactive) (mac2tex) (save-excursion (beginning-of-buffer) (replace-string "" "'" ) (beginning-of-buffer) (replace-string "" "\"" ) (beginning-of-buffer) (replace-string "" "\"" ) )) (defun mac2tex () "les accents" (interactive) (save-excursion (beginning-of-buffer) (replace-string "" "'" ) (beginning-of-buffer) (replace-string "" "\"" ) (beginning-of-buffer) (replace-string "" "\"" ) (beginning-of-buffer) (replace-string "" "\\'e" ) (beginning-of-buffer) (replace-string "" "\\`e" ) (beginning-of-buffer) (replace-string "" "\\^e" ) (beginning-of-buffer) (replace-string "" "\\\"e" ) (beginning-of-buffer) (replace-string "" "\\,c" ) (beginning-of-buffer) (replace-string "" "\\`a" ) (beginning-of-buffer) (replace-string "" "\\^a" ) (beginning-of-buffer) (replace-string "" "\\^a" ) (beginning-of-buffer) (replace-string "" "\\`u" ) (beginning-of-buffer) (replace-string "" "\\^u" ) (beginning-of-buffer) (replace-string "" "\\^u" ) (beginning-of-buffer) (replace-string "" "\\^u" ) (beginning-of-buffer) (replace-string "" "\\\"u" ) (beginning-of-buffer) (replace-string "" "\\^{\\i}" ) (beginning-of-buffer) (replace-string "" "\\^o" ) (beginning-of-buffer) (replace-string "" "-" ) (beginning-of-buffer) (replace-string "" "i") (beginning-of-buffer) (replace-string "" "'") )) (defun port2iso () (interactive) (mac2iso) (let ((point (point))) (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "" "") (beginning-of-buffer) (replace-string "\\^a" "") (beginning-of-buffer) (replace-string "\\`u" "") (beginning-of-buffer) (replace-string "\\^u" "") (beginning-of-buffer) (replace-string "\\\"u" "") (beginning-of-buffer) (replace-string "\\^{\\i}" "") (beginning-of-buffer) (replace-string "\\{\\i}" "") (beginning-of-buffer) (replace-string "\\^o" "") (goto-char point) ) )