소스 검색

Do not add extra empty lines for display formulas

Longmin Wang writes:

> Hi,
>
> I am using org-mode integrated in emacs 23.1.1.  When I export
> the org file to html file, the enumerations will be interrupted
> by some displayed math formulae. For example, the codes
>
>  1. The first.
>
>  2. A displayed formula: \[ \int_0^{+\infty} \frac{c}{1+x^2}dx=1. \]
>
>  3. The third.
>
> will generate
>
>   1. The first.
>   2. A displayed formula:
>   <the formula>
>   1. The third.
>
> Is it a bug? Or I made some mistakes in the source file.
Carsten Dominik 15 년 전
부모
커밋
1c8b0c3b41
2개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 0
      lisp/ChangeLog
  2. 2 2
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-08-25  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-latex-regexps): Don't add extra empty lines for
+	display formulas.
+
 2009-08-24  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-agenda.el (org-agenda-get-some-entry-text): New function.

+ 2 - 2
lisp/org.el

@@ -13944,8 +13944,8 @@ The images can be removed again with \\[org-ctrl-c-ctrl-c]."
     ("$1" "\\([^$]\\)\\(\\$[^ 	\r\n,;.$]\\$\\)\\([- 	.,?;:'\")\000]\\|$\\)" 2 nil)
     ("$" "\\([^$]\\)\\(\\(\\$\\([^ 	\r\n,;.$][^$\n\r]*?\\(\n[^$\n\r]*?\\)\\{0,2\\}[^ 	\r\n,.$]\\)\\$\\)\\)\\([- 	.,?;:'\")\000]\\|$\\)" 2 nil)
     ("\\(" "\\\\([^\000]*?\\\\)" 0 nil)
-    ("\\[" "\\\\\\[[^\000]*?\\\\\\]" 0 t)
-    ("$$" "\\$\\$[^\000]*?\\$\\$" 0 t))
+    ("\\[" "\\\\\\[[^\000]*?\\\\\\]" 0 nil)
+    ("$$" "\\$\\$[^\000]*?\\$\\$" 0 nil))
   "Regular expressions for matching embedded LaTeX.")
 
 (defun org-format-latex (prefix &optional dir overlays msg at forbuffer)