emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
@ 2016-03-26  0:56 Charles Millar
  2016-03-26  0:58 ` Charles Millar
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Charles Millar @ 2016-03-26  0:56 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  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
  2016-03-26  9:36 ` Eric S Fraga
  2016-04-02  9:00 ` Nicolas Goaziou
  2 siblings, 0 replies; 12+ messages in thread
From: Charles Millar @ 2016-03-26  0:58 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  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
@ 2016-03-26  9:36 ` Eric S Fraga
  2016-03-26 11:52   ` Charles Millar
  2016-04-02  9:00 ` Nicolas Goaziou
  2 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2016-03-26  9:36 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode

On Friday, 25 Mar 2016 at 20:56, Charles Millar wrote:

[...]
> \newcommand\foo{bar}

The problem is this line.  The proper syntax is

\newcommand{\foo}{bar}

HTH,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  2016-03-26  9:36 ` Eric S Fraga
@ 2016-03-26 11:52   ` Charles Millar
  2016-03-26 12:51     ` Eric S Fraga
  0 siblings, 1 reply; 12+ messages in thread
From: Charles Millar @ 2016-03-26 11:52 UTC (permalink / raw)
  To: emacs-orgmode

Hi Eric

On 03/26/2016 05:36 AM, Eric S Fraga wrote:
> On Friday, 25 Mar 2016 at 20:56, Charles Millar wrote:
>
> [...]
>> \newcommand\foo{bar}
> The problem is this line.  The proper syntax is
>
> \newcommand{\foo}{bar}
>
>
Thanks for the correction. I escaped the \foo otherwise I had a spurious 
"oobar" at the beginning of the exported document so that my latex class 
has

\newcommand{\\foo}{bar}

I suspect that this problem may be file specific. I exported another 
file, using the same SETUPFILE and had no problems

Charlie

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  2016-03-26 11:52   ` Charles Millar
@ 2016-03-26 12:51     ` Eric S Fraga
  2016-03-26 14:15       ` Charles Millar
  0 siblings, 1 reply; 12+ messages in thread
From: Eric S Fraga @ 2016-03-26 12:51 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode

On Saturday, 26 Mar 2016 at 07:52, Charles Millar wrote:

[...]

> Thanks for the correction. I escaped the \foo otherwise I had a
> spurious "oobar" at the beginning of the exported document so that my
> latex class has
>
> \newcommand{\\foo}{bar}
>
> I suspect that this problem may be file specific. I exported another
> file, using the same SETUPFILE and had no problems

It may have "worked" but the odds are that you were simply
lucky.  \newcommand expects two {} arguments, the first being the name
of the command and the second the actual sequence to execute.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  2016-03-26 12:51     ` Eric S Fraga
@ 2016-03-26 14:15       ` Charles Millar
  2016-03-26 17:14         ` Eric S Fraga
  0 siblings, 1 reply; 12+ messages in thread
From: Charles Millar @ 2016-03-26 14:15 UTC (permalink / raw)
  To: emacs-orgmode

Eric,

On 03/26/2016 08:51 AM, Eric S Fraga wrote:
> On Saturday, 26 Mar 2016 at 07:52, Charles Millar wrote:
>
> [...]
>
>> Thanks for the correction. I escaped the \foo otherwise I had a
>> spurious "oobar" at the beginning of the exported document so that my
>> latex class has
>>
>> \newcommand{\\foo}{bar}
>>
>> I suspect that this problem may be file specific. I exported another
>> file, using the same SETUPFILE and had no problems
> It may have "worked" but the odds are that you were simply
> lucky.  \newcommand expects two {} arguments, the first being the name
> of the command and the second the actual sequence to execute.
I was not clear - I ran the exports after I made the correction to 
"mysetup", i.e. \newcommand{\\foo}{bar}

One file or document exported as I expected; the other file or document 
did not, i.e. still had the extra first page and Missing 
\begin{document} error.
Both documents use a SETUPFILE with identical series of #+LATEX_HEADER:

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.

Moving that one line to the left margin using e.g. TeXstudo fixes the 
problem.

BTW, I also changed the first #+LATEX_HEADER:  \usepackage{foo} line is 
SETUPFILE to other entries and the same problem, so I don't believe that 
the problem is LaTeX specific. (I also used #+LATEX_HEADER_EXTRA)

What is causing the first LATEX_HEADER:  to indent and therefore causing 
a blank page and missing \begin{document} error?

Charlie

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  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
  0 siblings, 2 replies; 12+ messages in thread
From: Eric S Fraga @ 2016-03-26 17:14 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode

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.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  2016-03-26 17:14         ` Eric S Fraga
@ 2016-03-26 22:55           ` Charles Millar
  2016-03-28 14:54           ` Charles Millar
  1 sibling, 0 replies; 12+ messages in thread
