Hi Georg,
I found the piece of code below in support/filename.C. I think there is
something wrong with the logic. If dir.size() already exceeds 160 character
then LyX will not truncate the filename at all! I guess this is the case in
my case.
Michael
// Experiments show that MiKTeX's YAP (version 2.4.1803)
// will crash if the string referencing the file name in
// the .dvi file is longer than 220 characters.
// This string contains about 50 chars-worth of other data,
// leaving us, say, 160 characters for the file name itself.
// (Erring on the side of caution.)
string::size_type max_length = 160;
if (dir.size() - 1 < max_length) {
// If dir.size() > max_length, all bets are off anyway.
// "+ 1" for the directory separator.
max_length -= dir.size() + 1;
// If the mangled file name is too long, hack it to fit.
// We know we're guaranteed to have a unique file name
because
// of the counter.
if (mname.size() > max_length) {
int const half = (int(max_length) / 2) - 2;
if (half > 0) {
mname = mname.substr(0, half) + "___" +
mname.substr(mname.size() - half);
}
}
}
----- Original Message -----
From: "Georg Baum" <[EMAIL PROTECTED]>
To: <lyx-devel@lists.lyx.org>
Sent: Tuesday, March 14, 2006 8:06 PM
Subject: Re: LyX 1.4.0 does not truncate long file names
Am Dienstag, 14. März 2006 18:42 schrieb Michael Gerz:
the critical length is about 200 characters. However, to me it makes no
sense to have file name of this length. Maybe 100 (or 160) chars is a
more
reasonable limitation.
But LyX is supposed to truncate to 160 chars already. Can you please find
out whether this is working (and pdflatex requires even shorter
filenames), or whether the truncation is not working?
Georg