Offray Vladimir Luna Cárdenas 2017-01-08 13:15:48 +00:00
parent e36bcff4c3
commit 7f3450184d
1 changed files with 3 additions and 2 deletions

View File

@ -303,11 +303,12 @@ GrafoscopioNode >> demote [
{ #category : #exporting }
GrafoscopioNode >> exportCodeBlockTo: aStream [
"I convert the content of a node taged as 'código' (code) as pandoc markdown and put it Into aStream.
"I convert the content of a node taged as 'código' (code) as pandoc markdown and put it
into aStream.
The code block is decorated with LaTeX commands for proper syntax highlighting using pygments.
Pdf exportation requires the installation of pygments and minted package for latex"
aStream nextPutAll: ('\begin{minted}{smalltalk}'); lf.
aStream nextPutAll: (self body contents withInternetLineEndings); lf.
aStream nextPutAll: (self body contents asString withInternetLineEndings); lf.
aStream nextPutAll: '\end{minted}';lf;lf.
^aStream contents
]