Show More
@@ -33,7 +33,11 b'' | |||
|
33 | 33 | % Name: draw_prompt |
|
34 | 34 | % Purpose: Renders an output/input prompt |
|
35 | 35 | ((* macro add_prompt(text, cell, prompt) -*)) |
|
36 | ((*- if cell.prompt_number is defined -*)) | |
|
36 | 37 | ((*- set prompt_number = "" ~ (cell.prompt_number | replace(None, " ")) -*)) |
|
38 | ((*- else -*)) | |
|
39 | ((*- set prompt_number = " " -*)) | |
|
40 | ((*- endif -*)) | |
|
37 | 41 | ((*- set indentation = " " * (prompt_number | length + 7) -*)) |
|
38 | 42 | \begin{verbatim} |
|
39 | 43 | (((- text | add_prompts(first=prompt ~ '[' ~ prompt_number ~ ']: ', cont=indentation) -))) |
@@ -46,7 +46,11 b'' | |||
|
46 | 46 | % Name: draw_prompt |
|
47 | 47 | % Purpose: Renders an output/input prompt |
|
48 | 48 | ((* macro add_prompt(text, cell, prompt, prompt_color) -*)) |
|
49 | ((*- if cell.prompt_number is defined -*)) | |
|
49 | 50 | ((*- set prompt_number = "" ~ (cell.prompt_number | replace(None, " ")) -*)) |
|
51 | ((*- else -*)) | |
|
52 | ((*- set prompt_number = " " -*)) | |
|
53 | ((*- endif -*)) | |
|
50 | 54 | ((*- set indention = " " * (prompt_number | length + 7) -*)) |
|
51 | 55 | \begin{Verbatim}[commandchars=\\\{\}] |
|
52 | 56 | ((( 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