[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] Allowing \documentclass options and using inputenc.
From: |
drkm |
Subject: |
[patch] Allowing \documentclass options and using inputenc. |
Date: |
Sat, 30 Jul 2005 01:52:01 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (windows-nt) |
Hi
What to you think about the following patch, allowing for
example this code in ~/.emacs.el:
(setq cal-tex-inputenc "latin1"
cal-tex-documentclass-options "a4paper")
The patch:
--- cal-tex.el-OLD 2005-07-30 01:39:44.000000000 +0200
+++ cal-tex.el 2005-07-30 01:47:02.000000000 +0200
@@ -148,6 +148,18 @@
:type 'hook
:group 'calendar-tex)
+(defcustom cal-tex-inputenc nil
+ "*If this is not nil, use package inputenc with this value as option."
+ :type 'string
+ :group 'calendar-tex)
+
+(defcustom cal-tex-documentclass-options nil
+ "*Additional option string to pass to the LaTeX documentclass.
+May contains several options, is copied verbatim (as well as
+extra options and commas if needed)."
+ :type 'string
+ :group 'calendar-tex)
+
;;;
;;; Definitions for LaTeX code
;;;
@@ -249,10 +261,16 @@
(set-buffer (get-buffer-create cal-tex-buffer))
(erase-buffer)
(insert "\\documentclass")
- (if args
- (insert "[" args "]"))
- (insert "{article}\n"
- "\\hbadness 20000
+ (cond ((and args cal-tex-documentclass-options)
+ (insert "[" args "," cal-tex-documentclass-options "]"))
+ (cal-tex-documentclass-options
+ (insert "[" cal-tex-documentclass-options "]"))
+ (args
+ (insert "[" args "]")))
+ (insert "{article}\n")
+ (if cal-tex-inputenc
+ (insert "\\usepackage[" cal-tex-inputenc "]{inputenc}\n"))
+ (insert "\\hbadness 20000
\\hfuzz=1000pt
\\vbadness 20000
\\lineskip 0pt
--drkm
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [patch] Allowing \documentclass options and using inputenc.,
drkm <=