substance / texture

A visual editor for research.
MIT License
1k stars 83 forks source link

Code blocks #1324

Open fred-atherden opened 5 years ago

fred-atherden commented 5 years ago

Description

A block of text designated as code, to be displayed with the original spacing/line-breaks retained.

User Stories

Author

  1. 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.
  2. 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.
  3. 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

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.