From dfb7b5996a4d0aabd5ee51d167fc96d06ba78996 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Mon, 5 Sep 2005 16:49:35 +0000 Subject: [PATCH] muse-latex: Handle special characters in a better way. * lisp/muse-latex.el (muse-latex-markup-regexps): Remove special characters hack. (muse-latex-markup-strings): Use \\texttt{...} for 'begin-literal and 'end-literal. Thanks to Trent Buck for the suggestion. (muse-latex-markup-specials): Move special characters here instead of using the regexp. git-archimport-id: mwolson@gnu.org--2005/muse--main--1.0--patch-226 --- ChangeLog | 18 ++++++++++++++++++ lisp/muse-latex.el | 20 ++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index fec2c57..364af3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,24 @@ # arch-tag: automatic-ChangeLog--mwolson@gnu.org--2005/muse--main--1.0 # +2005-09-05 16:49:35 GMT Michael Olson patch-226 + + Summary: + muse-latex: Handle special characters in a better way. + Revision: + muse--main--1.0--patch-226 + + * lisp/muse-latex.el (muse-latex-markup-regexps): Remove special + characters hack. + (muse-latex-markup-strings): Use \\texttt{...} for 'begin-literal and + 'end-literal. Thanks to Trent Buck for the suggestion. + (muse-latex-markup-specials): Move special characters here instead of + using the regexp. + + modified files: + ChangeLog lisp/muse-latex.el + + 2005-09-05 14:25:37 GMT Michael Olson patch-225 Summary: diff --git a/lisp/muse-latex.el b/lisp/muse-latex.el index f7e89d0..9cbfaa5 100644 --- a/lisp/muse-latex.el +++ b/lisp/muse-latex.el @@ -113,14 +113,11 @@ filename." `(;; numeric ranges (10000 "\\([0-9]+\\)-\\([0-9]+\\)" 0 "\\1--\\2") - ;; characters which need quoting - (10100 "\\([%$#_]\\)" 0 "\\\\\\1") - ;; be careful of closing quote pairs - (10200 "\"'" 0 "\"\\\\-'") + (10100 "\"'" 0 "\"\\\\-'") ;; join together the parts of a list or table - (10300 ,(concat + (10200 ,(concat "\\\\end{\\(tabular\\|description\\|itemize\\|enumerate\\)}\n+" "\\\\begin{\\1}\\({[^\n}]+}\\)?\n+") 0 "")) "List of markup regexps for identifying regions in a Muse page. @@ -173,8 +170,8 @@ For more on the structure of this list, see (footnotetext-end . "}") (begin-underline . "\\underline{") (end-underline . "}") - (begin-literal . "\\verb|") - (end-literal . "|") + (begin-literal . "\\texttt{") + (end-literal . "}") (begin-emph . "\\emph{") (end-emph . "}") (begin-more-emph . "\\textbf{") @@ -237,7 +234,14 @@ system to an associated CJK coding system." muse-latexcjk-encoding-default))) (defcustom muse-latex-markup-specials - '((?\\ . "\\\\")) + '((?\\ . "\\\\") + (?\$ . "\\$") + (?\% . "\\%") + (?\_ . "\\_") + (?\{ . "\\{") + (?\} . "\\}") + (?\& . "\\&") + (?\# . "\\#")) "A table of characters which must be represented specially." :type '(alist :key-type character :value-type string) :group 'muse-latex) -- 2.11.4.GIT