emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Latex "Missing number, treated as zero."
@ 2013-12-01 17:54 Ian Barton
  2013-12-01 20:23 ` Michael Strey
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Barton @ 2013-12-01 17:54 UTC (permalink / raw)
  To: Emacs-orgmode

This is a Latex problem, but I am hoping someone here can trow some 
light on it. I was trying out the Koma Letter Export script. I get the 
following error when trying to create a pdf from the "Simple letter 
example".

)) (/usr/share/texmf/tex/latex/koma-script/DIN.lco)
(/usr/share/texmf-dist/tex/generic/babel/babel.sty
(/usr/share/texmf-dist/tex/generic/babel-english/english.ldf
(/usr/share/texmf-dist/tex/generic/babel/babel.def)))
! Missing number, treated as zero.
<to be read again>

Chopping down the text file to the minimal:

\documentclass{scrlttr2} \usepackage[english]{babel}  [NO-DEFAULT-PACKAGES]


\begin{document}


\end{document}

still gives the error. However, if I remove [NO-DEFAULT-PACKAGES] I 
don't get the error. I spent some time Googling, but can't find anything 
helpful.

latex --version gives:

pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Arch Linux)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.6; using libpng 1.6.7
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.24.2


Ian.

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

* Re: Latex "Missing number, treated as zero."
  2013-12-01 17:54 Latex "Missing number, treated as zero." Ian Barton
@ 2013-12-01 20:23 ` Michael Strey
  2013-12-02 11:35   ` Ian Barton
  0 siblings, 1 reply; 6+ messages in thread
From: Michael Strey @ 2013-12-01 20:23 UTC (permalink / raw)
  To: ian; +Cc: Emacs-orgmode

Hi Ian,

lists@wilkesley.net writes:

> This is a Latex problem, but I am hoping someone here can trow some 
> light on it.

No, it's not a LaTeX problem.

> \documentclass{scrlttr2} \usepackage[english]{babel}  [NO-DEFAULT-PACKAGES]

This line is no valid LaTeX code.  As you already mentioned, if you
remove `[NO-DEFAULT-PACKAGES]', the pdflatex run works.

Please check your Emacs variable org-latex-classes.

Here is what I have in this variable for my letter class:

,----
|  ("letter_private" "\\documentclass[fontsize=11pt,strey_privat]{scrlttr2}\n\\LoadLetterOption{DIN}\n[NO-DEFAULT-PACKAGES]\n[PACKAGES]\n[EXTRA]"
|   ("\\section{%s}" . "\\section*{%s}")
|   ("\\subsection{%s}" . "\\subsection*{%s}")
|   ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
`----

Best regards
Michael Strey
-- 
http://www.strey.biz

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

* Re: Latex "Missing number, treated as zero."
  2013-12-01 20:23 ` Michael Strey
@ 2013-12-02 11:35   ` Ian Barton
  2013-12-02 13:14     ` Alan Schmitt
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Barton @ 2013-12-02 11:35 UTC (permalink / raw)
  To: emacs-orgmode

On 01/12/13 20:23, Michael Strey wrote:
> Hi Ian,
>
> lists@wilkesley.net writes:
>
>> This is a Latex problem, but I am hoping someone here can trow some
>> light on it.
>
> No, it's not a LaTeX problem.
>
>> \documentclass{scrlttr2} \usepackage[english]{babel}  [NO-DEFAULT-PACKAGES]
>
> This line is no valid LaTeX code.  As you already mentioned, if you
> remove `[NO-DEFAULT-PACKAGES]', the pdflatex run works.
>
> Please check your Emacs variable org-latex-classes.
>
> Here is what I have in this variable for my letter class:
>
> ,----
> |  ("letter_private" "\\documentclass[fontsize=11pt,strey_privat]{scrlttr2}\n\\LoadLetterOption{DIN}\n[NO-DEFAULT-PACKAGES]\n[PACKAGES]\n[EXTRA]"
> |   ("\\section{%s}" . "\\section*{%s}")
> |   ("\\subsection{%s}" . "\\subsection*{%s}")
> |   ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
> `----
>

Hi Michael,

Thanks for the help. I did have org-latex-classes set correctly. I 
discovered the cause of the problem when I found that if I let org 
generate the pdf file it worked correctly. However, if I used pdflatex, 
or xelatex from the command line on the generated tex file, I still got 
the error.

Looking at how org produces the pdf file it uses the "nonstopmode" in 
the command line arguments to pdflatex. So when I used xelatex with this 
option:

xelatex -interaction=nonstopmode test.tex

The pdf file was generated correctly. I don't think this actually fixes 
the error, but the sledgehammer approach seems to work in this case:)

