lout-users
[Top][All Lists]
Advanced

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

Re: various @CP things


From: Mark Summerfield
Subject: Re: various @CP things
Date: Tue, 17 Jun 2008 07:17:50 +0100
User-agent: KMail/1.9.9

On 2008-06-16, Jeff Kingston wrote:
> > What I meant was that if you set fixedtabout then it
> > affects not just the one leading tab, but (presumably)
> > any tabs in the source code?
>
> Correct.
>
> > D'you think you'll be including an option ... &- inserted
> > whenever there is a change of case inside a word.
>
> I wasn't planning to, as far as I can remember.  Has this been
> discussed before?

Yes.

Up to now I've used a preprocessor to include C++ code, but for my PyQt
book I switched to using @Python. Now I'm trying to get rid of the
preprocessor altogether (which is now possible thanks to @Pipe), but for
C++ many paragraphs require me to manually insert &-s. I did raise this
before and I think you said it could be done---it would certainly be a
help to me (although not so much for the current book which is on Python
3, but for the one that I do next year).

Two other natural breaking points come to mind (although personally I
would break them _without_ a hyphen, one is path separators, i.e.,
foo/bar should be treated as foo/&-bar (but with no hyphen inserted if
there's a break, and foo_bar which again should be treated as foo_&-bar
with no hypen---I don't believe that either of these would interfere
with normal English, or other languages because neither construct is
used in normal languages (except for and/or for which the rule I've
described works fine).

Naturally I think this should all be controlled by options so that
people can choose whether to have them, e.g.

    hyphenateatcasechanges{yes}
    splitatunderlines{yes}
    splitatslashes{yes}

> > in @CP{QWidget * /* widget */} ... the 2nd and 3rd *'s are VShifted up
>
> Actually the first one is shifted down.  See lout/include/cprintf:
>
>   def @PA          # for formatting asterisks
>   {
>       @PO @BackEnd @Case {
>         PlainText @Yield "*"
>         else @Yield { "0.5w" @VShift "*" }
>       }
>   }
>
> The @PA symbol is what is printed when there is a * token.
> At present there is no option to change it.
>
> > Does @CP respect unbreakablefirst and unbreakablelast
> > if they're set globally?
>
> It should do.

Well it doesn't! (Well, I haven't seen any widows, but quite a few
orphans.)

> Let me know if you strike a problem with it.

I just wish it could be controlled. I would like to switch the behavior
off since when I print code "verbatim" I really mean that. (I don't use
@CP to do bold/italic/etc; but purely to get verbatim code that will
correctly break across page boundaries.)

Thanks!

-- 
Mark Summerfield, Qtrac Ltd., www.qtrac.eu



reply via email to

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