Show More
@@ -33,7 +33,7 b'' | |||||
33 | % Name: draw_prompt |
|
33 | % Name: draw_prompt | |
34 | % Purpose: Renders an output/input prompt |
|
34 | % Purpose: Renders an output/input prompt | |
35 | ((* macro add_prompt(text, cell, prompt) -*)) |
|
35 | ((* macro add_prompt(text, cell, prompt) -*)) | |
36 | ((*- set prompt_number = "" ~ cell.prompt_number -*)) |
|
36 | ((*- set prompt_number = "" ~ (cell.prompt_number | replace(None, " ")) -*)) | |
37 | ((*- set indentation = " " * (prompt_number | length + 7) -*)) |
|
37 | ((*- set indentation = " " * (prompt_number | length + 7) -*)) | |
38 | \begin{verbatim} |
|
38 | \begin{verbatim} | |
39 | (((- text | add_prompts(first=prompt ~ '[' ~ prompt_number ~ ']: ', cont=indentation) -))) |
|
39 | (((- text | add_prompts(first=prompt ~ '[' ~ prompt_number ~ ']: ', cont=indentation) -))) |
@@ -46,7 +46,7 b'' | |||||
46 | % Name: draw_prompt |
|
46 | % Name: draw_prompt | |
47 | % Purpose: Renders an output/input prompt |
|
47 | % Purpose: Renders an output/input prompt | |
48 | ((* macro add_prompt(text, cell, prompt, prompt_color) -*)) |
|
48 | ((* macro add_prompt(text, cell, prompt, prompt_color) -*)) | |
49 | ((*- set prompt_number = "" ~ cell.prompt_number -*)) |
|
49 | ((*- set prompt_number = "" ~ (cell.prompt_number | replace(None, " ")) -*)) | |
50 | ((*- set indention = " " * (prompt_number | length + 7) -*)) |
|
50 | ((*- set indention = " " * (prompt_number | length + 7) -*)) | |
51 | \begin{Verbatim}[commandchars=\\\{\}] |
|
51 | \begin{Verbatim}[commandchars=\\\{\}] | |
52 | ((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ prompt_number ~ '}]:} ', cont=indention) ))) |
|
52 | ((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ prompt_number ~ '}]:} ', cont=indention) ))) |
General Comments 0
You need to be logged in to leave comments.
Login now