Jelajahi Sumber

Remove dependency on LaTeX style file fullpage.sty

Patch by Tim Burt.
Carsten Dominik 15 tahun lalu
induk
melakukan
40940daad2
2 mengubah file dengan 19 tambahan dan 3 penghapusan
  1. 2 0
      lisp/ChangeLog
  2. 17 3
      lisp/org.el

+ 2 - 0
lisp/ChangeLog

@@ -1,5 +1,7 @@
 2009-09-28  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-format-latex-header): Inline fullpage.sty.
+
 	* org-footnote.el (org-footnote-create-definition): Reveal context
 	to add a new footnote definition.
 

+ 17 - 3
lisp/org.el

@@ -2678,14 +2678,28 @@ This is a property list with the following properties:
   :type 'plist)
 
 (defcustom org-format-latex-header "\\documentclass{article}
-\\usepackage{fullpage}         % do not remove
 \\usepackage{amssymb}
 \\usepackage[usenames]{color}
 \\usepackage{amsmath}
 \\usepackage{latexsym}
 \\usepackage[mathscr]{eucal}
-\\pagestyle{empty}             % do not remove"
-  "The document header used for processing LaTeX fragments."
+\\pagestyle{empty}             % do not remove
+% The settings below are copied from fullpage.sty
+\\setlength{\\textwidth}{\\paperwidth}
+\\addtolength{\\textwidth}{-3cm}
+\\setlength{\\oddsidemargin}{1.5cm}
+\\addtolength{\\oddsidemargin}{-2.54cm}
+\\setlength{\\evensidemargin}{\\oddsidemargin}
+\\setlength{\\textheight}{\\paperheight}
+\\addtolength{\\textheight}{-\\headheight}
+\\addtolength{\\textheight}{-\\headsep}
+\\addtolength{\\textheight}{-\\footskip}
+\\addtolength{\\textheight}{-3cm}
+\\setlength{\\topmargin}{1.5cm}
+\\addtolength{\\topmargin}{-2.54cm}"
+  "The document header used for processing LaTeX fragments.
+It is imperative that this header make sure that no page number
+appears on the page."
   :group 'org-latex
   :type 'string)