From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Millar Subject: Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error Date: Mon, 28 Mar 2016 10:54:25 -0400 Message-ID: <56F945A1.7040509@verizon.net> References: <56F5DE32.1090107@verizon.net> <87a8lltwca.fsf@ucl.ac.uk> <56F677E8.3050009@verizon.net> <8760w9tnb0.fsf@ucl.ac.uk> <56F6997B.70505@verizon.net> <87oaa1rwj8.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akYZi-0001Jm-U8 for emacs-orgmode@gnu.org; Mon, 28 Mar 2016 10:55:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akYZf-0006NU-On for emacs-orgmode@gnu.org; Mon, 28 Mar 2016 10:55:26 -0400 Received: from vms173021pub.verizon.net ([206.46.173.21]:58262) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akYZf-0006J6-Jz for emacs-orgmode@gnu.org; Mon, 28 Mar 2016 10:55:23 -0400 Received: from vz-proxy-m007.mx.aol.com ([64.236.83.5]) by vms173021.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O4R00LU383B9680@vms173021.mailsrvcs.net> for emacs-orgmode@gnu.org; Mon, 28 Mar 2016 09:54:47 -0500 (CDT) In-reply-to: <87oaa1rwj8.fsf@ucl.ac.uk> 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: emacs-orgmode@gnu.org On 03/26/2016 01:14 PM, Eric S Fraga wrote: > On Saturday, 26 Mar 2016 at 10:15, Charles Millar wrote: > > [...] > >> I was not clear - I ran the exports after I made the correction to >> "mysetup", i.e. \newcommand{\\foo}{bar} > but I am confused: why the \\ for foo but \ for newcommand? What is the > actual result in the output.tex file? > >> I do agree that the one file that exports as desired must be a result >> of luck. I compared the output.tex file for each document. In each the >> first \usepackage{foo} which is inserted from the SETUPFILE is >> indented several tabs or spaces to the right and not aligned to the >> left margin. > The indentation or not itself is not the issue but only a symptom of an > error before that line, in my opinion. As we agreed my first successful export was lucky, so I revised that file template from which I was exporting - the extra first page and the missing\begin{document} do not seem to be a problem now. However, the LATEX_HEADER: still is placed several spaces to the left, first few lines from the file.tex % Created 2016-03-28 Mon 10:41 % Intended LaTeX compiler: pdflatex \documentclass[fontsize=11pt,letterpaper,twoside=false]{scrartcl} \usepackage{verbatim} % \usepackage[T1]{fontenc} % \usepackage{charter,parskip,setspace,layout} \usepackage{charter,setspace,layout} \usepackage{array,graphicx} \usepackage{tabularx,tabulary} \usepackage{longtable} \usepackage{numprint} \npstyleenglish \usepackage[at]{easylist} \usepackage{csquotes} %\usepackage[letterpaper,margin=1.00in]{geometry} \usepackage[letterpaper,left=1.00in,right=1.00in,top=1.00in,bottom=1.00in]{geometry} % \usepackage[top=1.0in,bottom=0.4in,left=1.2in,nohead]{geometry} %\pagestyle{empty} \pagenumbering{arabic} %\newcommand{\foo}{bar} \usepackage{lastpage} \usepackage{scrpage2} \pagestyle{scrheadings} \setkomafont{pagefoot}{\normalfont\rmfamily} I have also placed the LATEX_HEADER: \usepackage{lastline} directly in the file to be exported, i.e. not relying on a SETUPFILE: and the \usepackage, etc. is also placed to the left. Perhaps this is a bug or is it expected? Anyway, thanks Eric for your comments and to everyone else who has read this thread. Charlie Millar