MarkupUK / paperFramework

A framework with schema, schematron and other support for editing of Markup UK papers
Apache License 2.0
1 stars 1 forks source link

Outlaw `computeroutput` in favour of `programlisting` #45

Open AndrewSales opened 1 year ago

AndrewSales commented 1 year ago

Because we get the benefits of line wrapping and background shading.

tgraham-antenna commented 1 year ago

An alternative would be to apply the line wrapping, background shading, and presumably syntax highlighting to computeroutput as well.

There is hopefully a semantic difference when a user uses computeroutput instead of programlisting.

A secondary activity might be to add something to the template document to explain which element to use.

AndrewSales commented 1 year ago

An alternative would be to apply the line wrapping, background shading, and presumably syntax highlighting to computeroutput as well.

I did consider that.

There is hopefully a semantic difference when a user uses computeroutput instead of programlisting.

You would hope - although if it is meaningful enough to need conveying presentationally, we might also want its appearance to be distinct from that programlisting.

A secondary activity might be to add something to the template document to explain which element to use.

Yes: the paper that prompted this issue looked to make no distinction between computeroutput and programlisting, and indeed the element structure used seemed to be an artefact of an automated conversion - in particular, computeroutput was wrapped in literallayout throughout, and from what I could see there were some cases where a semantic distinction could have been made, but that requires author knowledge and judgement that we may not reasonably have time to check. An option in future may be to provide them with proofs; but again, time is not typically on our side and an important driver for the framework was to place more of the responsibility for this with the author.

So I opted for this approach on those pragmatic grounds.