Show More
@@ -532,33 +532,21 b' class ConverterRST(Converter):' | |||||
532 | def _unknown_lines(self, data): |
|
532 | def _unknown_lines(self, data): | |
533 | return rst_directive('.. warning:: Unknown cell') + [data] |
|
533 | return rst_directive('.. warning:: Unknown cell') + [data] | |
534 |
|
534 | |||
|
535 | @DocInherit | |||
535 | def render_display_format_html(self, output): |
|
536 | def render_display_format_html(self, output): | |
536 | """render the html part of an output |
|
|||
537 |
|
||||
538 | Returns list. |
|
|||
539 | """ |
|
|||
540 | return rst_directive('.. raw:: html', output.html) |
|
537 | return rst_directive('.. raw:: html', output.html) | |
541 |
|
538 | |||
|
539 | @DocInherit | |||
542 | def render_display_format_latex(self, output): |
|
540 | def render_display_format_latex(self, output): | |
543 | """render the latex part of an output |
|
|||
544 |
|
||||
545 | Returns list. |
|
|||
546 | """ |
|
|||
547 | return rst_directive('.. math::', output.latex) |
|
541 | return rst_directive('.. math::', output.latex) | |
548 |
|
542 | |||
|
543 | @DocInherit | |||
549 | def render_display_format_json(self, output): |
|
544 | def render_display_format_json(self, output): | |
550 | """render the json part of an output |
|
|||
551 |
|
||||
552 | Returns list. |
|
|||
553 | """ |
|
|||
554 | return rst_directive('.. raw:: json', output.json) |
|
545 | return rst_directive('.. raw:: json', output.json) | |
555 |
|
546 | |||
556 |
|
547 | |||
|
548 | @DocInherit | |||
557 | def render_display_format_javascript(self, output): |
|
549 | def render_display_format_javascript(self, output): | |
558 | """render the javascript part of an output |
|
|||
559 |
|
||||
560 | Returns list. |
|
|||
561 | """ |
|
|||
562 | return rst_directive('.. raw:: javascript', output.javascript) |
|
550 | return rst_directive('.. raw:: javascript', output.javascript) | |
563 |
|
551 | |||
564 |
|
552 | |||
@@ -663,33 +651,20 b' class ConverterMarkdown(Converter):' | |||||
663 | def _unknown_lines(self, data): |
|
651 | def _unknown_lines(self, data): | |
664 | return ['Warning: Unknown cell', data] |
|
652 | return ['Warning: Unknown cell', data] | |
665 |
|
653 | |||
|
654 | @DocInherit | |||
666 | def render_display_format_html(self, output): |
|
655 | def render_display_format_html(self, output): | |
667 | """render the html part of an output |
|
|||
668 |
|
||||
669 | Returns list. |
|
|||
670 | """ |
|
|||
671 | return [output.html] |
|
656 | return [output.html] | |
672 |
|
657 | |||
|
658 | @DocInherit | |||
673 | def render_display_format_latex(self, output): |
|
659 | def render_display_format_latex(self, output): | |
674 | """render the latex part of an output |
|
|||
675 |
|
||||
676 | Returns list. |
|
|||
677 | """ |
|
|||
678 | return ['LaTeX::', indent(output.latex)] |
|
660 | return ['LaTeX::', indent(output.latex)] | |
679 |
|
661 | |||
|
662 | @DocInherit | |||
680 | def render_display_format_json(self, output): |
|
663 | def render_display_format_json(self, output): | |
681 | """render the json part of an output |
|
|||
682 |
|
||||
683 | Returns list. |
|
|||
684 | """ |
|
|||
685 | return ['JSON:', indent(output.json)] |
|
664 | return ['JSON:', indent(output.json)] | |
686 |
|
665 | |||
687 |
|
666 | @DocInherit | ||
688 | def render_display_format_javascript(self, output): |
|
667 | def render_display_format_javascript(self, output): | |
689 | """render the javascript part of an output |
|
|||
690 |
|
||||
691 | Returns list. |
|
|||
692 | """ |
|
|||
693 | return ['JavaScript:', indent(output.javascript)] |
|
668 | return ['JavaScript:', indent(output.javascript)] | |
694 |
|
669 | |||
695 |
|
670 | |||
@@ -888,62 +863,38 b' class ConverterHTML(Converter):' | |||||
888 | return ['<h2>Warning:: Unknown cell</h2>'] + self.in_tag('pre', data) |
|
863 | return ['<h2>Warning:: Unknown cell</h2>'] + self.in_tag('pre', data) | |
889 |
|
864 | |||
890 |
|
865 | |||
|
866 | @DocInherit | |||
891 | def render_display_format_png(self, output): |
|
867 | def render_display_format_png(self, output): | |
892 | """render the png part of an output |
|
|||
893 |
|
||||
894 | Returns list. |
|
|||
895 | """ |
|
|||
896 | return ['<img src="data:image/png;base64,%s"></img>' % output.png] |
|
868 | return ['<img src="data:image/png;base64,%s"></img>' % output.png] | |
897 |
|
869 | |||
|
870 | @DocInherit | |||
898 | def render_display_format_svg(self, output): |
|
871 | def render_display_format_svg(self, output): | |
899 | """render the svg part of an output |
|
|||
900 |
|
||||
901 | Returns list. |
|
|||
902 | """ |
|
|||
903 | return [output.svg] |
|
872 | return [output.svg] | |
904 |
|
873 | |||
|
874 | @DocInherit | |||
905 | def render_display_format_jpeg(self, output): |
|
875 | def render_display_format_jpeg(self, output): | |
906 | """render the jpeg part of an output |
|
|||
907 |
|
||||
908 | Returns list. |
|
|||
909 | """ |
|
|||
910 | return ['<img src="data:image/jpeg;base64,%s"></img>' % output.jpeg] |
|
876 | return ['<img src="data:image/jpeg;base64,%s"></img>' % output.jpeg] | |
911 |
|
877 | |||
|
878 | @DocInherit | |||
912 | def render_display_format_text(self, output): |
|
879 | def render_display_format_text(self, output): | |
913 | """render the text part of an output |
|
|||
914 |
|
||||
915 | Returns list. |
|
|||
916 | """ |
|
|||
917 | return self._ansi_colored(output.text) |
|
880 | return self._ansi_colored(output.text) | |
918 |
|
881 | |||
|
882 | @DocInherit | |||
919 | def render_display_format_html(self, output): |
|
883 | def render_display_format_html(self, output): | |
920 | """render the html part of an output |
|
|||
921 |
|
||||
922 | Returns list. |
|
|||
923 | """ |
|
|||
924 | return [output.html] |
|
884 | return [output.html] | |
925 |
|
885 | |||
|
886 | @DocInherit | |||
926 | def render_display_format_latex(self, output): |
|
887 | def render_display_format_latex(self, output): | |
927 | """render the latex part of an output |
|
|||
928 |
|
||||
929 | Returns list. |
|
|||
930 | """ |
|
|||
931 | return [output.latex] |
|
888 | return [output.latex] | |
932 |
|
889 | |||
|
890 | @DocInherit | |||
933 | def render_display_format_json(self, output): |
|
891 | def render_display_format_json(self, output): | |
934 | """render the json part of an output |
|
|||
935 |
|
||||
936 | Returns []. |
|
|||
937 | """ |
|
|||
938 | # html ignores json |
|
892 | # html ignores json | |
939 | return [] |
|
893 | return [] | |
940 |
|
894 | |||
941 |
|
895 | |||
|
896 | @DocInherit | |||
942 | def render_display_format_javascript(self, output): |
|
897 | def render_display_format_javascript(self, output): | |
943 | """render the javascript part of an output |
|
|||
944 |
|
||||
945 | Returns list. |
|
|||
946 | """ |
|
|||
947 | return [output.javascript] |
|
898 | return [output.javascript] | |
948 |
|
899 | |||
949 |
|
900 | |||
@@ -1120,36 +1071,24 b' class ConverterLaTeX(Converter):' | |||||
1120 |
|
1071 | |||
1121 | return lines |
|
1072 | return lines | |
1122 |
|
1073 | |||
|
1074 | @DocInherit | |||
1123 | def render_display_format_html(self, output): |
|
1075 | def render_display_format_html(self, output): | |
1124 | """render the html part of an output |
|
|||
1125 |
|
||||
1126 | Returns []. |
|
|||
1127 | """ |
|
|||
1128 | return [] |
|
1076 | return [] | |
1129 |
|
1077 | |||
|
1078 | @DocInherit | |||
1130 | def render_display_format_latex(self, output): |
|
1079 | def render_display_format_latex(self, output): | |
1131 | """render the latex part of an output |
|
|||
1132 |
|
||||
1133 | Returns list. |
|
|||
1134 | """ |
|
|||
1135 | if type(output.latex) == type([]): |
|
1080 | if type(output.latex) == type([]): | |
1136 | return output.latex |
|
1081 | return output.latex | |
1137 | return [output.latex] |
|
1082 | return [output.latex] | |
1138 |
|
1083 | |||
|
1084 | @DocInherit | |||
1139 | def render_display_format_json(self, output): |
|
1085 | def render_display_format_json(self, output): | |
1140 | """render the json part of an output |
|
|||
1141 |
|
||||
1142 | Returns []. |
|
|||
1143 | """ |
|
|||
1144 | # latex ignores json |
|
1086 | # latex ignores json | |
1145 | return [] |
|
1087 | return [] | |
1146 |
|
1088 | |||
1147 |
|
1089 | |||
|
1090 | @DocInherit | |||
1148 | def render_display_format_javascript(self, output): |
|
1091 | def render_display_format_javascript(self, output): | |
1149 | """render the javascript part of an output |
|
|||
1150 |
|
||||
1151 | Returns []. |
|
|||
1152 | """ |
|
|||
1153 | # latex ignores javascript |
|
1092 | # latex ignores javascript | |
1154 | return [] |
|
1093 | return [] | |
1155 |
|
1094 | |||
@@ -1225,33 +1164,21 b' class ConverterNotebook(Converter):' | |||||
1225 | def render_display_format_text(self, output): |
|
1164 | def render_display_format_text(self, output): | |
1226 | return [output.text] |
|
1165 | return [output.text] | |
1227 |
|
1166 | |||
|
1167 | @DocInherit | |||
1228 | def render_display_format_html(self, output): |
|
1168 | def render_display_format_html(self, output): | |
1229 | """render the html part of an output |
|
|||
1230 |
|
||||
1231 | Returns []. |
|
|||
1232 | """ |
|
|||
1233 | return [output.html] |
|
1169 | return [output.html] | |
1234 |
|
1170 | |||
|
1171 | @DocInherit | |||
1235 | def render_display_format_latex(self, output): |
|
1172 | def render_display_format_latex(self, output): | |
1236 | """render the latex part of an output |
|
|||
1237 |
|
||||
1238 | Returns list. |
|
|||
1239 | """ |
|
|||
1240 | return [output.latex] |
|
1173 | return [output.latex] | |
1241 |
|
1174 | |||
|
1175 | @DocInherit | |||
1242 | def render_display_format_json(self, output): |
|
1176 | def render_display_format_json(self, output): | |
1243 | """render the json part of an output |
|
|||
1244 |
|
||||
1245 | Returns []. |
|
|||
1246 | """ |
|
|||
1247 | return [output.json] |
|
1177 | return [output.json] | |
1248 |
|
1178 | |||
1249 |
|
1179 | |||
|
1180 | @DocInherit | |||
1250 | def render_display_format_javascript(self, output): |
|
1181 | def render_display_format_javascript(self, output): | |
1251 | """render the javascript part of an output |
|
|||
1252 |
|
||||
1253 | Returns []. |
|
|||
1254 | """ |
|
|||
1255 | return [output.javascript] |
|
1182 | return [output.javascript] | |
1256 |
|
1183 | |||
1257 | #----------------------------------------------------------------------------- |
|
1184 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now