当它是另一种编程语言时,在Markdown中添加代码块

时间:2018-12-12 19:53:05

标签: r markdown r-markdown

我有这个输入文件。我想将其作为代码块:

&control
calculation = 'scf',
 prefix = 'copper',
 pseudo_dir = '/home/ccevallos/pslibrary.1.0.0/pz/PSEUDOPOTENTIALS/',
 outdir = './tmp'
 wf_collect=.true.
/

&system
ibrav = 2,
celldm(1) = 6.678,
nat = 1,
ntyp = 1,
ecutwfc = 40,
ecutrho = 300, occupations = 'smearing', smearing = 'mp',
degauss = 0.01,
/

&electrons
/

ATOMIC_SPECIES
  Cu 63.546 Cu.pz-dn-rrkjus_psl.1.0.0.UPF

ATOMIC_POSITIONS alat
Cu 0.00 0.00 0.00

K_POINTS automatic
8 8 8 1 1 1

如果不可能(由于它不是真正的编程语言,那么应该将其输入程序),如何使它在html文件中看起来像这样? Python code chunk

1 个答案:

答案 0 :(得分:2)

@Axeman是正确的。这样就解决了:

```{bash, eval=FALSE}
[insert code here]
```