[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] first #+LATEX_HEADER: in SETUPFILE not correctly exported and ca

From: Charles Millar
Subject: Re: [O] first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
Date: Fri, 25 Mar 2016 20:58:39 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

"Pushed" the send button too soon

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}}
#+LATEX_CLASS: mysetup

"mysetup" class is

(add-to-list 'org-latex-classes
% \\usepackage[T1]{fontenc}
% \\usepackage{charter,parskip,setspace,layout}
% \\usepackage[top=1.0in,bottom=0.4in,left=1.2in,nohead]{geometry}
("\\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
% \usepackage[T1]{fontenc}
% \usepackage{charter,parskip,setspace,layout}
% \usepackage[top=1.0in,bottom=0.4in,left=1.2in,nohead]{geometry}
\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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]