Show More
@@ -122,12 +122,13 def single_ansi2latex(code): | |||
|
122 | 122 | color_code = style_code.split(';')[1] |
|
123 | 123 | is_normal = style_code.split(';')[0] == '0' |
|
124 | 124 | |
|
125 |
# regular |
|
|
125 | # regular weight | |
|
126 | 126 | if (code == style_code) or (is_normal and code == color_code): |
|
127 | return '\\'+color[0].lower()+'{', 1 | |
|
128 | # bold fonts | |
|
127 | ||
|
128 | return r'{\color{'+color[0].lower()+'}', 1 | |
|
129 | # bold | |
|
129 | 130 | if code == style_code[:3]+str(1)+style_code[3:]: |
|
130 |
return '\ |
|
|
131 | return r'\textbf{\color{'+color[0].lower()+'}', 1 | |
|
131 | 132 | return '', 0 |
|
132 | 133 | |
|
133 | 134 | def ansi2latex(text): |
General Comments 0
You need to be logged in to leave comments.
Login now