A block of text designated as code, to be displayed with the original spacing/line-breaks retained.
User Stories
Author
As an author, I want to be able to add a code-block to my article so that I can include pseudo-code or code-snippets to illustrate my text.
As an author, I want to be able to distinguish my code-blocks from the normal text so that I can tell how they will display in the published article.
As an author, I want to be able to edit the contents of a code-block so that I can correct errors.
Production staff
But what if . . . ?
Considerations
Code blocks are intended to capture code extracts for illustration purposes. Given that formatting is important for the comprehension of code, these blocks need to capture specific spacing and indentation.
Within a code-block, a new line should not create a new code-block or paragraph but simply a line-break to be preserved within the block. Spacing should also be captured so that code can be displayed as it is meant to be read.
We would expect the content captured in code blocks to display with monospace formatting in texture.
XML requirements
The preformat element is used. All content within it will be treated as text.
<preformat>for i in `ls | grep. fastq`; do
echo ${i}
module load java
java -jar ~/tools/Trimmomatic-0.36/trimmomatic-0.36.jar SE -phred33 ${i}
${j}.trimmed.fq.gz ILLUMINACLIP:~/tools/Trimmomatic-0.36/adapters/TruSeq3-SE.fa:2:30:10
HEADCROP:12 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36
done</preformat>
Mock ups
This is not required, but if you have mock ups of what you would like to see please provide them here.
Proposal
This will be added by the Texture team after the feature request is discussed and agreed.
Description
A block of text designated as code, to be displayed with the original spacing/line-breaks retained.
User Stories
Author
Production staff
But what if . . . ?
Considerations
XML requirements
The
preformat
element is used. All content within it will be treated as text.Mock ups
This is not required, but if you have mock ups of what you would like to see please provide them here.
Proposal
This will be added by the Texture team after the feature request is discussed and agreed.