TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm interested in looking at (and maybe modifying) the code in MetaFont/MetaPost.

To generate their C code, I applied ctangle to mp.w, and got an error message saying "token capacity exceeded". Running ctangle on smaller files works OK, so I think the problem is just that mp.w is too big.

Are there any pre-built versions of ctangle with larger capacity ?

If I have to build one myself, which parameters should I adjust ? I see these:

max_bytes 1000000   /* number of bytes in identifiers, index entries, & section names
max_toks 1000000    /* number of bytes in compressed \CEE/ code */
max_names 10239     /* number of identifiers, strings, section names;
max_texts 10239     /* number of replacement texts, must be less than 10240 */
hash_size 8501      /* should be prime; used in |"common.w"| */
longest_name 10000  /* section names shouldn't be longer than this */
stack_size 50       /* number of simultaneous levels of macro expansion */
buf_size 1000       /* for \.{CWEAVE} and \.{CTANGLE} */
share|improve this question

closed as too localized by Stephan Lehmke, Kurt, egreg, Guido, Werner Dec 2 '12 at 6:30

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I can't figure out how to answer my own question, but I discovered that the ctangle in the MikTex distribution has the capacity needed to handle mp.w. – bubba Oct 31 '12 at 0:57