From: Charles Millar @ 2016-03-26 22:55 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]



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?
My typo. Just in case I attach a copy of the "mysetup class" which I 
believe is now correct and which i have been using since your original 
response where you pointed out that \\newcommand, etc. was incorrect . I 
have used this as the latex class for all subsequent messages in this 
thread.

> What is the
> actual result in the output.tex file?
See attached TestLatexformessage.tex
>> 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.
I place the cursor just before \usepackage{lastpage} and backspace once, 
the file builds without the extra page, etc.

Is there a proper location for the #+SETUPFILE: line in the main org file?

Charlie


[-- Attachment #2: mysetup-latex-class --]
[-- Type: text/plain, Size: 1083 bytes --]

(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}")))


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: TestLatexformessage.tex --]
[-- Type: text/x-tex; name=TestLatexformessage.tex, Size: 1625 bytes --]

% Created 2016-03-26 Sat 18:11
% 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}
\ifoot{Foo}
\cfoot[\pagemark]{\hspace{1.0in} Page \thepage\ of \pageref{LastPage}}
[redacted]
\date{}
\title{}
\begin{document}

\label{sec:org4108cc1}
\label{sec:org42652eb}
\setcounter{page}{1}
\setlength{\extrarowheight}{0.5ex}
\begin{flushleft}
\begin{tabular}{ l l }
STATE OF NEW YORK SURROGATE'S COURT & \\
COUNTY OF \CourtCounty & \\
\cline{1-1}& \\
Proceeding by \PetitionerOneName & \\
as \PetitionerOneFiduciaryType of the Estate of \DecedentNameCaption &  LIST OF ASSETS/INVENTORY\\
  & (Rule §207.20(a)) \\
a/k/a \DecedentAKACaption, & File No.: \FileNumber \\
\hspace{1.5in}Deceased. & \\[0.25ex] \cline{1-1}
\end{tabular}\\[1.0ex]
\end{flushleft}
\begin{onehalfspacing}

Something is printed here.
\end{document}


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  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
  1 sibling, 1 reply; 12+ messages in thread
From: Charles Millar @ 2016-03-28 14:54 UTC (permalink / raw)
  To: emacs-orgmode



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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  2016-03-28 14:54           ` Charles Millar
@ 2016-03-29 10:50             ` Eric S Fraga
  0 siblings, 0 replies; 12+ messages in thread
From: Eric S Fraga @ 2016-03-29 10:50 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode

On Monday, 28 Mar 2016 at 10:54, Charles Millar wrote:

[...]

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

So everything is fine other than the placement of the LaTeX header line?

In terms of the placement, I have no idea what causes this.  I don't
often look at the LaTeX the org exporter creates so cannot say whether
this is normal or not.  The extra whitespace should not affect LaTeX in
any case.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-668-g809a83

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  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
  2016-03-26  9:36 ` Eric S Fraga
@ 2016-04-02  9:00 ` Nicolas Goaziou
  2016-04-03 18:18   ` Charles Millar
  2 siblings, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2016-04-02  9:00 UTC (permalink / raw)
  To: Charles Millar; +Cc: emacs-orgmode

Hello,

Charles Millar <millarc@verizon.net> writes:

> I have a #+SETUPFILE which starts as follows
>
> #+LATEX_HEADER: \usepackage{lastpage}

[...]

> "mysetup" class is
>
> (add-to-list 'org-latex-classes
>               '("mysetup"
> "\\documentclass[fontsize=11pt,letterpaper,twoside=false]{scrartcl}

[...]

> \\newcommand\\foo{bar}
>                [NO-DEFAULT-PACKAGES]
>                [NO-PACKAGES]
>                [EXTRA]"

[...]

> \newcommand\foo{bar}
>                              \usepackage{lastpage}

Your template includes indentation before "[EXTRA]". This indentation
appears in the output, in this case, before the first LATEX_HEADER
directive.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: first #+LATEX_HEADER: in SETUPFILE not correctly exported and causes Missing \begin{document} error
  2016-04-02  9:00 ` Nicolas Goaziou
@ 2016-04-03 18:18   ` Charles Millar
  0 siblings, 0 replies; 12+ messages in thread
From: Charles Millar @ 2016-04-03 18:18 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

On 04/02/2016 05:00 AM, Nicolas Goaziou wrote:
> Hello,
>
> Charles Millar <millarc@verizon.net> writes:
>
> [...]
>> "mysetup" class is
>>
>> (add-to-list 'org-latex-classes
>>                '("mysetup"
>> "\\documentclass[fontsize=11pt,letterpaper,twoside=false]{scrartcl}
> [...]
>
>> \\newcommand\\foo{bar}
>>                 [NO-DEFAULT-PACKAGES]
>>                 [NO-PACKAGES]
>>                 [EXTRA]"
> [...]
>
>> \newcommand\foo{bar}
>>                               \usepackage{lastpage}
> Your template includes indentation before "[EXTRA]". This indentation
> appears in the output, in this case, before the first LATEX_HEADER
> directive.
>
>
Thank you, Nicolas!

Charlie Millar

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-04-03 18:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).