From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tassilo Horn Subject: Re: Issues with org-mode and LaTeX export. Date: Thu, 21 Oct 2010 17:03:48 +0200 Message-ID: <87vd4v610r.fsf@thinkpad.tsdh.de> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=50176 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P8wgZ-0002ih-AC for emacs-orgmode@gnu.org; Thu, 21 Oct 2010 11:04:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P8wgX-0007ic-OW for emacs-orgmode@gnu.org; Thu, 21 Oct 2010 11:04:07 -0400 Received: from lo.gmane.org ([80.91.229.12]:59368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P8wgX-0007iB-CG for emacs-orgmode@gnu.org; Thu, 21 Oct 2010 11:04:05 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P8wgS-0001Kc-KH for emacs-orgmode@gnu.org; Thu, 21 Oct 2010 17:04:00 +0200 Received: from tsdh.uni-koblenz.de ([141.26.67.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Oct 2010 17:04:00 +0200 Received: from tassilo by tsdh.uni-koblenz.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 21 Oct 2010 17:04:00 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org gerald.jean@dgag.ca writes: Hi Gerald, > 1.- Following advice in the org manual I added the following lines to my > .emacs. > > (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) > (global-set-key "\C-cl" 'org-store-link) > (global-set-key "\C-ca" 'org-agenda) > (global-set-key "\C-cb" 'org-iswitchb) > (setq org-log-done t) > > when I open a *.org file, org-mode is turned on OK. But none of the > "org-export-latex-*" variables are defined at this point? That's because at that point org is not loaded, but only registered at the autoloading facility. As soon as you invoke one of them (e.g. with a keybinding) org is loaded, and then the missing variables will be defined as well. But a variable doesn't need to be defvared before setting them, so you can simply add (setq org-export-latex-foobar "some nice setting") to your emacs file although that variable isn't known at that time. When org is loaded your values won't be overridden. > 2.- Now, I want to use different packages, for example > > \usepackage[latin9]{inputenc} > \usepackage[T1]{fontenc} I think the those should be added automatically, and the encoding is determined by the org file's encoding. > \usepackage[english, francais]{babel} > > I posted about this yesterday and I got the following reply from Thomas S. > Dye, thanks Thomas, I didn't read that, but... > Perhaps the org-export-latex-classes variable is mis-configured. IIUC, the > [EXTRA] macro needs to be present: ... I don't think that variable is the right thing here. > Unfortunaetly this is not enough details for my little knowledge of > elisp! Could someone provide me with a clear example of what needs to > go in the .emacs file for packages with options and correspondingly > what needs to go in the org file for that example. I think this should do what you want, e.g. enable babel with english and francais options: --8<---------------cut here---------------start------------->8--- (setq org-export-latex-packages-alist '(("english, francais" "babel" nil))) --8<---------------cut here---------------end--------------->8--- > Does the .emacs file needs to be modified every time one wants to add > a new package? If you want a new package in every exported document, add an entry of form (OPTIONS PACKAGE nil) to the list above. Bye, Tassilo