emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Charles Millar <millarc@verizon.net>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <56F5DEBF.6020302@verizon.net> (raw)
In-Reply-To: <56F5DE32.1090107@verizon.net>

"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
>
>

  reply	other threads:[~2016-03-26  1:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-26  0:56 first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error Charles Millar
2016-03-26  0:58 ` Charles Millar [this message]
2016-03-26  9:36 ` Eric S Fraga
2016-03-26 11:52   ` Charles Millar
2016-03-26 12:51     ` Eric S Fraga
2016-03-26 14:15       ` Charles Millar
2016-03-26 17:14         ` Eric S Fraga
2016-03-26 22:55           ` Charles Millar
2016-03-28 14:54           ` Charles Millar
2016-03-29 10:50             ` Eric S Fraga
2016-04-02  9:00 ` Nicolas Goaziou
2016-04-03 18:18   ` Charles Millar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56F5DEBF.6020302@verizon.net \
    --to=millarc@verizon.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).