Smarter sentence case - how?

Maybe this looks familiar to some of you:

The describe what's on scenery supporters in room descriptions rule is not listed in any rulebook.

For printing a locale paragraph about a thing (called the item) (this is the new describe what's on scenery supporters in room descriptions rule):
	If the item is [not undescribed and the item is] scenery and the item does not enclose the player:
		If a locale-supportable thing is on the item:
			Set pronouns from the item;
			Repeat with possibility running through things on the item:
				Now the possibility is marked for listing;
				If the possibility is mentioned:
					Now the possibility is not marked for listing;
			Increase the locale paragraph count by 1;
			List the contents of the item, as a sentence, including contents, [giving brief inventory information,] tersely, not listing concealed items, [prefacing with is/are,] listing marked items only;
			Say " is lying on [an item] here.[paragraph break]";
	Continue the activity.

There’s just one problem: The list begins with a lower-case letter.
You could probably solve this with writing it in sentence case, but that would write The New York Times as “the new york times”. …so how do you do this?
I’m right now having about ten things on my mind at once, so I really can’t handle having to explore that “indexed text” is all about, and trying to apply it here.

You could use indexed text…

Oh.

The other answer is to rearrange the sentence. Start it with “You see…” or “Lying on …” rather than trying to start with the list.

I have to admit that this is what us Inform experts usually do.

I was hoping you’d show me some kind of formulation for how to use indexed text in a way that would print the first letter as a capital. I’m fine with using indexed text, but figuring out how would take me hours that I don’t have.

Wait, there’s a describe what’s on scenery supporters rule? I’ve had problems in the past with things on scenery supporters not being shown in the room description.

More on-topic, I’d go with Zarf’s solution. To me the sentence ‘Lying on the X is a Y.’ feels better anyway.

Well, you could do this:

say "[A list of things on the item] [if there is more than 1 thing on the item]are[else]is[end if] lying on [an item] here.";

See also [url]https://intfiction.org/t/capitalizing-a-substitution/5326/1].

Oh, right, there’s “[A list of things on the item]”. (Also “[The list of things on the item]”) I’m sorry – I should have remembered about that.

That isn’t as flexible as the “list the contents…” phrase you’re using. On the other hand, it lets you do the first-article-capitalized trick. It looks like the “list the contents…” phrase is capable of performing that trick, but there’s no I7 way to trigger it. I’m willing to file that as a bug.

As zarf says, the I6 routines called by the List The Contents Of phrase support printing the first article of the list with a capital letter, and you can easily add an I7 option to access it like this:

To list the contents of (O - an object),
with newlines,
indented,
giving inventory information,
as a sentence,
including contents,
including all contents,
tersely,
giving brief inventory information,
using the definite article,
listing marked items only,
prefacing with is/are,
not listing concealed items,
suppressing all articles,
with extra indentation,
and/or capitalised          [this is were we add the last phrase option that the I6 routine supports]
(documented at ph_listcontents):
(- WriteListFrom(child({O}), {phrase options}); -).

Now this code gives the desired result:

The Place is a room.

To List the contents of (O - an object),
with newlines,
indented,
giving inventory information,
as a sentence,
including contents,
including all contents,
tersely,
giving brief inventory information,
using the definite article,
listing marked items only,
prefacing with is/are,
not listing concealed items,
suppressing all articles,
with extra indentation,
and/or capitalised
(documented at ph_listcontents):
(- WriteListFrom(child({O}), {phrase options}); -).

The describe what's on scenery supporters in room descriptions rule is not listed in any rulebook.

For printing a locale paragraph about a thing (called the item) (this is the new describe what's on scenery supporters in room descriptions rule):
	If the item is [not undescribed and the item is] scenery and the item does not enclose the player:
		If a locale-supportable thing is on the item:
			Set pronouns from the item;
			Repeat with possibility running through things on the item:
				Now the possibility is marked for listing;
				If the possibility is mentioned:
					Now the possibility is not marked for listing;
			Increase the locale paragraph count by 1;
			list the contents of the item, as a sentence, including contents, [giving brief inventory information,] tersely, not listing concealed items, [prefacing with is/are,] listing marked items only, capitalised;
			Say " [if the number of things on the item is one]is[otherwise]are[end if] lying on [an item] here.[paragraph break]";
	Continue the activity.

A table is scenery in place.

A red herring is on the table.
A pink salmon is on the table.
A thing called The New York Times is on the table. 

Though now you get another problem: the contents of non-empty containers in the list will also be listed with a capitalized article. Suppose you add this to the code:An article on trout fishing in America is in The New York Times. Then the result will be this:

(Perhaps that is why the I7 option isn’t there in the first place.)