Bläddra i källkod

ox-latex.el (latex): Don't force exporting with smart quotes

* ox-latex.el (latex): Don't force exporting with smart
quotes.

* ox.el (org-export-with-smart-quotes): Mention the need to
use the relevant Babel package when setting this option to
non-nil.

Before the fix, if the user used #+LANGUAGE: fr with no other
customization, the quotes would disappear from the PDF output.
That's because smart quotes were enforced, while the .tex file
needs \usepackage[french]{babel} to display the quotes.

We now don't force the smart quotes and give more explanations
in `org-export-with-smart-quotes'.
Bastien Guerry 12 år sedan
förälder
incheckning
320b633b6e
2 ändrade filer med 8 tillägg och 3 borttagningar
  1. 1 2
      lisp/ox-latex.el
  2. 7 1
      lisp/ox.el

+ 1 - 2
lisp/ox-latex.el

@@ -191,8 +191,7 @@
 		   (:latex-header-extra "LATEX_HEADER_EXTRA" nil nil newline)
 		   (:latex-hyperref-p nil "texht" org-latex-with-hyperref t)
 		   ;; Redefine regular options.
-		   (:date "DATE" nil "\\today" t)
-		   (:with-smart-quotes nil "'" t)))
+		   (:date "DATE" nil "\\today" t)))
 
 
 

+ 7 - 1
lisp/ox.el

@@ -582,7 +582,13 @@ This option can also be set with the SELECT_TAGS keyword."
 (defcustom org-export-with-smart-quotes nil
   "Non-nil means activate smart quotes during export.
 This option can also be set with the OPTIONS keyword,
-e.g. \"':t\"."
+e.g., \"':t\".
+
+When setting this to non-nil, you need to take care of
+using the correct Babel package when exporting to LaTeX.
+E.g., you can load Babel for french like this:
+
+#+LaTeX_HEADER: \\usepackage[french]{babel}"
   :group 'org-export-general
   :version "24.4"
   :package-version '(Org . "8.0")