stack size limitations

stack size limitations

Post by Peter Prin » Wed, 03 Nov 1999 04:00:00



Hi,

I am using Latex2e and tried the following:

\newcommand{\xyz}{ \begin{itemize}\item #1 \end{itemize} %
 \addtocontents{toc}{#1} }

The problem is, that if the input string #1 is too large,
I get an error saying, taht the stack size is limited by
300K.

My Question: How can I increase the Tex Stack size ?
             I there another way to write the above command ?

Peter

--
____

Peter Prinz

Siemens AG Austria

 
 
 

stack size limitations

Post by Sebastian Perez-Duart » Wed, 03 Nov 1999 04:00:00


Peter Prinz wrote

Quote:>I am using Latex2e and tried the following:

>\newcommand{\xyz}{ \begin{itemize}\item #1 \end{itemize} %
> \addtocontents{toc}{#1} }

>The problem is, that if the input string #1 is too large,
>I get an error saying, taht the stack size is limited by
>300K.

Look at the definition of your command: defined as it is, it does not accept
an argument. My guess is that *this* is the problem, not the fact that your
string is too long.

Try defining your command:

\newcommand{\xyz}[1]{ \begin{itemize}\item #1 \end{itemize} %
   \addtocontents{toc}{#1} }

Cheers,

        Sebastian

Quote:>My Question: How can I increase the Tex Stack size ?
>             I there another way to write the above command ?


 
 
 

stack size limitations

Post by Peter Prin » Wed, 03 Nov 1999 04:00:00


There was a typo in the first Version of the posting:

Hi,

I am using Latex2e and tried the following:

\newcommand{\xyz}[1]{ \begin{itemize}\item #1 \end{itemize} %
 \addtocontents{toc}{#1} }

The problem is, that if the input string #1 is too large,
I get an error saying, taht the stack size is limited by
300K.

My Question: How can I increase the Tex Stack size ?
             I there another way to write the above command ?

Peter
__

Peter Prinz

Siemens AG Austria

 
 
 

stack size limitations

Post by David T. Ashle » Wed, 03 Nov 1999 04:00:00


Peter,

Your command looks reasonable to me.  There is no reason that you should
overflow the stack.

Something else is going on here.  Perhaps the command is expanding in a
way that neither of us understand (a subtle syntax thing, etc.).

But, in a logical sense, this *should* work.

I wish I had something useful to offer you.

Dave.


> Hi,

> I am using Latex2e and tried the following:

> \newcommand{\xyz}{ \begin{itemize}\item #1 \end{itemize} %
>  \addtocontents{toc}{#1} }

> The problem is, that if the input string #1 is too large,
> I get an error saying, taht the stack size is limited by
> 300K.

> My Question: How can I increase the Tex Stack size ?
>              I there another way to write the above command ?

> Peter

> --
> ____

> Peter Prinz

> Siemens AG Austria


 
 
 

stack size limitations

Post by Michael Downe » Wed, 03 Nov 1999 04:00:00



> I am using Latex2e and tried the following:

> \newcommand{\xyz}{ \begin{itemize}\item #1 \end{itemize} %
>  \addtocontents{toc}{#1} }

> The problem is, that if the input string #1 is too large,
> I get an error saying, taht the stack size is limited by
> 300K.

The problem is not really the size of #1, it is the fact that you failed
to use \protect in the argument of \addtocontents for all fragile
commands (e.g., \begin, \end, \item). See the*book.
 
 
 

stack size limitations

Post by Donald Arsene » Wed, 03 Nov 1999 04:00:00



>\newcommand{\xyz}{ \begin{itemize}\item #1 \end{itemize} %
> \addtocontents{toc}{#1} }

>The problem is, that if the input string #1 is too large,
>I get an error saying, taht the stack size is limited by
>300K.

I think your report of the problem has been garbled.

First, you must have used \newcommand{\xyz}[1], or else you get
an error in the definition.

300K is an awfully big stack size; are you sure the 300K wasn't
the buffer size?

Your argument #1 is probably not too long (and its length doesn't
tax the stack) but probably contains fragile commands without
\protect.  Put \protect in front of such commands.


 
 
 

1. Unnecessary page size limitations in LaTeX


: It's a shame there are so few paper size options in LaTeX's standard
: document classes, such as article. No, let me rephrase that: it's a
: shame that there's _any_ fixed number of paper sizes available in
: standard LaTeX document classes!

I agree with you. The fixed papersizes in LaTeX are a problem
and sometimes don't workk at all.
Ever tried a4paper.landscape?

But including more and more sizes into the classes wont help.

: After all, options like 'a4paper' simply get turned into \paperwidth
: and \paperheight settings, and the rest of the article class can
: process happily with those numbers alone. So, theoretically, if I have
: some non-standard paper size, I ought to be able to simply specify
: the size somehow, in an explicit fashion, to the document class, and
: it will work famously!

When you only change paperwidth and ..height you still use LaTeXs
way to calculate textwidth and ..height.

Since I did like neither I defined my own packages
din_a3, din_a4, din_a5, each with the options
Type1, Type2, Fullpage (a5 with additional Nomargin).

Thus I'm able to select the 3 main papersizes I use with 3
differrent layouts.
They are still in beta-test (reducing the number of tokens etc.)

I will upload them to CTAN soon (next month?).

BTW The Companion is a BOOK. Printed with a modified book.cls I guess.
Books schould (need) not be in ISO or US papersizes. There are
some formats that are better suited for boooks.

--
Axel Kielhorn

The blue wizard


2. "An error log is being generated..."

3. BibTex Size Limitations?

4. looking for Eurisko

5. How to Change the parameter Stack size

6. AI Books (Sale)

7. save stack size

8. spell check

9. stack size

10. EmTex--Increasing TeX compiler stack size

11. ! TeX capacity exceeded, sorry [parameter stack size=60].

12. Emtex: Tex capacity exceeded [input stack size = 1000]

13. Help: [parameter stack size=60]?