瀏覽代碼

LaTeX export: Allow bracket before opening quote

Brenton Kenkel writes:

> I found an apparent minor bug with links containing quotation marks in
> LaTeX export. If the first character in the name of a link is a
> quotation mark, it is converted to a closing mark rather than an
> opening mark. For example:
>
> ,----
> | * test
> |
> | [[http://www.google.com]["hello"]]
> | [[http://www.google.com]["two" "quotes"]]
> `----
>
> This produces:
>
> ,----
> | \href{http://www.google.com}{''hello''}
> | \href{http://www.google.com}{''two'' ``quotes''}
> `----
Carsten Dominik 15 年之前
父節點
當前提交
caea94a408
共有 2 個文件被更改,包括 4 次插入1 次删除
  1. 3 0
      lisp/ChangeLog
  2. 1 1
      lisp/org-latex.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-10-28  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-latex.el (org-export-latex-quotation-marks): Allow a bracket
+	before an opening quote.
+
 	* org-archive.el (org-archive-subtree): Keep archive after
 	archiving something.
 

+ 1 - 1
lisp/org-latex.el

@@ -1167,7 +1167,7 @@ links, keywords, lists, tables, fixed-width"
 			'(("\\(\\s-\\)\"" "«~")
 			  ("\\(\\S-\\)\"" "~»")
 			  ("\\(\\s-\\)'" "`"))
-		      '(("\\(\\s-\\|(\\)\"" "``")
+		      '(("\\(\\s-\\|[[(]\\)\"" "``")
 			("\\(\\S-\\)\"" "''")
 			("\\(\\s-\\|(\\)'" "`")))))
     (mapc (lambda(l) (goto-char (point-min))