Ian.

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

* Re: Latex "Missing number, treated as zero."
  2013-12-02 11:35   ` Ian Barton
@ 2013-12-02 13:14     ` Alan Schmitt
  2013-12-02 14:09       ` Sebastien Vauban
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Schmitt @ 2013-12-02 13:14 UTC (permalink / raw)
  To: ian; +Cc: emacs-orgmode

lists@wilkesley.net writes:

>> Here is what I have in this variable for my letter class:
>>
>> ,----
>> |  ("letter_private" "\\documentclass[fontsize=11pt,strey_privat]{scrlttr2}\n\\LoadLetterOption{DIN}\n[NO-DEFAULT-PACKAGES]\n[PACKAGES]\n[EXTRA]"
>> |   ("\\section{%s}" . "\\section*{%s}")
>> |   ("\\subsection{%s}" . "\\subsection*{%s}")
>> |   ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
>> `----

I think this letter class is wrong. Here is mine for beamer (note the
"\[" before the options to be substituted by the export process):

--8<---------------cut here---------------start------------->8---
(add-to-list 'org-latex-classes
             '("beamer"
               "\\documentclass[presentation]{beamer}
\[DEFAULT-PACKAGES]
\[PACKAGES]
\[EXTRA]"
               ("\\section{%s}" . "\\section*{%s}")
               ("\\subsection{%s}" . "\\subsection*{%s}")
               ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
--8<---------------cut here---------------end--------------->8---

> Looking at how org produces the pdf file it uses the "nonstopmode" in 
> the command line arguments to pdflatex. So when I used xelatex with this 
> option:
>
> xelatex -interaction=nonstopmode test.tex

This tell latex to continue compiling even if there are errors. I'm not
sure you want to rely on this.

Alan

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

* Re: Latex "Missing number, treated as zero."
  2013-12-02 13:14     ` Alan Schmitt
@ 2013-12-02 14:09       ` Sebastien Vauban
  2013-12-02 14:49         ` Alan Schmitt
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2013-12-02 14:09 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Alan Schmitt wrote:
> I think this letter class is wrong. Here is mine for beamer (note the
> "\[" before the options to be substituted by the export process):
>
> (add-to-list 'org-latex-classes
>              '("beamer"
>                "\\documentclass[presentation]{beamer}
> \[DEFAULT-PACKAGES]
> \[PACKAGES]
> \[EXTRA]"
>                ("\\section{%s}" . "\\section*{%s}")
>                ("\\subsection{%s}" . "\\subsection*{%s}")
>                ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

Note that you don't need to escape the `[' with `\': it's not a regexp simply
a string; hence, `[' does not need to be escaped.

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Latex "Missing number, treated as zero."
  2013-12-02 14:09       ` Sebastien Vauban
@ 2013-12-02 14:49         ` Alan Schmitt
  0 siblings, 0 replies; 6+ messages in thread
From: Alan Schmitt @ 2013-12-02 14:49 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

sva-news@mygooglest.com writes:

> Alan Schmitt wrote:
>> I think this letter class is wrong. Here is mine for beamer (note the
>> "\[" before the options to be substituted by the export process):
>>
>> (add-to-list 'org-latex-classes
>>              '("beamer"
>>                "\\documentclass[presentation]{beamer}
>> \[DEFAULT-PACKAGES]
>> \[PACKAGES]
>> \[EXTRA]"
>>                ("\\section{%s}" . "\\section*{%s}")
>>                ("\\subsection{%s}" . "\\subsection*{%s}")
>>                ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
>
> Note that you don't need to escape the `[' with `\': it's not a regexp simply
> a string; hence, `[' does not need to be escaped.

Ah, good to know, thanks for the information. I forgot were I copied
this snippet, but I see that the example at
http://orgmode.org/worg/exporters/beamer/ox-beamer.html also escapes
many things.

Alan

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

end of thread, other threads:[~2013-12-02 14:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-01 17:54 Latex "Missing number, treated as zero." Ian Barton
2013-12-01 20:23 ` Michael Strey
2013-12-02 11:35   ` Ian Barton
2013-12-02 13:14     ` Alan Schmitt
2013-12-02 14:09       ` Sebastien Vauban
2013-12-02 14:49         ` Alan Schmitt

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