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: Fri, 25 Mar 2016 20:58:39 -0400 Message-ID: <56F5DEBF.6020302@verizon.net> References: <56F5DE32.1090107@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajdVN-0001io-8i for emacs-orgmode@gnu.org; Fri, 25 Mar 2016 21:59:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajdVK-0000rT-14 for emacs-orgmode@gnu.org; Fri, 25 Mar 2016 21:59:09 -0400 Received: from vms173007pub.verizon.net ([206.46.173.7]:51357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajdVJ-0000rI-Ry for emacs-orgmode@gnu.org; Fri, 25 Mar 2016 21:59:05 -0400 Received: from vz-proxy-m003.mx.aol.com ([64.236.83.10]) by vms173007.mailsrvcs.net (Oracle Communications Messaging Server 7.0.5.32.0 64bit (built Jul 16 2014)) with ESMTPA id <0O4M004J1G1ZMS80@vms173007.mailsrvcs.net> for emacs-orgmode@gnu.org; Fri, 25 Mar 2016 19:58:48 -0500 (CDT) In-reply-to: <56F5DE32.1090107@verizon.net> 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 "Pushed" the send button too soon LMDE2 GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of 2015-03-07 on trouble, modified by Debian Org-mode version 8.3.4 (release_8.3.4-655-g9fb077 @ /usr/local/share/emacs/site-lisp/org-mode/lisp/) On 03/25/2016 08:56 PM, Charles Millar wrote: > I have a #+SETUPFILE which starts as follows > > #+LATEX_HEADER: \usepackage{lastpage} > #+LATEX_HEADER: \usepackage{scrpage2} > #+LATEX_HEADER: \pagestyle{scrheadings} > #+LATEX_HEADER: \setkomafont{pagefoot}{\normalfont\rmfamily} > #+LATEX_HEADER: \ifoot{foobar} > #+LATEX_HEADER: \cfoot[\pagemark]{\hspace{1.0in} Page \thepage\ of > \pageref{LastPage}} > #+OPTIONS: H:5 > #+LATEX_CLASS: mysetup > > "mysetup" class is > > (add-to-list 'org-latex-classes > '("mysetup" > "\\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} > [NO-DEFAULT-PACKAGES] > [NO-PACKAGES] > [EXTRA]" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > ("\\paragraph{%s}" . "\\paragraph*{%s}") > ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) > > I do obtain the expected pdf output except that an extra page is added > to the very beginning of the document. Investigating and running the > output.tex file in TeXStudio throws an error - Missing > \begin{document} (Same result also typeset in TeXWorks is run) > > Investigating the output.tex shows the following - please note how > \usepackage{lastpage} is misaligned > > % Created 2016-03-25 Fri 20: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=0.75in,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} > \ifoot{Sergi, F. Estate} > \cfoot[\pagemark]{\hspace{1.0in} Page \thepage\ of \pageref{LastPage}} > > If I edit the output.tex file in TeXStudio by moving the > \usepackage{lastpage} all the way to the left margin both problems are > fixed, i.e. when I run build and view in TeXStudio there is no > "Missing \begin{document}" error and there is no extra page is created > at at the beginning of the document. > > So, is my SETUPFILE not correct or is there a problem with the > exporter in that extra spaces are added to the first line of the > SETUPFILE upon export or do I have incompatible packages, etc.? > > Charlie Millar > >