lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lecture number


From: Valeriy E. Ushakov
Subject: Re: Lecture number
Date: Mon, 26 Feb 2001 17:38:46 +0300
User-agent: Mutt/1.3.3i

On Sun, Feb 25, 2001 at 15:28:44 +0800, Isaac Kar-Keung To wrote:

> Instead of "Lecture 10", the generated PS file contains "Lecture ???".
> Interestingly, if the start number is 9 and we have 2 lectures, the second
> one shows "Lecture 10" successfully.  What happened, and is there any fix?

Actually the same problem can be observed with @FirstSectionNumber in
reports and so on.


> the mere fact that it can happen amuse me already: lout normally do
> not treat words as composed of individual characters, so it is
> strange that something that work for single digit numbers fails
> horribly with two-digit numbers.

Right on the spot.  The problem is that digits are not word
constituents!  See Expert's Guide, section 2.1 "Lexical Structure":

    The ten digits are not letters and may not appear in identifiers;


Try something like 

    def @Foo {
      def "1" { i }     # note that you need quotes around "1"
      911               # exactly because it's not a word
    }

The def "1" is better hidden as a nested def, as global side-effects
might be disastrous (e.g LtLatin1.LCM is not a "simple" word anymore,
so Lout dies with "fatal error: illegal mapping file name (quotes
needed?)").

Note that the next lecture (11'th) will be numbered ok.  And if you
quote the parameter, i.e.

    @FirstLectureNumber { "10" }

Lout will be put on the right track and the 10'th lecture will be
numbered ok as well.

Try -ddcr and check trace for CrossAddTag for @LectureList.  Compare
for first lecture number set to 9, "10", and 10 (unquoted).  Also find
lout.li entries for @LectureList and look them up in the .ld file and
compare for all these three cases.


The problem seems to be that for (unquoted) 10 Lout is too lazy (in
the functional programming sense) and so when it comes to writing the
number to the xref database it is still "too complex" an object and so
only "???" placeholder is written to *.ld file.

@Next is eager and so it will evaluate unquoted 10 and do the right
thing and lecture 11 and so on will be fine.

Hope this helps.



> It seems that nobody have taken care of my post...

Unfortunately "somebody" in practice means either Jeff or me and Jeff
is usually quite busy.  I experience a local maximum of workload as
well and on top of that CPU fan on my home PC died and left me without
net access for the weekend.  (Damn, I should really switch back to my
old trused uVAX or SS1 - that decade old iron is *rock* stable,
especially the VAX :-).

Well, I thought that Jeff would answer it, I guess Jeff thought that I
would do it, and everyone else thought that either Jeff or me would do
it.  So I'd like to encourage people to try to answer others
questions.  We definitely need more just-another-lout-hacker-s.  Every
third message posted to the list is mine and that's way too much, it
makes me feel like a spammer ;-).

Eric Marsden has done a great job on FAQ, but (judging from cmucl-imp
traffic :-) he's busy with another project.  It would be nice if
someone can step up and continue the work on FAQ and, perhaps, code
snippets library (like picture flowing) and so on (I don't really like
linux-style HOWTOs, I'd prefer tutorials/essays with extensive xrefs
to real documentation, as docs bundled with Lout are really superb).
Mail me privately if you're interested.

SY, Uwe
-- 
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen


reply via email to

[Prev in Thread] Current Thread [Next in Thread]