Jelajahi Sumber

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 tahun lalu
induk
melakukan
caea94a408
2 mengubah file dengan 4 tambahan dan 1 penghapusan
  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))