From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: preview latex fragment with latex_header Date: Wed, 06 Mar 2013 23:47:19 +0100 Message-ID: <871ubsdu2w.fsf@gmail.com> References: <87hakofg7g.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDN7Y-0004Rx-TG for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 17:47:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDN7X-0002Ue-PZ for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 17:47:36 -0500 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]:40340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDN7X-0002Ua-JJ for emacs-orgmode@gnu.org; Wed, 06 Mar 2013 17:47:35 -0500 Received: by mail-we0-f169.google.com with SMTP id t11so9247215wey.28 for ; Wed, 06 Mar 2013 14:47:34 -0800 (PST) In-Reply-To: <87hakofg7g.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Wed, 06 Mar 2013 21:04:03 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Andreas Leha Cc: emacs-orgmode@gnu.org Hello, Andreas Leha writes: > I have a beamer presentation in org-mode that contains a line like > #+LaTeX_HEADER: \subtitle{foo} > > This prevents me from using 'org-preview-latex-fragment' as that one -- > naturally, as it uses the article class -- fails with > 'Failed to create dvi file from /tmp/orgtex49760oq.tex' > due to > > ,---- > | ERROR: Undefined control sequence. > | > | --- TeX said --- > | l.38 \subtitle > `---- > > What's the remedy here? Interesting. I put back use of #+latex_header keywords for latex snippets recently, but that is a double-edged sword. Overall, I'm not sure which is the right behaviour here. Is there one, anyway? To solve your problem, you can include your problematic header in a new latex class instead of relying on latex_header. Another solution is to put that latex_header line in an include file, or to generate it as a macro. Regards, -- Nicolas Goaziou