Skip site navigation (1) Skip section navigation (2)

Re: PDF build issue with 9.0 Alpha5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Devrim GÜNDÜZ <devrim(at)gunduz(dot)org>
Cc: pgsql-docs <pgsql-docs(at)postgresql(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: PDF build issue with 9.0 Alpha5
Date: 2010-04-03 19:53:08
Message-ID: 23456.1270324388@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-docs
Devrim =?ISO-8859-1?Q?G=DCND=DCZ?= <devrim(at)gunduz(dot)org> writes:
> I was trying to build PDF docs for 9.0 Alpha5, and I got this message:
> ! TeX capacity exceeded, sorry [number of strings=245830].

I've found a possible solution for this.  The bulk of the strings are
being created by jadetex.dtx: it makes two control sequences for each
flow object in the document.  One of these is a page number and the
other seems to have no purpose except to prevent creating duplicate
hyperref anchors.  However, diking out the latter doesn't create any
obvious ill effects --- either we have no occurrences in our docs of a
pattern that would result in a duplicate, or there isn't any real
adverse consequence of having a dup.  (And in any case it's hard to
envision an adverse consequence that's worse than complete failure to
build the document.)

There turns out to be a very easy way to inject the code change, which
is to create a file "jadetex.cfg" in the doc/src/sgml directory,
containing the modified version of the relevant TeX macro.
(Note: in the vpath case we'd probably need to link it into the build
directory; I haven't experimented with that.)  Put this in the file:

\def\FlowObjectSetup#1{%
\ifDoFOBSet
  \ifLabelElements
     \ifx\Label\(at)empty\let\Label\Element\fi
  \fi
  \ifx\Label\(at)empty\else
       \bgroup
         \ifNestedLink
         \else
           \hyper(at)anchorstart{\Label}\hyper@anchorend
           \PageLabel{\Label}%
         \fi
       \egroup
       \let\Label\(at)empty
       \let\Element\(at)empty
  \fi
\fi
}

For comparison, the original definition we're replacing is

\def\FlowObjectSetup#1{%
\ifDoFOBSet
  \ifLabelElements
     \ifx\Label\(at)empty\let\Label\Element\fi
  \fi
  \ifx\Label\(at)empty\else
      \expandafter\ifx\csname x(at)\Label\endcsname\@madelink
      \else
       \bgroup
         \ifNestedLink
         \else
           \hyper(at)anchorstart{\Label}\hyper@anchorend
           \PageLabel{\Label}%
           \expandafter\gdef\csname x(at)\Label\endcsname{ }%
         \fi
       \egroup
       \let\Label\(at)empty
       \let\Element\(at)empty
      \fi
  \fi
\fi
}

This should work with either jadetex 3.12 or 3.13, and probably older
versions but I don't have source code handy to look at.  3.12 dates
back to 2002 so it's probably old enough anyhow.

I haven't tried to build anything except PDF output with this
substituted code, so it's possible that it interferes with other
output formats.

Comments?

			regards, tom lane

In response to

Responses

pgsql-docs by date

Next:From: Виктор ВислобоковDate: 2010-04-04 13:01:28
Subject: Undocumented trick in SELECT?
Previous:From: Tom LaneDate: 2010-04-03 15:34:43
Subject: Re: PDF build issue with 9.0 Alpha5

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group