[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hyphenation of programming language identifiers
From: |
Mark Summerfield |
Subject: |
Re: hyphenation of programming language identifiers |
Date: |
Mon, 18 Aug 2008 11:44:29 +0100 |
User-agent: |
KMail/1.9.9 |
On 2008-08-18, Ludovic Courtès wrote:
> Hi,
>
> address@hidden (Jeff Kingston) writes:
> > Are there problems with allowing hyphenation of programming
> > language identifiers at all? What if the *default* behaviour
> > is altered to allow hyphenation, with an option to turn it off?
>
> It may be the case that some documents rely on the fact that programs
> are not hyphenated and get automatically scaled down if they don't fit
> on the page (although this could arguably be considered bad practice, as
> the document may end up containing code fragments that all have a
> different scale factor).
>
> Besides, some languages, like Python, are indentation-sensitive. Thus,
> a hyphenated Python program is not valid Python code (which may be OK if
> the reader is warned about hyphenation).
The context of use I want it for is for identifiers mentioned in the
running text---not for quoting code snippets which would of course be
invalid!
For example, given:
macro @address@hidden
I'd like:
The @C{FooBar} class has a @C{fooBar()} method and a @C{foo_baz}
variable.
to be treated as if it were written:
The @C{Foo&-Bar} class has a @C{foo&-Bar()} method and a @C{foo_&-baz}
variable.
which I'd get by using something like:
macro @C{Programming @Language @F}
given Jeff's earlier email.
This makes a huge difference if you have text describing programs and
programming where identifier names are referred to a lot.
--
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and consultancy
"C++ GUI Programming with Qt 4" - ISBN 0132354160